From e20435e6543526c7ea691f5af567bf389d604211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sun, 25 Jan 2026 21:07:54 +0100 Subject: [PATCH 01/63] basic objc wrapper to use kmp on ios --- Package.swift | 15 +++++++- ios/graphics/Texture/TextureHolder.swift | 11 +++++- ios/maps/MCFontLoader.swift | 1 + ios/maps/MCMapView.swift | 6 +++ ios/maps/MCTextureLoader.swift | 4 +- ios/objc/MCMapCoreObjCFactory.m | 20 ++++++++++ ios/objc/MCMapViewObjC.m | 49 ++++++++++++++++++++++++ ios/objc/include/MCMapCoreObjCFactory.h | 14 +++++++ ios/objc/include/MCMapViewObjC.h | 16 ++++++++ 9 files changed, 133 insertions(+), 3 deletions(-) create mode 100644 ios/objc/MCMapCoreObjCFactory.m create mode 100644 ios/objc/MCMapViewObjC.m create mode 100644 ios/objc/include/MCMapCoreObjCFactory.h create mode 100644 ios/objc/include/MCMapViewObjC.h diff --git a/Package.swift b/Package.swift index 7391a06ec..9a8e3729d 100644 --- a/Package.swift +++ b/Package.swift @@ -21,6 +21,10 @@ let package = Package( name: "MapCoreSharedModuleCpp", targets: ["MapCoreSharedModuleCpp"] ), + .library( + name: "MapCoreObjC", + targets: ["MapCoreObjC"] + ), ], dependencies: [ .package(url: "https://github.com/UbiqueInnovation/djinni.git", .upToNextMinor(from: "1.0.9")), @@ -117,7 +121,7 @@ let package = Package( .product(name: "Atomics", package: "swift-atomics"), ], path: "ios", - exclude: ["readme.md"], + exclude: ["readme.md", "objc"], resources: [ .process("graphics/Shader/Metal/") ] @@ -189,6 +193,15 @@ let package = Package( // .disableWarning("reorder"), ] ), + .target( + name: "MapCoreObjC", + dependencies: [ + "MapCore", + "MapCoreSharedModule", + ], + path: "ios/objc", + publicHeadersPath: "include" + ), ], cxxLanguageStandard: .cxx17 ) diff --git a/ios/graphics/Texture/TextureHolder.swift b/ios/graphics/Texture/TextureHolder.swift index 34a2fcd44..f785b812d 100644 --- a/ios/graphics/Texture/TextureHolder.swift +++ b/ios/graphics/Texture/TextureHolder.swift @@ -16,7 +16,7 @@ enum TextureHolderError: Error { case emptyData } -@objc +@objcMembers public class TextureHolder: NSObject, @unchecked Sendable { public let texture: MTLTexture @@ -85,6 +85,15 @@ public class TextureHolder: NSObject, @unchecked Sendable { self.init(texture, textureUsableSize: textureUsableSize) } + @objc(initWithData:) + public convenience init?(data: Data) { + do { + try self.init(data, textureUsableSize: nil) + } catch { + return nil + } + } + public convenience init(_ size: CGSize, drawCallback: (CGContext) -> Void) throws { guard size.width > 0, size.height > 0 else { throw TextureHolderError.emptyData diff --git a/ios/maps/MCFontLoader.swift b/ios/maps/MCFontLoader.swift index 788b5bf70..aa2aa7016 100644 --- a/ios/maps/MCFontLoader.swift +++ b/ios/maps/MCFontLoader.swift @@ -12,6 +12,7 @@ import MapCoreSharedModule import UIKit import os +@objcMembers open class MCFontLoader: NSObject, MCFontLoaderInterface, @unchecked Sendable { // MARK: - Font Atlas Dictionary diff --git a/ios/maps/MCMapView.swift b/ios/maps/MCMapView.swift index e231975e8..d8b31420d 100644 --- a/ios/maps/MCMapView.swift +++ b/ios/maps/MCMapView.swift @@ -13,6 +13,7 @@ import Foundation @preconcurrency import MetalKit import os +@objcMembers open class MCMapView: MTKView { public let mapInterface: MCMapInterface private let renderingContext: RenderingContext @@ -72,6 +73,11 @@ open class MCMapView: MTKView { setup() } + @objc(initWithMapConfig:pixelsPerInch:is3D:) + public convenience init(mapConfig: MCMapConfig, pixelsPerInch: NSNumber?, is3D: Bool) { + self.init(mapConfig: mapConfig, pixelsPerInch: pixelsPerInch?.floatValue, is3D: is3D) + } + @available(*, unavailable) public required init(coder _: NSCoder) { fatalError("init(coder:) has not been implemented") diff --git a/ios/maps/MCTextureLoader.swift b/ios/maps/MCTextureLoader.swift index c4626e708..9a1b3534d 100644 --- a/ios/maps/MCTextureLoader.swift +++ b/ios/maps/MCTextureLoader.swift @@ -16,7 +16,8 @@ import UIKit @available(iOS 14.0, *) private let logger = Logger(subsystem: "maps-core", category: "MCTextureLoader") -open class MCTextureLoader: MCLoaderInterface, @unchecked Sendable { +@objcMembers +open class MCTextureLoader: NSObject, MCLoaderInterface, @unchecked Sendable { public let session: URLSession public var isRasterDebugModeEnabled: Bool @@ -37,6 +38,7 @@ open class MCTextureLoader: MCLoaderInterface, @unchecked Sendable { } isRasterDebugModeEnabled = UserDefaults.standard.bool(forKey: "io.openmobilemaps.debug.rastertiles.enabled") + super.init() } open func loadTexture(_ url: String, etag: String?) -> MCTextureLoaderResult { diff --git a/ios/objc/MCMapCoreObjCFactory.m b/ios/objc/MCMapCoreObjCFactory.m new file mode 100644 index 000000000..e492989b5 --- /dev/null +++ b/ios/objc/MCMapCoreObjCFactory.m @@ -0,0 +1,20 @@ +#import "MCMapCoreObjCFactory.h" + +@import MapCore; +@import MapCoreSharedModule; + +@implementation MCMapCoreObjCFactory + ++ (id)createTextureLoader { + return [[MCTextureLoader alloc] initWithUrlSession:nil]; +} + ++ (id)createFontLoaderWithBundle:(NSBundle *)bundle { + return [[MCFontLoader alloc] initWithBundle:bundle preload:@[]]; +} + ++ (id)createTextureHolderWithData:(NSData *)data { + return [[TextureHolder alloc] initWithData:data]; +} + +@end diff --git a/ios/objc/MCMapViewObjC.m b/ios/objc/MCMapViewObjC.m new file mode 100644 index 000000000..f45e5d5c2 --- /dev/null +++ b/ios/objc/MCMapViewObjC.m @@ -0,0 +1,49 @@ +#import "MCMapViewObjC.h" + +@import MapCore; +@import MapCoreSharedModule; + +#import "MapCore-Swift.h" + +@interface MCMapViewObjC () +@property (nonatomic, strong) MCMapView *mapViewInternal; +@end + +@implementation MCMapViewObjC + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self commonInit]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)coder { + if (self = [super initWithCoder:coder]) { + [self commonInit]; + } + return self; +} + +- (UIView *)mapView { + return self.mapViewInternal; +} + +- (MCMapInterface *)mapInterface { + return self.mapViewInternal.mapInterface; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + self.mapViewInternal.frame = self.bounds; +} + +- (void)commonInit { + MCMapConfig *config = [[MCMapConfig alloc] initWithMapCoordinateSystem:[MCCoordinateSystemFactory getEpsg3857System]]; + self.mapViewInternal = [[MCMapView alloc] initWithMapConfig:config pixelsPerInch:nil is3D:NO]; + self.mapViewInternal.frame = self.bounds; + self.mapViewInternal.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + [self addSubview:self.mapViewInternal]; +} + +@end diff --git a/ios/objc/include/MCMapCoreObjCFactory.h b/ios/objc/include/MCMapCoreObjCFactory.h new file mode 100644 index 000000000..075483a03 --- /dev/null +++ b/ios/objc/include/MCMapCoreObjCFactory.h @@ -0,0 +1,14 @@ +#import +@import MapCoreSharedModule; + +NS_ASSUME_NONNULL_BEGIN + +@interface MCMapCoreObjCFactory : NSObject + ++ (id)createTextureLoader; ++ (id)createFontLoaderWithBundle:(NSBundle *)bundle; ++ (id)createTextureHolderWithData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/objc/include/MCMapViewObjC.h b/ios/objc/include/MCMapViewObjC.h new file mode 100644 index 000000000..3b62a0110 --- /dev/null +++ b/ios/objc/include/MCMapViewObjC.h @@ -0,0 +1,16 @@ +#import +@import MapCoreSharedModule; + +NS_ASSUME_NONNULL_BEGIN + +@interface MCMapViewObjC : UIView + +- (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, readonly) UIView *mapView; +@property (nonatomic, readonly) MCMapInterface *mapInterface; + +@end + +NS_ASSUME_NONNULL_END From 3d46afcf6a13ad1ae4f7d02a53a326a6e738d36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 09:07:57 +0100 Subject: [PATCH 02/63] kmp: extract mapcore module --- build.gradle.kts | 266 ++++++++++++++++++ .../kmp/core/feature/map/interop/Coord.kt | 5 + .../feature/map/interop/MapCoreInterop.kt | 7 + ...ProviderLocalDataProviderImplementation.kt | 80 ++++++ .../map/interop/MapFactoryImplementation.kt | 84 ++++++ .../feature/map/interop/MapImplementations.kt | 244 ++++++++++++++++ .../MapTiled2dMapLayerConfigImplementation.kt | 120 ++++++++ .../MapVectorLayerSelectionCallbackProxy.kt | 7 + .../feature/map/interop/MapViewWrapper.kt | 22 ++ .../kmp/core/feature/map/interop/RectCoord.kt | 5 + .../kmp/core/feature/map/interop/Coord.kt | 13 + .../feature/map/interop/MapCameraInterface.kt | 9 + .../feature/map/interop/MapCoreInterop.kt | 5 + .../map/interop/MapDataProviderProtocol.kt | 8 + .../core/feature/map/interop/MapFactory.kt | 24 ++ .../core/feature/map/interop/MapGpsLayer.kt | 11 + .../core/feature/map/interop/MapInterface.kt | 15 + .../feature/map/interop/MapRasterLayer.kt | 3 + .../map/interop/MapTiled2dMapLayerConfig.kt | 26 ++ .../feature/map/interop/MapVectorLayer.kt | 6 + .../map/interop/MapVectorLayerFeatureInfo.kt | 12 + .../MapVectorLayerSelectionCallback.kt | 11 + .../feature/map/interop/MapViewWrapper.kt | 10 + .../kmp/core/feature/map/interop/RectCoord.kt | 9 + .../kmp/core/feature/map/model/GpsMode.kt | 7 + .../kmp/core/feature/map/interop/Coord.kt | 5 + .../kmp/core/feature/map/interop/GpsCoord.kt | 5 + .../MapCameraInterfaceImplementation.kt | 42 +++ .../feature/map/interop/MapCoreInterop.kt | 12 + ...ProviderLocalDataProviderImplementation.kt | 66 +++++ .../map/interop/MapFactoryImplementation.kt | 129 +++++++++ .../map/interop/MapGpsLayerImplementation.kt | 174 ++++++++++++ .../map/interop/MapInterfaceImplementation.kt | 61 ++++ .../interop/MapRasterLayerImplementation.kt | 18 ++ .../MapTiled2dMapLayerConfigImplementation.kt | 109 +++++++ .../interop/MapVectorLayerImplementation.kt | 45 +++ .../MapVectorLayerSelectionCallbackProxy.kt | 56 ++++ .../feature/map/interop/MapViewWrapper.kt | 21 ++ .../kmp/core/feature/map/interop/RectCoord.kt | 5 + .../MapCoreKmp/StartYourBridgeHere.swift | 15 + 40 files changed, 1772 insertions(+) create mode 100644 build.gradle.kts create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt create mode 100644 src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt create mode 100644 src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt create mode 100644 src/swift/MapCoreKmp/StartYourBridgeHere.swift diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..a744e905f --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,266 @@ +import org.gradle.api.DefaultTask +import org.gradle.api.file.ConfigurableFileCollection +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.InputDirectory +import org.gradle.api.tasks.InputFiles +import org.gradle.api.tasks.OutputDirectory +import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.TaskAction +import org.gradle.process.ExecOperations +import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.CInteropProcess +import java.net.URI +import javax.inject.Inject + +val mapCoreCheckoutPath = project.layout.projectDirectory.asFile.absolutePath +val mapCoreMetalToolchain = providers.environmentVariable("MAPCORE_METAL_TOOLCHAIN") + .orElse(providers.gradleProperty("mapCoreMetalToolchain")) + .orElse("") +val mapCoreMetallibToolchain = providers.environmentVariable("MAPCORE_METALLIB_TOOLCHAIN") + .orElse(providers.gradleProperty("mapCoreMetallibToolchain")) + .orElse("com.apple.dt.toolchain.XcodeDefault") +val mapCoreMetalTargetSimulator = providers.environmentVariable("MAPCORE_METAL_TARGET_SIMULATOR") + .orElse(providers.gradleProperty("mapCoreMetalTargetSimulator")) + .orElse("air64-apple-ios26.0-simulator") +val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARGET_DEVICE") + .orElse(providers.gradleProperty("mapCoreMetalTargetDevice")) + .orElse("air64-apple-ios26.0") + +plugins { + alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.android.library) + alias(libs.plugins.spmForKmp) +} + +@OptIn(ExperimentalKotlinGradlePluginApi::class) +kotlin { + compilerOptions { + freeCompilerArgs.add("-Xexpect-actual-classes") // Opt-in for expect/actual classes + } + + androidTarget { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + } + + val mapCoreCinteropName = "MapCoreKmp" + val iosTargets = listOf( + iosArm64(), + iosSimulatorArm64() + ) + + iosTargets.forEach { iosTarget -> + if (iosTarget.name == "iosSimulatorArm64") { + iosTarget.compilations { + val main by getting { + cinterops.create(mapCoreCinteropName) + } + } + } + } + + sourceSets { + val commonMain by getting { + dependencies { + api(libs.kotlinx.coroutines) + } + } + val androidMain by getting { + dependencies { + api(libs.openmobilemaps.mapscore) + api(libs.openmobilemaps.layer.gps) + implementation(libs.androidx.lifecycle.viewmodelKtx) + } + } + val iosArm64Main by getting { + languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") + } + val iosSimulatorArm64Main by getting { + languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") + } + } +} + +swiftPackageConfig { + create("MapCoreKmp") { + minIos = "14.0" + bridgeSettings { + cSetting { + headerSearchPath = listOf("Sources/djinni-objc") + } + } + dependency { + localPackage( + mapCoreCheckoutPath, + "maps-core" + ) { + add("MapCoreObjC", exportToKotlin = true) + add("MapCoreSharedModule", exportToKotlin = true) + } + remotePackageVersion( + url = URI("https://github.com/openmobilemaps/layer-gps"), + packageName = "layer-gps", + version = "3.6.0", + ) { + add("LayerGpsSharedModule", exportToKotlin = true) + } + } + } +} + +tasks.withType().configureEach { + if (name.contains("MapCoreKmp")) { + settings.compilerOpts("-I$mapCoreCheckoutPath/external/djinni/support-lib/objc") + settings.compilerOpts("-I$mapCoreCheckoutPath/bridging/ios") + } +} + +val mapCoreSpmBuiltDir = + project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64 x86_64-apple-ios-simulator/release").get().asFile +mapCoreSpmBuiltDir.mkdirs() + +abstract class CompileMapCoreMetallibTask : DefaultTask() { + @get:Input + abstract val sdk: Property + + @get:Input + abstract val toolchainId: Property + + @get:Input + abstract val metallibToolchainId: Property + + @get:Input + abstract val targetTriple: Property + + @get:InputDirectory + abstract val bundleDir: DirectoryProperty + + @get:InputFiles + abstract val metalSources: ConfigurableFileCollection + + @get:OutputDirectory + abstract val outputDir: DirectoryProperty + + @get:OutputFile + abstract val metallibFile: RegularFileProperty + + @get:Inject + abstract val execOperations: ExecOperations + + @TaskAction + fun run() { + val bundleRoot = bundleDir.get().asFile + if (!bundleRoot.exists()) return + val metalFiles = metalSources.files.sortedBy { it.name } + if (metalFiles.isEmpty()) return + val toolchain = toolchainId.orNull?.takeIf { it.isNotBlank() } + val metallibToolchain = metallibToolchainId.orNull?.takeIf { it.isNotBlank() } + + val outputRoot = outputDir.get().asFile + outputRoot.mkdirs() + + val airFiles = metalFiles.map { file -> + File(outputRoot, "${file.nameWithoutExtension}.air") + } + + metalFiles.zip(airFiles).forEach { (metalFile, airFile) -> + execOperations.exec { + val args = buildList { + add("xcrun") + if (toolchain != null) { + add("--toolchain") + add(toolchain) + } + addAll( + listOf( + "-sdk", + sdk.get(), + "metal", + "-target", + targetTriple.get(), + "-c", + metalFile.absolutePath, + "-o", + airFile.absolutePath, + ), + ) + } + commandLine(args) + } + } + + val metallibArgs = buildList { + add("xcrun") + if (metallibToolchain != null) { + add("--toolchain") + add(metallibToolchain) + } + addAll( + listOf( + "-sdk", + sdk.get(), + "metallib", + ), + ) + airFiles.forEach { add(it.absolutePath) } + add("-o") + add(metallibFile.get().asFile.absolutePath) + } + + execOperations.exec { + commandLine(metallibArgs) + } + } +} + +val compileMapCoreMetallibIosSimulator = tasks.register("compileMapCoreMetallibIosSimulator") { + dependsOn("SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosSimulatorArm64") + sdk.set("iphonesimulator") + toolchainId.set(mapCoreMetalToolchain) + metallibToolchainId.set(mapCoreMetallibToolchain) + targetTriple.set(mapCoreMetalTargetSimulator) + bundleDir.set( + project.layout.buildDirectory + .dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios-simulator/release/MapCore_MapCore.bundle"), + ) + outputDir.set(project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/metal/iphonesimulator")) + metalSources.from(bundleDir.map { it.asFileTree.matching { include("**/*.metal") } }) + metallibFile.set(bundleDir.map { it.file("default.metallib") }) +} + +val compileMapCoreMetallibIosArm64 = tasks.register("compileMapCoreMetallibIosArm64") { + dependsOn("SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64") + sdk.set("iphoneos") + toolchainId.set(mapCoreMetalToolchain) + metallibToolchainId.set(mapCoreMetallibToolchain) + targetTriple.set(mapCoreMetalTargetDevice) + bundleDir.set( + project.layout.buildDirectory + .dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios/release/MapCore_MapCore.bundle"), + ) + outputDir.set(project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/metal/iphoneos")) + metalSources.from(bundleDir.map { it.asFileTree.matching { include("**/*.metal") } }) + metallibFile.set(bundleDir.map { it.file("default.metallib") }) +} + +tasks.matching { it.name == "compileKotlinIosSimulatorArm64" } + .configureEach { dependsOn(compileMapCoreMetallibIosSimulator) } +tasks.matching { it.name == "compileKotlinIosArm64" } + .configureEach { dependsOn(compileMapCoreMetallibIosArm64) } + +android { + namespace = "io.openmobilemaps.mapscore.kmp" + compileSdk = 36 + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + defaultConfig { + minSdk = 31 + } +} diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt new file mode 100644 index 000000000..1854f7712 --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.coordinates.Coord as MapscoreCoord + +actual typealias Coord = MapscoreCoord diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt new file mode 100644 index 000000000..176f8c253 --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt @@ -0,0 +1,7 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +actual object MapCoreInterop { + actual fun moveToCenter(coord: Coord) { + coord.hashCode() + } +} diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt new file mode 100644 index 000000000..d4861eec5 --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt @@ -0,0 +1,80 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import android.graphics.BitmapFactory +import com.snapchat.djinni.Future +import com.snapchat.djinni.Promise +import io.openmobilemaps.mapscore.graphics.BitmapTextureHolder +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface +import io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult +import io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus +import io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import java.nio.ByteBuffer + +internal class MapDataProviderLocalDataProviderImplementation( + private val dataProvider: MapDataProviderProtocol, + private val coroutineScope: CoroutineScope, +) : Tiled2dMapVectorLayerLocalDataProviderInterface() { + + override fun getStyleJson(): String? = dataProvider.getStyleJson() + + override fun loadSpriteAsync(scale: Int): Future { + val promise = Promise() + coroutineScope.launch(Dispatchers.IO) { + val attempt = runCatching { dataProvider.loadSpriteAsync("", "", scale) } + val texture = attempt.getOrNull() + ?.let { bytes -> BitmapFactory.decodeByteArray(bytes, 0, bytes.size) } + ?.let { BitmapTextureHolder(it) } + val result = if (attempt.isFailure) { + TextureLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) + } else { + texture?.let { TextureLoaderResult(it, null, LoaderStatus.OK, null) } + ?: TextureLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) + } + promise.setValue(result) + } + return promise.future + } + + override fun loadSpriteJsonAsync(scale: Int): Future { + val promise = Promise() + coroutineScope.launch(Dispatchers.IO) { + val attempt = runCatching { dataProvider.loadSpriteJsonAsync("", "", scale) } + val result = if (attempt.isFailure) { + DataLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) + } else { + attempt.getOrNull() + ?.let { bytes -> bytes.asDataLoaderResult() } + ?: DataLoaderResult(null, null, LoaderStatus.OK, null) + } + promise.setValue(result) + } + return promise.future + } + + override fun loadGeojson(sourceName: String, url: String): Future { + val promise = Promise() + coroutineScope.launch(Dispatchers.IO) { + val attempt = runCatching { dataProvider.loadGeojson(sourceName, url) } + val result = if (attempt.isFailure) { + DataLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) + } else { + attempt.getOrNull() + ?.let { bytes -> bytes.asDataLoaderResult() } + ?: DataLoaderResult(null, null, LoaderStatus.OK, null) + } + promise.setValue(result) + } + return promise.future + } + + private fun ByteArray.asDataLoaderResult(): DataLoaderResult { + val buffer = ByteBuffer.allocateDirect(size).apply { + put(this@asDataLoaderResult) + flip() + } + return DataLoaderResult(buffer, null, LoaderStatus.OK, null) + } +} diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt new file mode 100644 index 000000000..7d3e0c609 --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -0,0 +1,84 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import android.content.Context +import androidx.lifecycle.Lifecycle +import io.openmobilemaps.gps.GpsLayer +import io.openmobilemaps.gps.GpsProviderType +import io.openmobilemaps.gps.style.GpsStyleInfoFactory +import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer +import io.openmobilemaps.mapscore.map.loader.DataLoader +import io.openmobilemaps.mapscore.map.loader.FontLoader +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer +import kotlinx.coroutines.CoroutineScope +import java.io.File + +actual abstract class MapFactory actual constructor( + platformContext: Any?, + coroutineScope: CoroutineScope?, + lifecycle: Any?, +) { + private val context = platformContext as? Context + private val coroutineScope = coroutineScope + private val lifecycle = lifecycle as? Lifecycle + + actual fun _createVectorLayer( + layerName: String, + dataProvider: MapDataProviderProtocol, + ): MapVectorLayer? { + val context = requireNotNull(context) { "MapFactory requires an Android Context" } + val coroutineScope = requireNotNull(coroutineScope) { "MapFactory requires a CoroutineScope" } + val cacheDir = File(context.cacheDir, "vector").apply { mkdirs() } + val provider = MapDataProviderLocalDataProviderImplementation( + dataProvider = dataProvider, + coroutineScope = coroutineScope, + ) + return MapscoreVectorLayer.createExplicitly( + layerName, + null, + false, + arrayListOf(DataLoader(context, cacheDir, 50L * 1024 * 1024)), + FontLoader(context, "map/fonts/", context.resources.displayMetrics.density), + provider, + null, + null, + null, + )?.let { MapVectorLayerImpl(it) } + } + + actual fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { + val context = requireNotNull(context) { "MapFactory requires an Android Context" } + val cacheDir = File(context.cacheDir, "raster").apply { mkdirs() } + val loader = DataLoader(context, cacheDir, 25L * 1024 * 1024) + return TiledRasterLayer(MapTiled2dMapLayerConfigImplementation(config), arrayListOf(loader)) + .let { MapRasterLayerImpl(it) } + } + + actual fun _createGpsLayer(): MapGpsLayer? { + val context = requireNotNull(context) { "MapFactory requires an Android Context" } + val locationProvider = GpsProviderType.GOOGLE_FUSED.getProvider(context) + val gpsLayer = GpsLayer( + context = context, + style = GpsStyleInfoFactory.createDefaultStyle(context), + initialLocationProvider = locationProvider, + ).apply { + setHeadingEnabled(false) + setFollowInitializeZoom(25_000f) + lifecycle?.let { registerLifecycle(it) } + } + return MapGpsLayerImpl(GpsLayerHandle(gpsLayer, locationProvider)) + } + + actual companion object { + actual fun create( + platformContext: Any?, + coroutineScope: CoroutineScope?, + lifecycle: Any?, + ): MapFactory = MapFactoryImpl(platformContext, coroutineScope, lifecycle) + } +} + +private class MapFactoryImpl( + platformContext: Any?, + coroutineScope: CoroutineScope?, + lifecycle: Any?, +) : MapFactory(platformContext, coroutineScope, lifecycle) diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt new file mode 100644 index 000000000..96f7f8848 --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt @@ -0,0 +1,244 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode +import io.openmobilemaps.gps.GpsLayer +import io.openmobilemaps.gps.providers.LocationProviderInterface +import io.openmobilemaps.gps.shared.gps.GpsMode as MapscoreGpsMode +import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer +import io.openmobilemaps.mapscore.map.view.MapView as MapscoreMapView +import io.openmobilemaps.mapscore.shared.map.LayerInterface +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface as MapscoreSelectionCallback +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo as MapscoreFeatureInfo +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue as MapscoreFeatureInfoValue +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfo as SharedFeatureInfo +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfoValue as SharedFeatureInfoValue + +actual abstract class MapInterface actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _addVectorLayer(layer: MapVectorLayer?) + actual abstract fun _removeVectorLayer(layer: MapVectorLayer?) + actual abstract fun _addRasterLayer(layer: MapRasterLayer?) + actual abstract fun _removeRasterLayer(layer: MapRasterLayer?) + actual abstract fun _addGpsLayer(layer: MapGpsLayer?) + actual abstract fun _removeGpsLayer(layer: MapGpsLayer?) + actual abstract fun _getCamera(): MapCameraInterface? + + actual companion object { + actual fun create(nativeHandle: Any?): MapInterface = MapInterfaceImpl(nativeHandle) + } +} + +private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) { + private val mapView = nativeHandle as? MapscoreMapView + private val cameraInterface = MapCameraInterfaceImpl(mapView?.getCamera()) + + override fun _addVectorLayer(layer: MapVectorLayer?) { + val handle = layer as? MapVectorLayerImpl ?: return + handle.layerInterface()?.let { mapView?.addLayer(it) } + } + + override fun _removeVectorLayer(layer: MapVectorLayer?) { + val handle = layer as? MapVectorLayerImpl ?: return + handle.layerInterface()?.let { mapView?.removeLayer(it) } + } + + override fun _addRasterLayer(layer: MapRasterLayer?) { + val handle = layer as? MapRasterLayer ?: return + handle.layerInterface()?.let { mapView?.addLayer(it) } + } + + override fun _removeRasterLayer(layer: MapRasterLayer?) { + val handle = layer as? MapRasterLayer ?: return + handle.layerInterface()?.let { mapView?.removeLayer(it) } + } + + override fun _addGpsLayer(layer: MapGpsLayer?) { + val handle = layer as? MapGpsLayerImpl ?: return + handle.layerInterface()?.let { mapView?.addLayer(it) } + } + + override fun _removeGpsLayer(layer: MapGpsLayer?) { + val handle = layer as? MapGpsLayerImpl ?: return + handle.layerInterface()?.let { mapView?.removeLayer(it) } + } + + override fun _getCamera(): MapCameraInterface? = cameraInterface +} + +actual abstract class MapCameraInterface actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _setBounds(bounds: RectCoord) + actual abstract fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) + actual abstract fun _setMinZoom(zoom: Double) + actual abstract fun _setMaxZoom(zoom: Double) + actual abstract fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) +} + +private class MapCameraInterfaceImpl(nativeHandle: Any?) : MapCameraInterface(nativeHandle) { + private val camera = nativeHandle as? io.openmobilemaps.mapscore.map.camera.MapCamera + + override fun _setBounds(bounds: RectCoord) { + camera?.setBounds(bounds) + } + + override fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { + camera?.moveToCenterPositionZoom(coord, zoom, animated) + } + + override fun _setMinZoom(zoom: Double) { + camera?.setMinZoom(zoom) + } + + override fun _setMaxZoom(zoom: Double) { + camera?.setMaxZoom(zoom) + } + + override fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + camera?.setBoundsRestrictWholeVisibleRect(enabled) + } +} + +actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) + actual abstract fun _setGlobalState(state: Map) +} + +internal class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { + private val layer = nativeHandle as? MapscoreVectorLayer + + override fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { + val callback = delegate?.let { MapVectorLayerSelectionCallbackAdapterImplementation(it) } + layer?.setSelectionDelegate(callback) + } + + override fun _setGlobalState(state: Map) { + val mapped = HashMap() + state.forEach { (key, value) -> + mapped[key] = value.asMapscore() + } + layer?.setGlobalState(mapped) + } + + internal fun layerInterface(): LayerInterface? = layer?.asLayerInterface() +} + +actual open class MapRasterLayer actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + internal fun layerInterface(): LayerInterface? = + (nativeHandle as? TiledRasterLayer)?.layerInterface() +} + +actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _setMode(mode: GpsMode) + actual abstract fun _getMode(): GpsMode + actual abstract fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + actual abstract fun _notifyPermissionGranted() + actual abstract fun _lastLocation(): Coord? +} + +internal class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { + private val handle = nativeHandle as? GpsLayerHandle + private val gpsLayer = handle?.layer + private val locationProvider = handle?.locationProvider + private var modeListener: ((GpsMode) -> Unit)? = null + + init { + gpsLayer?.setOnModeChangedListener { mode -> + modeListener?.invoke(mode.asShared()) + } + } + + override fun _setMode(mode: GpsMode) { + gpsLayer?.setMode(mode.asMapscore()) + } + + override fun _getMode(): GpsMode = gpsLayer?.layerInterface?.getMode()?.asShared() ?: GpsMode.DISABLED + + override fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { + modeListener = listener + } + + override fun _notifyPermissionGranted() { + locationProvider?.notifyLocationPermissionGranted() + } + + override fun _lastLocation(): Coord? = locationProvider?.getLastLocation() + + internal fun layerInterface(): LayerInterface? = gpsLayer?.asLayerInterface() +} + +private class MapVectorLayerSelectionCallbackAdapterImplementation( + private val proxy: MapVectorLayerSelectionCallbackProxy, +) : MapscoreSelectionCallback() { + override fun didSelectFeature(featureInfo: MapscoreFeatureInfo, layerIdentifier: String, coord: Coord): Boolean { + val shared = featureInfo.asShared(layerIdentifier) + return proxy.handler._didSelectFeature(shared, coord) + } + + override fun didMultiSelectLayerFeatures( + featureInfos: ArrayList, + layerIdentifier: String, + coord: Coord, + ): Boolean { + return proxy.handler._didMultiSelectLayerFeatures(layerIdentifier, coord) + } + + override fun didClickBackgroundConfirmed(coord: Coord): Boolean { + return proxy.handler._didClickBackgroundConfirmed(coord) + } +} + +private fun MapscoreFeatureInfo.asShared(layerIdentifier: String): SharedFeatureInfo { + val props = properties.mapValues { it.value.asShared() } + return SharedFeatureInfo( + identifier = identifier, + layerIdentifier = layerIdentifier, + properties = props, + ) +} + +private fun MapscoreFeatureInfoValue.asShared(): SharedFeatureInfoValue { + val stringValue = stringVal + ?: intVal?.toString() + ?: doubleVal?.toString() + ?: boolVal?.toString() + val list = listStringVal?.filterIsInstance() + return SharedFeatureInfoValue(stringVal = stringValue, listStringVal = list) +} + +private fun SharedFeatureInfoValue.asMapscore(): MapscoreFeatureInfoValue = + MapscoreFeatureInfoValue( + stringVal, + null, + null, + null, + null, + null, + listStringVal?.let { ArrayList(it) }, + ) + +private fun GpsMode.asMapscore(): MapscoreGpsMode = when (this) { + GpsMode.DISABLED -> MapscoreGpsMode.DISABLED + GpsMode.STANDARD -> MapscoreGpsMode.STANDARD + GpsMode.FOLLOW -> MapscoreGpsMode.FOLLOW +} + +private fun MapscoreGpsMode.asShared(): GpsMode = when (this) { + MapscoreGpsMode.DISABLED -> GpsMode.DISABLED + MapscoreGpsMode.STANDARD -> GpsMode.STANDARD + MapscoreGpsMode.FOLLOW -> GpsMode.FOLLOW + MapscoreGpsMode.FOLLOW_AND_TURN -> GpsMode.FOLLOW +} + +internal data class GpsLayerHandle( + val layer: GpsLayer, + val locationProvider: LocationProviderInterface, +) diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt new file mode 100644 index 000000000..98e73a457 --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt @@ -0,0 +1,120 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapTiled2dMapLayerConfig as SharedLayerConfig +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapTiled2dMapZoomInfo as SharedZoomInfo +import io.openmobilemaps.mapscore.shared.map.coordinates.Coord as MapscoreCoord +import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig as MapscoreLayerConfig +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo as MapscoreZoomInfo +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings +import kotlin.math.pow + +class MapTiled2dMapLayerConfigImplementation( + private val config: SharedLayerConfig, +) : MapscoreLayerConfig() { + + private val coordinateConverter by lazy { + CoordinateConversionHelperInterface.independentInstance() + } + + override fun getCoordinateSystemIdentifier(): Int = config.coordinateSystemIdentifier + + override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { + val tilesPerAxis = 2.0.pow(zoom.toDouble()) + + val bounds = config.bounds + val wmMinX = bounds.topLeft.x + val wmMaxX = bounds.bottomRight.x + val wmMaxY = bounds.topLeft.y + val wmMinY = bounds.bottomRight.y + + val tileWidth = (wmMaxX - wmMinX) / tilesPerAxis + val tileHeight = (wmMaxY - wmMinY) / tilesPerAxis + + val wmMinTileX = wmMinX + x * tileWidth + val wmMaxTileX = wmMinX + (x + 1) * tileWidth + val wmMaxTileY = wmMaxY - y * tileHeight + val wmMinTileY = wmMaxY - (y + 1) * tileHeight + + val wmTopLeft = MapscoreCoord( + systemIdentifier = config.coordinateSystemIdentifier, + x = wmMinTileX, + y = wmMaxTileY, + z = 0.0, + ) + val wmBottomRight = MapscoreCoord( + systemIdentifier = config.coordinateSystemIdentifier, + x = wmMaxTileX, + y = wmMinTileY, + z = 0.0, + ) + + val lv95TopLeft = coordinateConverter.convert(config.bboxCoordinateSystemIdentifier, wmTopLeft) + val lv95BottomRight = coordinateConverter.convert(config.bboxCoordinateSystemIdentifier, wmBottomRight) + + val bbox = listOf( + lv95TopLeft.x, + lv95BottomRight.y, + lv95BottomRight.x, + lv95TopLeft.y, + ).joinToString(separator = ",") { "%.3f".format(it) } + + val width = config.tileWidth + val height = config.tileHeight + + return config.urlFormat + .replace("{bbox}", bbox, ignoreCase = true) + .replace("{width}", width.toString(), ignoreCase = true) + .replace("{height}", height.toString(), ignoreCase = true) + } + + override fun getZoomLevelInfos(): ArrayList = + ArrayList().apply { + for (zoom in config.minZoomLevel..config.maxZoomLevel) { + add(createZoomLevelInfo(zoom)) + } + } + + override fun getVirtualZoomLevelInfos(): ArrayList = + ArrayList().apply { + if (config.minZoomLevel > 0) { + for (zoom in 0 until config.minZoomLevel) { + add(createZoomLevelInfo(zoom)) + } + } + } + + override fun getZoomInfo(): MapscoreZoomInfo = config.zoomInfo.asMapscore() + + override fun getLayerName(): String = config.layerName + + override fun getVectorSettings(): Tiled2dMapVectorSettings? = null + + override fun getBounds() = config.bounds.asMapscore() + + private fun createZoomLevelInfo(zoomLevel: Int): Tiled2dMapZoomLevelInfo { + val tileCount = 2.0.pow(zoomLevel.toDouble()) + val zoom = config.baseZoom / tileCount + val width = (config.baseWidth / tileCount).toFloat() + return Tiled2dMapZoomLevelInfo( + zoom = zoom, + tileWidthLayerSystemUnits = width, + numTilesX = tileCount.toInt(), + numTilesY = tileCount.toInt(), + numTilesT = 1, + zoomLevelIdentifier = zoomLevel, + bounds = config.bounds.asMapscore(), + ) + } +} + +private fun SharedZoomInfo.asMapscore(): MapscoreZoomInfo = MapscoreZoomInfo( + zoomLevelScaleFactor = zoomLevelScaleFactor.toFloat(), + numDrawPreviousLayers = numDrawPreviousLayers, + numDrawPreviousOrLaterTLayers = numDrawPreviousOrLaterTLayers, + adaptScaleToScreen = adaptScaleToScreen, + maskTile = maskTile, + underzoom = underzoom, + overzoom = overzoom, +) diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt new file mode 100644 index 000000000..3bb6a53e1 --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt @@ -0,0 +1,7 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +actual class MapVectorLayerSelectionCallbackProxy actual constructor( + handler: MapVectorLayerSelectionCallback, +) { + actual val handler: MapVectorLayerSelectionCallback = handler +} diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt new file mode 100644 index 000000000..e12624fbb --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt @@ -0,0 +1,22 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import android.view.View +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapInterface + +actual typealias PlatformMapView = View + +actual class MapViewWrapper actual constructor() { + private lateinit var viewInternal: View + private lateinit var mapInterfaceInternal: MapInterface + + actual val view: View + get() = viewInternal + + actual val mapInterface: MapInterface + get() = mapInterfaceInternal + + constructor(view: View, mapInterface: MapInterface) : this() { + viewInternal = view + mapInterfaceInternal = mapInterface + } +} diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt new file mode 100644 index 000000000..e1bc84bbb --- /dev/null +++ b/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord as MapscoreRectCoord + +actual typealias RectCoord = MapscoreRectCoord diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt new file mode 100644 index 000000000..0cf764b13 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt @@ -0,0 +1,13 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class Coord( + systemIdentifier: Int, + x: Double, + y: Double, + z: Double, +) { + val systemIdentifier: Int + val x: Double + val y: Double + val z: Double +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt new file mode 100644 index 000000000..90e760d82 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt @@ -0,0 +1,9 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect abstract class MapCameraInterface constructor(nativeHandle: Any? = null) { + abstract fun _setBounds(bounds: RectCoord) + abstract fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) + abstract fun _setMinZoom(zoom: Double) + abstract fun _setMaxZoom(zoom: Double) + abstract fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt new file mode 100644 index 000000000..eb3724df6 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect object MapCoreInterop { + fun moveToCenter(coord: Coord) +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt new file mode 100644 index 000000000..79bad348d --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt @@ -0,0 +1,8 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +interface MapDataProviderProtocol { + fun getStyleJson(): String? + suspend fun loadGeojson(resourcePath: String, url: String): ByteArray? + suspend fun loadSpriteAsync(resourcePath: String, url: String, scale: Int): ByteArray? + suspend fun loadSpriteJsonAsync(resourcePath: String, url: String, scale: Int): ByteArray? +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt new file mode 100644 index 000000000..39f752be6 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt @@ -0,0 +1,24 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlinx.coroutines.CoroutineScope + +expect abstract class MapFactory constructor( + platformContext: Any? = null, + coroutineScope: CoroutineScope? = null, + lifecycle: Any? = null, +) { + abstract fun _createVectorLayer( + layerName: String, + dataProvider: MapDataProviderProtocol, + ): MapVectorLayer? + abstract fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? + abstract fun _createGpsLayer(): MapGpsLayer? + + companion object { + fun create( + platformContext: Any? = null, + coroutineScope: CoroutineScope? = null, + lifecycle: Any? = null, + ): MapFactory + } +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt new file mode 100644 index 000000000..b3392f82a --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt @@ -0,0 +1,11 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode + +expect abstract class MapGpsLayer constructor(nativeHandle: Any? = null) { + abstract fun _setMode(mode: GpsMode) + abstract fun _getMode(): GpsMode + abstract fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + abstract fun _notifyPermissionGranted() + abstract fun _lastLocation(): Coord? +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt new file mode 100644 index 000000000..7fbfda99d --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt @@ -0,0 +1,15 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect abstract class MapInterface constructor(nativeHandle: Any? = null) { + abstract fun _addVectorLayer(layer: MapVectorLayer?) + abstract fun _removeVectorLayer(layer: MapVectorLayer?) + abstract fun _addRasterLayer(layer: MapRasterLayer?) + abstract fun _removeRasterLayer(layer: MapRasterLayer?) + abstract fun _addGpsLayer(layer: MapGpsLayer?) + abstract fun _removeGpsLayer(layer: MapGpsLayer?) + abstract fun _getCamera(): MapCameraInterface? + + companion object { + fun create(nativeHandle: Any?): MapInterface + } +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt new file mode 100644 index 000000000..8f8188186 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt @@ -0,0 +1,3 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect open class MapRasterLayer constructor(nativeHandle: Any? = null) diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt new file mode 100644 index 000000000..f6f778579 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt @@ -0,0 +1,26 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +data class MapTiled2dMapZoomInfo( + val zoomLevelScaleFactor: Double, + val numDrawPreviousLayers: Int, + val numDrawPreviousOrLaterTLayers: Int, + val adaptScaleToScreen: Boolean, + val maskTile: Boolean, + val underzoom: Boolean, + val overzoom: Boolean, +) + +data class MapTiled2dMapLayerConfig( + val layerName: String, + val urlFormat: String, + val zoomInfo: MapTiled2dMapZoomInfo, + val minZoomLevel: Int, + val maxZoomLevel: Int, + val coordinateSystemIdentifier: Int, + val bboxCoordinateSystemIdentifier: Int, + val bounds: RectCoord, + val baseZoom: Double, + val baseWidth: Double, + val tileWidth: Int = 512, + val tileHeight: Int = 512, +) diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt new file mode 100644 index 000000000..27c71f65a --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt @@ -0,0 +1,6 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect abstract class MapVectorLayer constructor(nativeHandle: Any? = null) { + abstract fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) + abstract fun _setGlobalState(state: Map) +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt new file mode 100644 index 000000000..180822d32 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt @@ -0,0 +1,12 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +data class MapVectorLayerFeatureInfo( + val identifier: String, + val layerIdentifier: String, + val properties: Map, +) + +data class MapVectorLayerFeatureInfoValue( + val stringVal: String? = null, + val listStringVal: List? = null, +) diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt new file mode 100644 index 000000000..50a144fc4 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt @@ -0,0 +1,11 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +interface MapVectorLayerSelectionCallback { + fun _didSelectFeature(featureInfo: MapVectorLayerFeatureInfo, coord: Coord): Boolean + fun _didMultiSelectLayerFeatures(layerIdentifier: String, coord: Coord): Boolean + fun _didClickBackgroundConfirmed(coord: Coord): Boolean +} + +expect class MapVectorLayerSelectionCallbackProxy(handler: MapVectorLayerSelectionCallback) { + val handler: MapVectorLayerSelectionCallback +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt new file mode 100644 index 000000000..33bfa52fd --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt @@ -0,0 +1,10 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapInterface + +expect class PlatformMapView + +expect class MapViewWrapper() { + val view: PlatformMapView + val mapInterface: MapInterface +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt new file mode 100644 index 000000000..ea3365679 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt @@ -0,0 +1,9 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class RectCoord( + topLeft: Coord, + bottomRight: Coord, +) { + val topLeft: Coord + val bottomRight: Coord +} diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt new file mode 100644 index 000000000..53b1c4d28 --- /dev/null +++ b/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt @@ -0,0 +1,7 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.model + +enum class GpsMode { + DISABLED, + STANDARD, + FOLLOW, +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt new file mode 100644 index 000000000..4e299f4c5 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCCoord + +actual typealias Coord = MCCoord diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt new file mode 100644 index 000000000..b4fa1fce3 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import LayerGpsSharedModule.MCCoord + +typealias GpsCoord = MCCoord diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt new file mode 100644 index 000000000..0f2831af8 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt @@ -0,0 +1,42 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import MapCoreSharedModule.MCMapCameraInterface + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapCameraInterface", exact = true) +actual abstract class MapCameraInterface actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _setBounds(bounds: RectCoord) + actual abstract fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) + actual abstract fun _setMinZoom(zoom: Double) + actual abstract fun _setMaxZoom(zoom: Double) + actual abstract fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) +} + +internal class MapCameraInterfaceImpl(nativeHandle: Any?) : MapCameraInterface(nativeHandle) { + private val camera = nativeHandle as? MCMapCameraInterface + + override fun _setBounds(bounds: RectCoord) { + camera?.setBounds(bounds) + } + + override fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { + camera?.moveToCenterPositionZoom(coord, zoom, animated) + } + + override fun _setMinZoom(zoom: Double) { + camera?.setMinZoom(zoom) + } + + override fun _setMaxZoom(zoom: Double) { + camera?.setMaxZoom(zoom) + } + + override fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + camera?.setBoundsRestrictWholeVisibleRect(enabled) + } +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt new file mode 100644 index 000000000..e31a8d44a --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt @@ -0,0 +1,12 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapCoreInterop", exact = true) +actual object MapCoreInterop { + actual fun moveToCenter(coord: Coord) { + coord.hashCode() + } +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt new file mode 100644 index 000000000..46ff95756 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt @@ -0,0 +1,66 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreObjC.MCMapCoreObjCFactory +import MapCoreSharedModule.MCDataLoaderResult +import MapCoreSharedModule.DJFuture +import MapCoreSharedModule.DJPromise +import MapCoreSharedModule.MCLoaderStatusOK +import MapCoreSharedModule.MCTextureLoaderResult +import MapCoreSharedModule.MCTextureHolderInterfaceProtocol +import MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol +import kotlinx.cinterop.addressOf +import kotlinx.cinterop.usePinned +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.launch +import platform.Foundation.NSData +import platform.Foundation.create +import platform.darwin.NSObject + +internal class MapDataProviderLocalDataProviderImplementation( + private val dataProvider: MapDataProviderProtocol, +) : NSObject(), MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol { + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default) + + override fun getStyleJson(): String? = dataProvider.getStyleJson() + + override fun loadGeojson(sourceName: String, url: String): DJFuture { + val promise = DJPromise() + scope.launch { + val result = runCatching { dataProvider.loadGeojson(sourceName, url) }.getOrNull() + val data = result?.toNSData() + promise.setValue(MCDataLoaderResult(data = data, etag = null, status = MCLoaderStatusOK, errorCode = null)) + } + return promise.getFuture() + } + + override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): DJFuture { + val promise = DJPromise() + scope.launch { + val result = runCatching { dataProvider.loadSpriteAsync(spriteId, url, scale) }.getOrNull() + val holder = result?.toNSData() + ?.let { MCMapCoreObjCFactory.createTextureHolderWithData(it) as? MCTextureHolderInterfaceProtocol } + promise.setValue(MCTextureLoaderResult(data = holder, etag = null, status = MCLoaderStatusOK, errorCode = null)) + } + return promise.getFuture() + } + + override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): DJFuture { + val promise = DJPromise() + scope.launch { + val result = runCatching { dataProvider.loadSpriteJsonAsync(spriteId, url, scale) }.getOrNull() + val data = result?.toNSData() + promise.setValue(MCDataLoaderResult(data = data, etag = null, status = MCLoaderStatusOK, errorCode = null)) + } + return promise.getFuture() + } +} + +@OptIn(kotlinx.cinterop.BetaInteropApi::class) +private fun ByteArray.toNSData(): NSData { + if (isEmpty()) return NSData() + return usePinned { pinned -> + NSData.create(bytes = pinned.addressOf(0), length = size.toULong()) + } +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt new file mode 100644 index 000000000..e3b1886d7 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -0,0 +1,129 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import MapCoreObjC.MCMapCoreObjCFactory +import MapCoreSharedModule.MCFontLoaderInterfaceProtocol +import MapCoreSharedModule.MCLoaderInterfaceProtocol +import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface +import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface +import platform.Foundation.NSBundle +import platform.Foundation.NSLog +import platform.Foundation.NSNumber + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapFactory", exact = true) +actual abstract class MapFactory actual constructor( + platformContext: Any?, + coroutineScope: kotlinx.coroutines.CoroutineScope?, + lifecycle: Any?, +) { + protected val platformContext: Any? = platformContext + protected val coroutineScope: kotlinx.coroutines.CoroutineScope? = coroutineScope + protected val lifecycle: Any? = lifecycle + + actual abstract fun _createVectorLayer( + layerName: String, + dataProvider: MapDataProviderProtocol, + ): MapVectorLayer? + actual abstract fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? + actual abstract fun _createGpsLayer(): MapGpsLayer? + + actual companion object { + actual fun create( + platformContext: Any?, + coroutineScope: kotlinx.coroutines.CoroutineScope?, + lifecycle: Any?, + ): MapFactory = MapFactoryImpl(platformContext, coroutineScope, lifecycle) + } + + protected fun findMapBundle(): NSBundle? { + return sharedResourcesBundle() + } + + protected fun logMissing(resource: String) { + NSLog("MapFactory: missing %s", resource) + } + + protected fun sharedResourcesBundle(): NSBundle? { + val path = NSBundle.mainBundle.pathForResource("SharedResources", ofType = "bundle") ?: return null + return NSBundle(path) + } + +} + +private class MapFactoryImpl( + platformContext: Any?, + coroutineScope: kotlinx.coroutines.CoroutineScope?, + lifecycle: Any?, +) : MapFactory(platformContext, coroutineScope, lifecycle) { + override fun _createVectorLayer( + layerName: String, + dataProvider: MapDataProviderProtocol, + ): MapVectorLayer? { + val styleJson = dataProvider.getStyleJson() ?: run { + logMissing("style json for $layerName") + return null + } + val bundle = findMapBundle() ?: run { + logMissing("bundle for MapFonts") + return null + } + val fontLoader = MCMapCoreObjCFactory.createFontLoaderWithBundle(bundle) as? MCFontLoaderInterfaceProtocol + ?: run { + logMissing("font loader") + return null + } + val loader = MCMapCoreObjCFactory.createTextureLoader() as? MCLoaderInterfaceProtocol + ?: run { + logMissing("texture loader") + return null + } + val loaders = listOf(loader) + val provider = MapDataProviderLocalDataProviderImplementation(dataProvider) + val layer = MCTiled2dMapVectorLayerInterface.createExplicitly( + layerName, + styleJson = styleJson, + localStyleJson = NSNumber(bool = true), + loaders = loaders, + fontLoader = fontLoader, + localDataProvider = provider, + customZoomInfo = null, + symbolDelegate = null, + sourceUrlParams = null, + ) + return layer?.let { MapVectorLayerImpl(it) } + } + + override fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { + val loader = MCMapCoreObjCFactory.createTextureLoader() as? MCLoaderInterfaceProtocol + ?: run { + logMissing("texture loader") + return null + } + val loaders = listOf(loader) + val layer = MCTiled2dMapRasterLayerInterface.create( + MapTiled2dMapLayerConfigImplementation(config), + loaders = loaders, + ) + return layer?.let { MapRasterLayerImpl(it) } + } + + override fun _createGpsLayer(): MapGpsLayer? { + return MapGpsLayerImpl(null) + } +} + +private val fontNames = listOf( + "Frutiger Neue Bold", + "Frutiger Neue Condensed Bold", + "Frutiger Neue Condensed Medium", + "Frutiger Neue Condensed Regular", + "Frutiger Neue Italic", + "Frutiger Neue LT Condensed Bold", + "Frutiger Neue Light", + "Frutiger Neue Medium", + "Frutiger Neue Regular", + "FrutigerLTStd-Roman", +) diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt new file mode 100644 index 000000000..037c4ac98 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -0,0 +1,174 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import LayerGpsSharedModule.MCGpsLayerCallbackInterfaceProtocol +import LayerGpsSharedModule.MCGpsLayerInterface +import LayerGpsSharedModule.MCGpsMode +import LayerGpsSharedModule.MCGpsModeDISABLED +import LayerGpsSharedModule.MCGpsModeFOLLOW +import LayerGpsSharedModule.MCGpsModeFOLLOW_AND_TURN +import LayerGpsSharedModule.MCGpsModeSTANDARD +import LayerGpsSharedModule.MCGpsStyleInfoInterface +import LayerGpsSharedModule.MCColor +import LayerGpsSharedModule.MCTextureHolderInterfaceProtocol as GpsTextureHolderInterfaceProtocol +import MapCoreObjC.MCMapCoreObjCFactory +import MapCoreSharedModule.MCCoordinateSystemIdentifiers +import MapCoreSharedModule.MCLayerInterfaceProtocol as MapCoreLayerInterfaceProtocol +import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode +import kotlinx.cinterop.useContents +import platform.CoreLocation.CLHeading +import platform.CoreLocation.CLLocation +import platform.CoreLocation.CLLocationManager +import platform.CoreLocation.CLLocationManagerDelegateProtocol +import platform.darwin.NSObject +import platform.UIKit.UIImage +import platform.UIKit.UIImagePNGRepresentation + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapGpsLayer", exact = true) +actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _setMode(mode: GpsMode) + actual abstract fun _getMode(): GpsMode + actual abstract fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + actual abstract fun _notifyPermissionGranted() + actual abstract fun _lastLocation(): Coord? +} + +internal class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { + private val gpsLayer: MCGpsLayerInterface = + requireNotNull(MCGpsLayerInterface.create(styleInfo = defaultStyle())) + private val locationManager = CLLocationManager() + private val locationDelegate = GpsLocationDelegate(this) + private val callbackHandler = GpsLayerCallbackHandler(this) + private var modeListener: ((GpsMode) -> Unit)? = null + private var lastKnownLocation: Coord? = null + + init { + gpsLayer.setCallbackHandler(callbackHandler) + gpsLayer.enableHeading(true) + locationManager.delegate = locationDelegate + locationManager.desiredAccuracy = platform.CoreLocation.kCLLocationAccuracyBest + locationManager.headingFilter = 1.0 + } + + override fun _setMode(mode: GpsMode) { + gpsLayer.setMode(mode.asLayerMode()) + } + + override fun _getMode(): GpsMode = gpsLayer.getMode().asSharedMode() + + override fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { + modeListener = listener + } + + override fun _notifyPermissionGranted() { + locationManager.startUpdatingLocation() + locationManager.startUpdatingHeading() + } + + override fun _lastLocation(): Coord? = lastKnownLocation + + internal fun layerInterface(): MapCoreLayerInterfaceProtocol? = + gpsLayer.asLayerInterface() as? MapCoreLayerInterfaceProtocol + + internal fun updateLocation(location: CLLocation) { + val coord = location.coordinate.useContents { + GpsCoord( + systemIdentifier = MCCoordinateSystemIdentifiers.EPSG4326(), + x = longitude, + y = latitude, + z = location.altitude, + ) + } + gpsLayer.setDrawPoint(shouldDrawHeading()) + gpsLayer.setDrawHeading(shouldDrawHeading()) + gpsLayer.updatePosition(coord, horizontalAccuracyM = location.horizontalAccuracy) + lastKnownLocation = Coord( + systemIdentifier = coord.systemIdentifier(), + x = coord.x(), + y = coord.y(), + z = coord.z(), + ) + } + + internal fun updateHeading(heading: Double) { + gpsLayer.updateHeading(heading.toFloat()) + } + + internal fun handleModeChanged(mode: MCGpsMode) { + modeListener?.invoke(mode.asSharedMode()) + } + + private fun shouldDrawHeading(): Boolean = true +} + +private class GpsLayerCallbackHandler( + private val layer: MapGpsLayerImpl, +) : NSObject(), MCGpsLayerCallbackInterfaceProtocol { + override fun modeDidChange(mode: MCGpsMode) { + layer.handleModeChanged(mode) + } + + override fun onPointClick(coordinate: GpsCoord) { + // no-op + } +} + +private class GpsLocationDelegate( + private val layer: MapGpsLayerImpl, +) : NSObject(), CLLocationManagerDelegateProtocol { + override fun locationManager(manager: CLLocationManager, didUpdateLocations: List<*>) { + val location = didUpdateLocations.lastOrNull() as? CLLocation ?: return + layer.updateLocation(location) + } + + override fun locationManager(manager: CLLocationManager, didUpdateHeading: CLHeading) { + layer.updateHeading(didUpdateHeading.trueHeading) + } + + override fun locationManager(manager: CLLocationManager, didFailWithError: platform.Foundation.NSError) { + layer._setMode(GpsMode.DISABLED) + } +} + +private fun GpsMode.asLayerMode(): MCGpsMode = when (this) { + GpsMode.DISABLED -> MCGpsModeDISABLED + GpsMode.STANDARD -> MCGpsModeSTANDARD + GpsMode.FOLLOW -> MCGpsModeFOLLOW +} + +private fun MCGpsMode.asSharedMode(): GpsMode = when (this) { + MCGpsModeDISABLED -> GpsMode.DISABLED + MCGpsModeSTANDARD -> GpsMode.STANDARD + MCGpsModeFOLLOW -> GpsMode.FOLLOW + MCGpsModeFOLLOW_AND_TURN -> GpsMode.FOLLOW + else -> GpsMode.STANDARD +} + +private fun defaultStyle(): MCGpsStyleInfoInterface? { + val pointTexture = loadTexture("ic_gps_point") + val headingTexture = loadTexture("ic_gps_direction") + val accuracyColor = MCColor(r = 112f / 255f, g = 173f / 255f, b = 204f / 255f, a = 0.2f) + return MCGpsStyleInfoInterface.create(pointTexture, headingTexture = headingTexture, courseTexture = null, accuracyColor = accuracyColor) +} + +private fun loadTexture(name: String): GpsTextureHolderInterfaceProtocol? { + val bundle = findBundleWithImage(name) ?: return null + val image = UIImage.imageNamed(name, inBundle = bundle, compatibleWithTraitCollection = null) ?: return null + val data = UIImagePNGRepresentation(image) ?: return null + return MCMapCoreObjCFactory.createTextureHolderWithData(data) as? GpsTextureHolderInterfaceProtocol +} + +private fun findBundleWithImage(name: String): platform.Foundation.NSBundle? { + val bundles = (platform.Foundation.NSBundle.allBundles + platform.Foundation.NSBundle.allFrameworks) + .mapNotNull { it as? platform.Foundation.NSBundle } + for (bundle in bundles) { + val image = UIImage.imageNamed(name, inBundle = bundle, compatibleWithTraitCollection = null) + if (image != null) return bundle + } + return null +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt new file mode 100644 index 000000000..3bcfa062b --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt @@ -0,0 +1,61 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import MapCoreSharedModule.MCMapInterface + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapInterface", exact = true) +actual abstract class MapInterface actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _addVectorLayer(layer: MapVectorLayer?) + actual abstract fun _removeVectorLayer(layer: MapVectorLayer?) + actual abstract fun _addRasterLayer(layer: MapRasterLayer?) + actual abstract fun _removeRasterLayer(layer: MapRasterLayer?) + actual abstract fun _addGpsLayer(layer: MapGpsLayer?) + actual abstract fun _removeGpsLayer(layer: MapGpsLayer?) + actual abstract fun _getCamera(): MapCameraInterface? + + actual companion object { + actual fun create(nativeHandle: Any?): MapInterface = MapInterfaceImpl(nativeHandle) + } +} + +private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) { + private val nativeMapInterface = nativeHandle as? MCMapInterface + private val cameraInterface = MapCameraInterfaceImpl(nativeMapInterface?.getCamera()) + + override fun _addVectorLayer(layer: MapVectorLayer?) { + val handle = layer as? MapVectorLayerImpl ?: return + handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } + } + + override fun _removeVectorLayer(layer: MapVectorLayer?) { + val handle = layer as? MapVectorLayerImpl ?: return + handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } + } + + override fun _addRasterLayer(layer: MapRasterLayer?) { + val handle = layer ?: return + handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } + } + + override fun _removeRasterLayer(layer: MapRasterLayer?) { + val handle = layer ?: return + handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } + } + + override fun _addGpsLayer(layer: MapGpsLayer?) { + val handle = layer as? MapGpsLayerImpl ?: return + handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } + } + + override fun _removeGpsLayer(layer: MapGpsLayer?) { + val handle = layer as? MapGpsLayerImpl ?: return + handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } + } + + override fun _getCamera(): MapCameraInterface? = cameraInterface +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt new file mode 100644 index 000000000..d27e0487d --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt @@ -0,0 +1,18 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapRasterLayer", exact = true) +actual open class MapRasterLayer actual constructor( + nativeHandle: Any?, +) { + private val layer = nativeHandle as? MCTiled2dMapRasterLayerInterface + + internal fun layerInterface() = layer?.asLayerInterface() +} + +internal class MapRasterLayerImpl(nativeHandle: Any?) : MapRasterLayer(nativeHandle) diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt new file mode 100644 index 000000000..5e088172f --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt @@ -0,0 +1,109 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCCoordinateConversionHelperInterface +import MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol +import MapCoreSharedModule.MCTiled2dMapVectorSettings +import MapCoreSharedModule.MCTiled2dMapZoomInfo +import MapCoreSharedModule.MCTiled2dMapZoomLevelInfo +import kotlin.math.pow +import platform.darwin.NSObject + +internal class MapTiled2dMapLayerConfigImplementation( + private val config: MapTiled2dMapLayerConfig, +) : NSObject(), MCTiled2dMapLayerConfigProtocol { + private val coordinateConverter = MCCoordinateConversionHelperInterface.independentInstance() + + override fun getCoordinateSystemIdentifier(): Int = config.coordinateSystemIdentifier + + override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { + var url = config.urlFormat + val tilesPerAxis = 2.0.pow(zoom.toDouble()) + + val bounds = config.bounds + val wmMinX = bounds.topLeft.x + val wmMaxX = bounds.bottomRight.x + val wmMaxY = bounds.topLeft.y + val wmMinY = bounds.bottomRight.y + + val totalWidth = wmMaxX - wmMinX + val totalHeight = wmMaxY - wmMinY + + val tileWidth = totalWidth / tilesPerAxis + val tileHeight = totalHeight / tilesPerAxis + + val wmMinTileX = wmMinX + x.toDouble() * tileWidth + val wmMaxTileX = wmMinX + (x + 1.0) * tileWidth + val wmMaxTileY = wmMaxY - y.toDouble() * tileHeight + val wmMinTileY = wmMaxY - (y + 1.0) * tileHeight + + val wmTopLeft = Coord( + systemIdentifier = config.coordinateSystemIdentifier, + x = wmMinTileX, + y = wmMaxTileY, + z = 0.0, + ) + val wmBottomRight = Coord( + systemIdentifier = config.coordinateSystemIdentifier, + x = wmMaxTileX, + y = wmMinTileY, + z = 0.0, + ) + + val targetSystem = config.bboxCoordinateSystemIdentifier + val topLeft = coordinateConverter?.convert(targetSystem, coordinate = wmTopLeft) ?: wmTopLeft + val bottomRight = coordinateConverter?.convert(targetSystem, coordinate = wmBottomRight) ?: wmBottomRight + + val bboxString = "${topLeft.x},${bottomRight.y},${bottomRight.x},${topLeft.y}" + + url = url.replace("{bbox}", bboxString) + url = url.replace("{width}", config.tileWidth.toString()) + url = url.replace("{height}", config.tileHeight.toString()) + url = url.replace("{WIDTH}", config.tileWidth.toString()) + url = url.replace("{HEIGHT}", config.tileHeight.toString()) + return url + } + + override fun getZoomLevelInfos(): List { + return (config.minZoomLevel..config.maxZoomLevel).map { getZoomLevelInfo(it) } + } + + override fun getVirtualZoomLevelInfos(): List { + val minZoom = config.minZoomLevel + if (minZoom <= 0) return emptyList() + return (0 until minZoom).map { getZoomLevelInfo(it) } + } + + override fun getZoomInfo(): MCTiled2dMapZoomInfo { + val info = config.zoomInfo + return MCTiled2dMapZoomInfo( + zoomLevelScaleFactor = info.zoomLevelScaleFactor.toFloat(), + numDrawPreviousLayers = info.numDrawPreviousLayers, + numDrawPreviousOrLaterTLayers = info.numDrawPreviousOrLaterTLayers, + adaptScaleToScreen = info.adaptScaleToScreen, + maskTile = info.maskTile, + underzoom = info.underzoom, + overzoom = info.overzoom, + ) + } + + override fun getLayerName(): String = config.layerName + + override fun getVectorSettings(): MCTiled2dMapVectorSettings? = null + + override fun getBounds(): RectCoord? = config.bounds + + private fun getZoomLevelInfo(zoomLevel: Int): MCTiled2dMapZoomLevelInfo { + val tileCount = 2.0.pow(zoomLevel.toDouble()) + val zoom = config.baseZoom / tileCount + val width = config.baseWidth / tileCount + return MCTiled2dMapZoomLevelInfo( + zoom = zoom, + tileWidthLayerSystemUnits = width.toFloat(), + numTilesX = tileCount.toInt(), + numTilesY = tileCount.toInt(), + numTilesT = 1, + zoomLevelIdentifier = zoomLevel, + bounds = config.bounds, + ) + } +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt new file mode 100644 index 000000000..a86446bba --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -0,0 +1,45 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface +import MapCoreSharedModule.MCVectorLayerFeatureInfoValue + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapVectorLayer", exact = true) +actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { + protected val nativeHandle: Any? = nativeHandle + + actual abstract fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) + actual abstract fun _setGlobalState(state: Map) +} + +internal class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { + private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface + + override fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { + layer?.setSelectionDelegate(delegate) + } + + override fun _setGlobalState(state: Map) { + val mapped = mutableMapOf() + state.forEach { (key, value) -> + mapped[key] = value.asMapCore() + } + layer?.setGlobalState(mapped) + } + + internal fun layerInterface() = layer?.asLayerInterface() +} + +private fun MapVectorLayerFeatureInfoValue.asMapCore() = + MCVectorLayerFeatureInfoValue( + stringVal = stringVal, + doubleVal = null, + intVal = null, + boolVal = null, + colorVal = null, + listFloatVal = null, + listStringVal = listStringVal, + ) diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt new file mode 100644 index 000000000..575fbba02 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt @@ -0,0 +1,56 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import MapCoreSharedModule.MCVectorLayerFeatureInfo +import MapCoreSharedModule.MCVectorLayerFeatureInfoValue +import MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapVectorLayerSelectionCallbackProxy", exact = true) +actual class MapVectorLayerSelectionCallbackProxy actual constructor( + handler: MapVectorLayerSelectionCallback, +) : NSObject(), MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol { + actual val handler: MapVectorLayerSelectionCallback = handler + override fun didSelectFeature(featureInfo: MCVectorLayerFeatureInfo, layerIdentifier: String, coord: Coord): Boolean { + val sharedFeatureInfo = featureInfo.asShared(layerIdentifier) + return handler._didSelectFeature(featureInfo = sharedFeatureInfo, coord = coord) + } + + override fun didMultiSelectLayerFeatures( + featureInfos: List<*>, + layerIdentifier: String, + coord: Coord, + ): Boolean { + return handler._didMultiSelectLayerFeatures(layerIdentifier = layerIdentifier, coord = coord) + } + + override fun didClickBackgroundConfirmed(coord: Coord): Boolean { + return handler._didClickBackgroundConfirmed(coord = coord) + } +} + +private fun MCVectorLayerFeatureInfo.asShared(layerIdentifier: String): MapVectorLayerFeatureInfo { + val props = mutableMapOf() + for (entry in properties.entries) { + val key = entry.key as? String ?: continue + val value = entry.value as? MCVectorLayerFeatureInfoValue ?: continue + props[key] = value.asShared() + } + return MapVectorLayerFeatureInfo( + identifier = identifier, + layerIdentifier = layerIdentifier, + properties = props, + ) +} + +private fun MCVectorLayerFeatureInfoValue.asShared(): MapVectorLayerFeatureInfoValue { + val stringValue = stringVal + ?: intVal?.stringValue + ?: doubleVal?.stringValue + ?: boolVal?.stringValue + val list = listStringVal?.mapNotNull { it as? String } + return MapVectorLayerFeatureInfoValue(stringVal = stringValue, listStringVal = list) +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt new file mode 100644 index 000000000..a2b34c227 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt @@ -0,0 +1,21 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +import MapCoreObjC.MCMapViewObjC +import MapCoreSharedModule.MCMapInterface +import platform.UIKit.UIView + +actual typealias PlatformMapView = UIView + +@OptIn(ExperimentalObjCName::class) +@ObjCName("MapViewWrapper", exact = true) +actual class MapViewWrapper actual constructor() { + private val mapView = MCMapViewObjC() + @Suppress("CAST_NEVER_SUCCEEDS") + private val mapInterfaceImplementation = MapInterface.create(mapView.mapInterface as MCMapInterface) + + actual val view: UIView = mapView + actual val mapInterface: MapInterface = mapInterfaceImplementation +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt new file mode 100644 index 000000000..5d87abc56 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCRectCoord + +actual typealias RectCoord = MCRectCoord diff --git a/src/swift/MapCoreKmp/StartYourBridgeHere.swift b/src/swift/MapCoreKmp/StartYourBridgeHere.swift new file mode 100644 index 000000000..057ec9525 --- /dev/null +++ b/src/swift/MapCoreKmp/StartYourBridgeHere.swift @@ -0,0 +1,15 @@ +import Foundation +/** +This is a starting class to set up your bridge. +Ensure that your class is public and has the @objcMembers / @objc annotation. +This file has been created because the folder is empty. +Ignore this file if you don't need it. +**/ + +/** +@objcMembers public class StartHere: NSObject { + public override init() { + super.init() + } +} +**/ From 534004d5bcd6c27747ab324c8427a5aa71f67d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 09:09:11 +0100 Subject: [PATCH 03/63] kmp: set group id --- build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index a744e905f..34c8b8615 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,6 +16,8 @@ import org.jetbrains.kotlin.gradle.tasks.CInteropProcess import java.net.URI import javax.inject.Inject +group = "io.openmobilemaps.mapscore" + val mapCoreCheckoutPath = project.layout.projectDirectory.asFile.absolutePath val mapCoreMetalToolchain = providers.environmentVariable("MAPCORE_METAL_TOOLCHAIN") .orElse(providers.gradleProperty("mapCoreMetalToolchain")) From 26a8e5e39103e61d289892e2d0e64b1769124962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 09:24:59 +0100 Subject: [PATCH 04/63] kmp: move sources to kmp directory --- build.gradle.kts | 5 +++++ .../mapscore/kmp/core/feature/map/interop/Coord.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt | 0 .../MapDataProviderLocalDataProviderImplementation.kt | 0 .../kmp/core/feature/map/interop/MapFactoryImplementation.kt | 0 .../kmp/core/feature/map/interop/MapImplementations.kt | 0 .../map/interop/MapTiled2dMapLayerConfigImplementation.kt | 0 .../map/interop/MapVectorLayerSelectionCallbackProxy.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt | 0 .../mapscore/kmp/core/feature/map/interop/RectCoord.kt | 0 .../mapscore/kmp/core/feature/map/interop/Coord.kt | 0 .../kmp/core/feature/map/interop/MapCameraInterface.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt | 0 .../kmp/core/feature/map/interop/MapDataProviderProtocol.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapFactory.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapInterface.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt | 0 .../kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt | 0 .../core/feature/map/interop/MapVectorLayerFeatureInfo.kt | 0 .../feature/map/interop/MapVectorLayerSelectionCallback.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt | 0 .../mapscore/kmp/core/feature/map/interop/RectCoord.kt | 0 .../mapscore/kmp/core/feature/map/model/GpsMode.kt | 0 .../mapscore/kmp/core/feature/map/interop/Coord.kt | 0 .../mapscore/kmp/core/feature/map/interop/GpsCoord.kt | 0 .../feature/map/interop/MapCameraInterfaceImplementation.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt | 0 .../MapDataProviderLocalDataProviderImplementation.kt | 0 .../kmp/core/feature/map/interop/MapFactoryImplementation.kt | 0 .../core/feature/map/interop/MapGpsLayerImplementation.kt | 0 .../core/feature/map/interop/MapInterfaceImplementation.kt | 0 .../core/feature/map/interop/MapRasterLayerImplementation.kt | 0 .../map/interop/MapTiled2dMapLayerConfigImplementation.kt | 0 .../core/feature/map/interop/MapVectorLayerImplementation.kt | 0 .../map/interop/MapVectorLayerSelectionCallbackProxy.kt | 0 .../mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt | 0 .../mapscore/kmp/core/feature/map/interop/RectCoord.kt | 0 {src => kmp}/swift/MapCoreKmp/StartYourBridgeHere.swift | 0 40 files changed, 5 insertions(+) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt (100%) rename {src => kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt (100%) rename {src => kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt (100%) rename {src => kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt (100%) rename {src => kmp}/swift/MapCoreKmp/StartYourBridgeHere.swift (100%) diff --git a/build.gradle.kts b/build.gradle.kts index 34c8b8615..297f76807 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -68,17 +68,22 @@ kotlin { sourceSets { val commonMain by getting { + kotlin.srcDir("kmp/commonMain/kotlin") dependencies { api(libs.kotlinx.coroutines) } } val androidMain by getting { + kotlin.srcDir("kmp/androidMain/kotlin") dependencies { api(libs.openmobilemaps.mapscore) api(libs.openmobilemaps.layer.gps) implementation(libs.androidx.lifecycle.viewmodelKtx) } } + val iosMain by getting { + kotlin.srcDir("kmp/iosMain/kotlin") + } val iosArm64Main by getting { languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt diff --git a/src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt similarity index 100% rename from src/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt diff --git a/src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt similarity index 100% rename from src/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt similarity index 100% rename from src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt diff --git a/src/swift/MapCoreKmp/StartYourBridgeHere.swift b/kmp/swift/MapCoreKmp/StartYourBridgeHere.swift similarity index 100% rename from src/swift/MapCoreKmp/StartYourBridgeHere.swift rename to kmp/swift/MapCoreKmp/StartYourBridgeHere.swift From 1ea9d5a848d06623bf79e9b0e7fb9dcb0c40ae2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 09:26:28 +0100 Subject: [PATCH 05/63] kmp: inline plugin and dependency versions --- build.gradle.kts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 297f76807..a34799384 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,9 +33,9 @@ val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARG .orElse("air64-apple-ios26.0") plugins { - alias(libs.plugins.kotlin.multiplatform) - alias(libs.plugins.android.library) - alias(libs.plugins.spmForKmp) + id("org.jetbrains.kotlin.multiplatform") version "2.3.0" + id("com.android.library") version "8.12.0" + id("io.github.frankois944.spmForKmp") version "1.4.6" } @OptIn(ExperimentalKotlinGradlePluginApi::class) @@ -70,15 +70,15 @@ kotlin { val commonMain by getting { kotlin.srcDir("kmp/commonMain/kotlin") dependencies { - api(libs.kotlinx.coroutines) + api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2") } } val androidMain by getting { kotlin.srcDir("kmp/androidMain/kotlin") dependencies { - api(libs.openmobilemaps.mapscore) - api(libs.openmobilemaps.layer.gps) - implementation(libs.androidx.lifecycle.viewmodelKtx) + api("io.openmobilemaps:mapscore:3.6.0") + api("io.openmobilemaps:layer-gps:3.6.0") + implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.3") } } val iosMain by getting { From f1fab0413e37357f71e1b9c7b98de49b7e5d3b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 09:29:07 +0100 Subject: [PATCH 06/63] kmp: add settings with plugin repos --- settings.gradle.kts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 settings.gradle.kts diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..f5330b064 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,16 @@ +rootProject.name = "maps-core" + +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } +} From f278462b3ad4d8f21cd0ee41bc16c593e95180d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 09:39:14 +0100 Subject: [PATCH 07/63] kmp: define iosMain source set --- build.gradle.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index a34799384..45d0dbe19 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -81,13 +81,15 @@ kotlin { implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.3") } } - val iosMain by getting { + val iosMain by creating { kotlin.srcDir("kmp/iosMain/kotlin") } val iosArm64Main by getting { + dependsOn(iosMain) languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } val iosSimulatorArm64Main by getting { + dependsOn(iosMain) languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } } From a616aad26815bee1035b9299b1ed7d1441fc7c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 09:40:21 +0100 Subject: [PATCH 08/63] kmp: wire iosMain and enable AndroidX --- build.gradle.kts | 1 + gradle.properties | 1 + 2 files changed, 2 insertions(+) create mode 100644 gradle.properties diff --git a/build.gradle.kts b/build.gradle.kts index 45d0dbe19..03157e6db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -82,6 +82,7 @@ kotlin { } } val iosMain by creating { + dependsOn(commonMain) kotlin.srcDir("kmp/iosMain/kotlin") } val iosArm64Main by getting { diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..5bac8ac50 --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +android.useAndroidX=true From 79b0230dcf0577301a3ac3cd21c46fb5811f308d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 14:49:35 +0100 Subject: [PATCH 09/63] mapcore: update font loader bundle path --- build.gradle.kts | 2 + ios/maps/MCFontLoader.swift | 29 ++++++++--- ios/objc/MCMapCoreObjCFactory.m | 5 ++ ios/objc/include/MCMapCoreObjCFactory.h | 2 + .../map/interop/MapFactoryImplementation.kt | 51 +++++++++++-------- .../feature/map/interop/MapImplementations.kt | 14 ++--- .../MapTiled2dMapLayerConfigImplementation.kt | 4 +- .../map/interop/MapFactoryImplementation.kt | 3 +- .../map/interop/MapGpsLayerImplementation.kt | 2 +- .../interop/MapRasterLayerImplementation.kt | 2 +- .../MapTiled2dMapLayerConfigImplementation.kt | 2 +- .../interop/MapVectorLayerImplementation.kt | 2 +- kmp/swift/MapCoreKmp/Bundle+Shared.swift | 7 +++ 13 files changed, 81 insertions(+), 44 deletions(-) create mode 100644 kmp/swift/MapCoreKmp/Bundle+Shared.swift diff --git a/build.gradle.kts b/build.gradle.kts index 03157e6db..7c5d3ca82 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -78,7 +78,9 @@ kotlin { dependencies { api("io.openmobilemaps:mapscore:3.6.0") api("io.openmobilemaps:layer-gps:3.6.0") + implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.3") implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.3") + implementation("ch.ubique.android:djinni-support-lib:1.1.1") } } val iosMain by creating { diff --git a/ios/maps/MCFontLoader.swift b/ios/maps/MCFontLoader.swift index aa2aa7016..7a168b7d2 100644 --- a/ios/maps/MCFontLoader.swift +++ b/ios/maps/MCFontLoader.swift @@ -23,10 +23,18 @@ open class MCFontLoader: NSObject, MCFontLoaderInterface, @unchecked Sendable { // MARK: - Init private let bundle: Bundle + private let resourcePath: String? // the bundle to use for searching for fonts - public init(bundle: Bundle, preload: [String] = []) { + @objc(initWithBundle:preload:) + public convenience init(bundle: Bundle, preload: [String] = []) { + self.init(bundle: bundle, resourcePath: nil, preload: preload) + } + + @objc(initWithBundle:resourcePath:preload:) + public init(bundle: Bundle, resourcePath: String?, preload: [String] = []) { self.bundle = bundle + self.resourcePath = resourcePath pixelsPerInch = if Thread.isMainThread { MainActor.assumeIsolated { @@ -71,7 +79,7 @@ open class MCFontLoader: NSObject, MCFontLoaderInterface, @unchecked Sendable { if let fontData = fontDataDictionary[font.name] { return fontData } - if let path = bundle.path(forResource: font.name, ofType: "json") { + if let path = fontResourcePath(name: font.name, ext: "json") { do { let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .mappedIfSafe) let jsonResult = try JSONSerialization.jsonObject(with: data, options: .mutableLeaves) @@ -147,16 +155,21 @@ open class MCFontLoader: NSObject, MCFontLoaderInterface, @unchecked Sendable { return fontData } - let image = UIImage(named: font.name, in: bundle, compatibleWith: nil) - - guard let cgImage = image?.cgImage, + guard let path = fontResourcePath(name: font.name, ext: "png"), + let image = UIImage(contentsOfFile: path), + let cgImage = image.cgImage, let textureHolder = try? TextureHolder(cgImage) - else { - return nil - } + else { return nil } fontAtlasDictionary[font.name] = textureHolder return textureHolder } + + private func fontResourcePath(name: String, ext: String) -> String? { + if let resourcePath { + return bundle.path(forResource: name, ofType: ext, inDirectory: resourcePath) + } + return bundle.path(forResource: name, ofType: ext) + } } diff --git a/ios/objc/MCMapCoreObjCFactory.m b/ios/objc/MCMapCoreObjCFactory.m index e492989b5..6d2cb256e 100644 --- a/ios/objc/MCMapCoreObjCFactory.m +++ b/ios/objc/MCMapCoreObjCFactory.m @@ -13,6 +13,11 @@ @implementation MCMapCoreObjCFactory return [[MCFontLoader alloc] initWithBundle:bundle preload:@[]]; } ++ (id)createFontLoaderWithBundle:(NSBundle *)bundle + resourcePath:(NSString *)resourcePath { + return [[MCFontLoader alloc] initWithBundle:bundle resourcePath:resourcePath preload:@[]]; +} + + (id)createTextureHolderWithData:(NSData *)data { return [[TextureHolder alloc] initWithData:data]; } diff --git a/ios/objc/include/MCMapCoreObjCFactory.h b/ios/objc/include/MCMapCoreObjCFactory.h index 075483a03..50cd58531 100644 --- a/ios/objc/include/MCMapCoreObjCFactory.h +++ b/ios/objc/include/MCMapCoreObjCFactory.h @@ -7,6 +7,8 @@ NS_ASSUME_NONNULL_BEGIN + (id)createTextureLoader; + (id)createFontLoaderWithBundle:(NSBundle *)bundle; ++ (id)createFontLoaderWithBundle:(NSBundle *)bundle + resourcePath:(nullable NSString *)resourcePath; + (id)createTextureHolderWithData:(NSData *)data; @end diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index 7d3e0c609..4b454d13b 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -17,11 +17,34 @@ actual abstract class MapFactory actual constructor( coroutineScope: CoroutineScope?, lifecycle: Any?, ) { - private val context = platformContext as? Context - private val coroutineScope = coroutineScope - private val lifecycle = lifecycle as? Lifecycle + protected val context = platformContext as? Context + protected val coroutineScope = coroutineScope + protected val lifecycle = lifecycle as? Lifecycle - actual fun _createVectorLayer( + actual abstract fun _createVectorLayer( + layerName: String, + dataProvider: MapDataProviderProtocol, + ): MapVectorLayer? + + actual abstract fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? + + actual abstract fun _createGpsLayer(): MapGpsLayer? + + actual companion object { + actual fun create( + platformContext: Any?, + coroutineScope: CoroutineScope?, + lifecycle: Any?, + ): MapFactory = MapFactoryImpl(platformContext, coroutineScope, lifecycle) + } +} + +private class MapFactoryImpl( + platformContext: Any?, + coroutineScope: CoroutineScope?, + lifecycle: Any?, +) : MapFactory(platformContext, coroutineScope, lifecycle) { + override fun _createVectorLayer( layerName: String, dataProvider: MapDataProviderProtocol, ): MapVectorLayer? { @@ -42,10 +65,10 @@ actual abstract class MapFactory actual constructor( null, null, null, - )?.let { MapVectorLayerImpl(it) } + ).let { MapVectorLayerImpl(it) } } - actual fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { + override fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { val context = requireNotNull(context) { "MapFactory requires an Android Context" } val cacheDir = File(context.cacheDir, "raster").apply { mkdirs() } val loader = DataLoader(context, cacheDir, 25L * 1024 * 1024) @@ -53,7 +76,7 @@ actual abstract class MapFactory actual constructor( .let { MapRasterLayerImpl(it) } } - actual fun _createGpsLayer(): MapGpsLayer? { + override fun _createGpsLayer(): MapGpsLayer? { val context = requireNotNull(context) { "MapFactory requires an Android Context" } val locationProvider = GpsProviderType.GOOGLE_FUSED.getProvider(context) val gpsLayer = GpsLayer( @@ -67,18 +90,4 @@ actual abstract class MapFactory actual constructor( } return MapGpsLayerImpl(GpsLayerHandle(gpsLayer, locationProvider)) } - - actual companion object { - actual fun create( - platformContext: Any?, - coroutineScope: CoroutineScope?, - lifecycle: Any?, - ): MapFactory = MapFactoryImpl(platformContext, coroutineScope, lifecycle) - } } - -private class MapFactoryImpl( - platformContext: Any?, - coroutineScope: CoroutineScope?, - lifecycle: Any?, -) : MapFactory(platformContext, coroutineScope, lifecycle) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt index 96f7f8848..c9099e66b 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt @@ -45,13 +45,11 @@ private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) } override fun _addRasterLayer(layer: MapRasterLayer?) { - val handle = layer as? MapRasterLayer ?: return - handle.layerInterface()?.let { mapView?.addLayer(it) } + layer?.layerInterface()?.let { mapView?.addLayer(it) } } override fun _removeRasterLayer(layer: MapRasterLayer?) { - val handle = layer as? MapRasterLayer ?: return - handle.layerInterface()?.let { mapView?.removeLayer(it) } + layer?.layerInterface()?.let { mapView?.removeLayer(it) } } override fun _addGpsLayer(layer: MapGpsLayer?) { @@ -78,7 +76,7 @@ actual abstract class MapCameraInterface actual constructor(nativeHandle: Any?) } private class MapCameraInterfaceImpl(nativeHandle: Any?) : MapCameraInterface(nativeHandle) { - private val camera = nativeHandle as? io.openmobilemaps.mapscore.map.camera.MapCamera + private val camera = nativeHandle as? io.openmobilemaps.mapscore.shared.map.MapCameraInterface override fun _setBounds(bounds: RectCoord) { camera?.setBounds(bounds) @@ -108,7 +106,7 @@ actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { actual abstract fun _setGlobalState(state: Map) } -internal class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { +class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { private val layer = nativeHandle as? MapscoreVectorLayer override fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { @@ -134,6 +132,8 @@ actual open class MapRasterLayer actual constructor(nativeHandle: Any?) { (nativeHandle as? TiledRasterLayer)?.layerInterface() } +class MapRasterLayerImpl(nativeHandle: Any?) : MapRasterLayer(nativeHandle) + actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle @@ -144,7 +144,7 @@ actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { actual abstract fun _lastLocation(): Coord? } -internal class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { +class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { private val handle = nativeHandle as? GpsLayerHandle private val gpsLayer = handle?.layer private val locationProvider = handle?.locationProvider diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt index 98e73a457..7676a8aa9 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt @@ -91,7 +91,7 @@ class MapTiled2dMapLayerConfigImplementation( override fun getVectorSettings(): Tiled2dMapVectorSettings? = null - override fun getBounds() = config.bounds.asMapscore() + override fun getBounds() = config.bounds private fun createZoomLevelInfo(zoomLevel: Int): Tiled2dMapZoomLevelInfo { val tileCount = 2.0.pow(zoomLevel.toDouble()) @@ -104,7 +104,7 @@ class MapTiled2dMapLayerConfigImplementation( numTilesY = tileCount.toInt(), numTilesT = 1, zoomLevelIdentifier = zoomLevel, - bounds = config.bounds.asMapscore(), + bounds = config.bounds, ) } } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index e3b1886d7..7a0b933a9 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -47,8 +47,7 @@ actual abstract class MapFactory actual constructor( } protected fun sharedResourcesBundle(): NSBundle? { - val path = NSBundle.mainBundle.pathForResource("SharedResources", ofType = "bundle") ?: return null - return NSBundle(path) + return MapResourceBundleRegistry.bundleProvider?.invoke() } } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt index 037c4ac98..c5b08235c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -38,7 +38,7 @@ actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { actual abstract fun _lastLocation(): Coord? } -internal class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { +class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { private val gpsLayer: MCGpsLayerInterface = requireNotNull(MCGpsLayerInterface.create(styleInfo = defaultStyle())) private val locationManager = CLLocationManager() diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt index d27e0487d..f2ce6f9e0 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt @@ -15,4 +15,4 @@ actual open class MapRasterLayer actual constructor( internal fun layerInterface() = layer?.asLayerInterface() } -internal class MapRasterLayerImpl(nativeHandle: Any?) : MapRasterLayer(nativeHandle) +class MapRasterLayerImpl(nativeHandle: Any?) : MapRasterLayer(nativeHandle) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt index 5e088172f..e866007a6 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt @@ -8,7 +8,7 @@ import MapCoreSharedModule.MCTiled2dMapZoomLevelInfo import kotlin.math.pow import platform.darwin.NSObject -internal class MapTiled2dMapLayerConfigImplementation( +class MapTiled2dMapLayerConfigImplementation( private val config: MapTiled2dMapLayerConfig, ) : NSObject(), MCTiled2dMapLayerConfigProtocol { private val coordinateConverter = MCCoordinateConversionHelperInterface.independentInstance() diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt index a86446bba..1c3b1d434 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -15,7 +15,7 @@ actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { actual abstract fun _setGlobalState(state: Map) } -internal class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { +class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface override fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { diff --git a/kmp/swift/MapCoreKmp/Bundle+Shared.swift b/kmp/swift/MapCoreKmp/Bundle+Shared.swift new file mode 100644 index 000000000..7c04bf7a7 --- /dev/null +++ b/kmp/swift/MapCoreKmp/Bundle+Shared.swift @@ -0,0 +1,7 @@ +import Foundation + +extension Bundle { + static var shared: Bundle { + Bundle.module + } +} From fff55ff2497e2f999181e9eb05a7151587704f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 14:55:37 +0100 Subject: [PATCH 10/63] mapcore: add resource bundle registry --- .../core/feature/map/interop/MapResourceBundleRegistry.kt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt new file mode 100644 index 000000000..33e68d396 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt @@ -0,0 +1,7 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import platform.Foundation.NSBundle + +object MapResourceBundleRegistry { + var bundleProvider: (() -> NSBundle?)? = null +} From bf65b313b77ba00cedb64002236f55bc4afc88b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 14:56:08 +0100 Subject: [PATCH 11/63] gradle + ignore --- .gitignore | 1 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43739 bytes gradle/wrapper/gradle-wrapper.properties | 7 + gradlew | 251 +++++++++++++++++++++++ gradlew.bat | 94 +++++++++ 5 files changed, 353 insertions(+) create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat diff --git a/.gitignore b/.gitignore index 32b70e14f..9407b7681 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,4 @@ DerivedData/ compile_commands.json cmake-build-test +/local.properties diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..980502d167d3610f88fa03b2f717935189d9fbcf GIT binary patch literal 43739 zcma&OV|1kL)-4>{b~@RPlI`agO}&qLNq0LVAdON+ZYxkG9wHh1Y?(XH82k$p_jmVdm zi@S!-+Tr)-L-!jKecV1e)7tD~6YpNnx1fAPz+2-3F=ehLkP4F%`kuCCA0o^<4|SFz z%JRrA@@qUF$g%QiEtXs#W1M0eU#+=3R?kaJ;AL_)O7q-^4h z3ZyV@;D?*d*3SnJd*`nN`@DeoA-DpvZr&qZ8hr8eC5H1ljV+R&6xCkr`ZTK1}y6(I+AOBpmD*v%HQ zMLQOWbyOT0?xxI%l;5C5%^_xv)%Gs7#m!H5{C5s4gdL>77ZF><13R$%08r2RXB!qL zm)oggrdN*5@9e?7t*3R|H_Q%0%L;z;iw##pPW0TP#20wjkX}U%%KP z;F43x7tGyxpG_~UiA{IXO?CKktzX7|WqMkXXbrIV1*&SS;=@4~%-D9YGl7n?BWk*k zCDuU1+GB~4A_)t_7W2$S(_EwTBWIULqrNfS$JcXs;gp%@nDED_bn~;NkT97~!A31N zGNckrHn>{gKYqwP6H7+|D{lQ>l=Zh|w*%(p@c`QtoDt1P^5R3cAnCnk)5A&YK(l~B0ukD#vSwwsE8y`5XddNYd% zL1&tsuVH7Y)*p0v{0!8Ln4KK&YrSgIM`mfnO~F-_OdwF8i1L_gId;JX5O$J(UwN_m zn+iPv-?1(Tk}Ms|JZA7*ZudW3v(^x__YIEVnKI+)FRAsA!}njzBtz|+FRVZQXfZr) zG63J#h;#G_b%CCIb%eF&0h%$eVZe&4!*3y|yC{>3*iTD&a^F zSpohx{U;{Uz;XaSs^f1|(o$IJpA4kCUWQ~}`GvTx9lw-K=JOi{KABDzez`iShbfz-Bch3PgjEET6RvhOQ67Q3hSna$D(^s7!W**H;_JuVqyB zE%eti3ks+y%tYx_^0Y-E-tBk#8mcOUpZUj~NYu07y=pyuNIo-d-{4>SBLUm(ts3P% zOe`gp+MY7QZjnO%L0k@*&;*^oZ-&21;2PE=3&ie1VZ*;|^+)p9X0`_N2bqXkg$#eA zY|tuN9&5DBBj0@?s5u)_Ft6Tc&2iY1j>!K6%Q~+!CYmD zf!zLeEZ!hEr79*73&7|$<4jhTqnkuXl)RH(S&3MA6>>xVr|(`^RZiu_McSpEdAyH2 z=nC%K$(^6%sM zcxDvX?*Qn|EoaQoCs(_}@huU8mXugwzGEV#+ekRmve+qFp^7~dHo~#c3aYmaqwXYe z6SD867qoY*=?XRX_#DLisQ1boo266>s>Zk$XQW0TH4dMc>z^_zGqc7s<*_>|Up*Ygs1SR$xUx-1!(?r!$(A{oY;Z`EQN=j2V2}079TcMe zzw zHEdYcJW(?BDQ$gdiSa8P94^Y>R4ZgnT(6r6lrFNFT}8hsG?PhY4ZqP{Lrj8|U5L}6 zOvwj1*fPGg-@gA(AY`Gzz%t5tUP-}k{uekvtPJljrXUZHO$(%Qx7nM{St7$lrc{Zd9>=q0SWfmTfu7LI$R2W0b?50c}3KRkm1NnGN{NwFhM37xfym+#N|G+l4;{`Crop=P^ZeXt z0xGZ8qgTIN8e5=m?%t}pfW3Y_f7z(cJJ>xs2s?NuL=(D9dn{jr|KV$}W9p+*(PM~6 zh+%zwZTNm|=RCHMY7dLsp$YWvy{s}<3A!=vpw0o0d6mW5xgarh@|#rzvrFhY4T(K7 z?WSRdb6dn?9cXD4xsF@;beW8~^wnD}WAG5O@@Rr)Xp{f&it{HLrth>}? zz>l_oI|J;iQh*`(F;uo2n-w&>CX#?KAJg%C)y(fMDOcV8wF@Jr(U_!M`oULpRPd}5 zb}#AR*yObx9^y^yU|PsGh`@ri>#^saV@^s!j$~*$YZlu-gGX>L9ae zpgPr8cD(Jrp}`pkZr~NW+jOeUaOgz*UqpuC=Up4?hsrSJRDP}bs!kW+|obs&#Ucu zTEMG8-Bn}4iT;xgEq7F4-{2zahKs`4+>HSss`?QvkYSK~_q{mDP7x))L{bq0!jCMP zH>nCcmvM)4YlO|ULAJ=sLfr$LVeho}SZ6ggo+AFtVjy|4pz)+>Ts{^!2|zt$mJ(Jv z@VxHfeP=>~e;ke>!4_lk5ie>ihFd^~_q(|qx1v0)3*zy#TR|EUs;0Ss-~=8BsEZs3 zNa5f5MYR9hFUktaNs5UotI)}c{U6VGD?2_WBTY*;120WWH90<2uf#CVynS#pPCG0) zAv-}WNdpXX8fucdU#Ladg8998zmO^z^E(DwA;z^6IAn{+@rwyr$su~lsaG*jig~eV zF@`232L>sbdEqHeK=keb$k)R`LVdp0?izhLRFkjs?;n=&>tXGk%<0XY3{7lI>5XkH z>4oiWZ4K>AWGwAW1)a=YZB6Z5L_Lg69b7E!?dXhc44s|-&nJJpbqoZWS5+~Cn&7>L1h_Ju;iqzu@*oVRq11&os;L`kquX~dp z$N&lwPOoWA^QIqDsA{IjXZ#@Xv1Qz*Du%-4kT|nQqC-50_*(=uGI6U=D?$;xPX`*A zLEI5l9dVost1%-E{Qgy72jBC#e(E3+vKlcCl1NE|@ZBn<5&JRdIWgZ!?qd?g0Q?U- zVB_f=^P)755_qO#GrfV)sCfgLm{{`k#@-_343|As%Ng|MIF#Gd3$l4^JpS;Q@E8ZG zoRq3*jL#Ezh#2Z~7srY1W0M#2Y|I7Cw30`Biyl4PjA=84+-X7vf89V;1}UXqZczBW z2;T+vDqbO8tNCMb7Vt}bLH~*bNH5qH@mIIN;p_bSNRa()B;@~JU%#o6wmhmL(gy-s zY7@0W9+aMAXJe5mEtDEV7ZN?GYV>!cX!?@&u=9XUmUiuY#vA@S#HTVbQVS!W2lprL z`IV4W6urr;^xKKYiS%^+A6@T23{l@hAHBV&sO=lL*xiDyt)en&i_ls7oHJ$*0e9<( zd+C9@T{Yl{V7zP|3QRb?%g|bKd9-$p+(@F8mMM6fG$Y{!T{Q}9W=GIx>Z{M%v}?rz z)7wQ%t-Xzf)WP(+QTgq?h!Rn|De0~0QX^>Xt82gvp(+#B&!HX^wml37YL>kT1x z%S!qWcwy~kDL>UR6>DKo;QH2l($3i2X?+{JXrmPb`Ga-`!u<^!a6q*H4fjJl7V{z! zF$%5rjd(ku*43G$DZkt_Qf&#qz$7z?8GNvB8KPZ?tPJmv14(JOtXbJjmJN=($#tD**>}mSyjKMN6Fk%wdDylGpO2bAX13-zAcRMtF2I4LoNyUMZq5Z3e z^^jDPB-#C(ItmGqcD^lzMpqP$k)!9NRl&VSuG$pSSP&-rAvseFIb-hVZBBUlN{;YL zb1jj$wyCI>Fi!KjT9GBYs#rhHLLxzm=Y|U;23j3GDke5qF^zHp2zKnUf37OBqmQHD zvdf0rT)5a3I^o_b24Psp(jZqgL1yt@$4!Q#jx|J5DD$IfeS$G5>YohehYqL>VArLW z+M0M%Fa;ZOVUCmo2s=#(Wii?G2@LMI>oOs+wubu6b=HRtK0i`~*G)?02=n`|5R$;# zQn3AuE=DkA(7Jag2gAC%`GIRyz}@4(nM|-(x<3{{>|mlPXy|5Fns> z(7%H+^WQ>Q!O+Rs)QMEk%*E8{pRjiR7g|YCK9@rkMB^0>C|a8hgnFW_`u47c!;lCw z2qq~bfy0oG^<-S!K4)s^-ju$P-#;Am1otrw_I;)w@(K{`zJ`L7!E!<7Y<`&Ie3{Pe z?)Uk84f`7e1}--?R!@x&i`DKN))H4bRFz#S6#WT)X)gg+Vh+(p@KwqqFf1^uork4T z*YG?{mY*f{bRAZ7#Db%E3bz<{sFap&QX4i7s+_9i&1>$~f@J;RkcT$JMTaujsYtjT zQYa)j>VeuB@rbIJ79l!L*Z}UuY+5DNT52{&iU z=y8<88bjAtC-GMz~ z?WYme8OXE&18Iw`zJ-6xYEBKYl|M@{W5FIDfr4=5EVc3QAn{_RpKPgm$078%va;pf zBDUBbL4hX!glnP2_>2__^j(51dJ`)7Fj}|aKJ~7B@&`4(LZ}VgskG0<)1X7+US<&( zblpns&t*D1f!=ib;m$vMsH0c5K!ykMV_B=B}P!02Q6&`eve^ z(3D5l987Q&bE)Fod-EvkHfzlLW$&nj9!ShFXlLQ}$h}T}fp{q`SXYT$#aB`GSDUda ze9~*Ev30643aNVtWed4QeJ`(UHI(m2xn>Sm?XawT;k=b*y@x6@2=0K4nFt}Tv28K0Olb68 z>YQm>noPo?ED7(q21c_qv&jjYJMYeee1z!G_lC3QXRX>=dO*mIPT@tR71HHCj5}^( z$CNJ-AO)~cjivW#3E@gMDib?>1iyAg&!j^b9r_tl8YO+^&>K2rqNz7Q$r0Rl&Jj)mr<>XI9naW; z4mQ`&fOkfFKwRjNQZ`crM(!Kg9>+`50rsI_ucXm{?3`w+IsM9HB>pHbL{r{28U%=$ zW9ap8zuolKbhZ+i!wfK2>%t zv6WkTr_MDcQy}1l?{Rq(?oLd7gx}unZ2w*Uj)oe7b@3(vzgU!1LC84X>y;)+FSx{uwqLOSWw+G2-k$VI-k|HEF zS_$Uuug>gvR3vrWWt6%$v2YJysF>`8p6LEZ=?X4^&`he9TwWi355sW8-0UX zWSHgW0!C!A(i>F3AAPq5Hq^n~XPTo%9iR6hyS?rRr}qfAIdk^NulblIaV2Wz>C@9+ z*S&MM-ZyBsKA#VkfY|mv;pho@+p5nWrt>oR`ekY738WB1hye{L6DOgkr>WQzS~%pb z6Yy1BSqNdOE7VQPK~`h9u9}vD8!22xHo(?04^uerSS1ks_{qyvmLjLUH+ zO*ze(9$VdDv#2nmQY%dJEV)qBJCXq+P8Dg_SJ_hw3YXG!)@@5;=ZHw6Q?*z~dTR_0 zYqn-tp({m{^sO%Cu+w0Qu-F)Bcre?7X_LK!yyo#AN>^$3m~3E;sOd`VRp&}gq)0CC zd4}ig#Bcqu)$?=}R(Fs^koV!}tZrwEIcJIXww94e%c@N*IJ-?5!MPDjJOc_Q>xpjw zlE-Gto0e2Ona)GW#37@lrxcuPI5VtOl)|Z%Xl?XX@%97uI;MMG=Em0WZYbo1iK>)a z>MFyJ@aRyKONq6xOE6^axqXJURvmTgs3MrVaN2ECLE+xo-r0B!`s+o<>s^w7O~mIQhax~z>d z;=zD#FW35k89Nt^Wz2Ij*92#TCKA{S8-}8La;uBHmhI$KJ@9a2lSQr6)wnp#-`BDF zWiN|cluh^aXT;1DVqz67H=Fi}O{jm9uI zGAePT1~BVDfjPnvUHeVU5jTB2w4MXxGB0vuWgW14B`U|cOo}-fw<`zyKu7f<Wru*%T{S?GMci2jVV(i^o6AGM?+jR%fulh>32< zxRE1Jbs*tP^JVQ&G88|eW9O6wrsQl@QLJ@>-s6Es7QLW-T}^k)Ohc;z>oRo%oKy6T zCI?j^rv!$MKkbT`QSfuKUnbrW?)CHvMX#7c1|>^7Y>v_ky&Af63EPUfDP;;?A#=oI z?&!L*PUxz|hdX=^L=;{%s5zNJ)ZCNat_+m}yMMtWt)5r>Ft3lnyqgYO%eZ^ELs z%%-@X5I@FIg8|6K-BO~Jx{A0wANTM%pX>DYvWT{DK7Y$XDdt+%=IH?4V@|_JC;7SK zrKI=P9O+<9xF7%h2bMG`Fk7%PB!Y^p;fW=U{CRrs=oOe+vy6eP35az8s>Tx5&);5# zL_D^?2Ls;~>vF`W-gg`;@Wt<#ZTuj$waI4O;O=+kIXKh%9|9zGTu)irlnNWodzGiJAA_=PNBKZIgni z63TJIBr44)c50k-F}?uwG;iy6XPSk7LJ^P>EXh27^~+CkMqZ^ub{-S_M^Z z@x(h(@xFI2wT5F+lP6}L{u<3GQ{#XpaU|1Rp~)d{ob8(MAy5l0^3v`Ni<3FNHghCO z1)rQ<9CKW}g2avY`MbaFtqom+@v3d2aKtWxbcB}38GJ}q{EAO9kL0}W=|-}D2B~JS zsvd;u?CiOsZF-0wD;<6wVeWn+_+*c8FJ|4_$v0y*)LB9$+IWPT@GVRZf08oyix!K# zSOo>s?tk8?W#&hHlkb0}boxN$)aOqUMWr5#6lM|UR_u-6 zIsXkY{?K^-+mw=bhk&Jb=I9@=#-SmNX#HBSZbjd>Skouau@xAWx`hTo@6PtJ<3-QX z7udgC+ok_S);a_bkP*V)>FIw|@XA^`J6qbB|5H)F+C%?OIaRimpHo2dqXUJ}P6&|e zXKx5}qu*GcZ}p#{nCUkOL=H-@ci+(c)zB=xM$0JX7v9~2m~kxgwvBitjx8^3K20NN zk>q{B>zi|wmE(LdrN8w9sI)vajVuPq+3+slPcZf*5W-NvZ zKcvBiGT2@^s>62&5-sX2=BCoA&myYp!4D>ysPo|7N13MMaY~LnY|k8hCV#s|HLEbEz))ZWGdK71H;wS(fxUKMo?lD)e)?Rdy+^J( z9$n?A8rFgvZFgVZF=AkcBAwh0%k@VH#V~UJ0nt5+LaqNZ%j7OzUo`n=;uba$Kk@cR zq$)R`bdP8TqC85&S$O>6UhxOv4C0WgBet}qPA@w8ks}dR-C+FnekgfZ_q&CPY8)n+ zTvBoE5e#-&OKb|oA-t7X)_eT3MiaJ@*ZPxd8!KFWf_K4DQ}AbEGhP4{t3IH8i~(~3 z zN(@AgbO3E7y%*C2vPFvq-r-z1zco4qELEDNghay;$QNp);0hAOk{n6N%QYT5>R>4T z1^zGm_WSp6%YGTQw7)fM|4}{ozk%y+=w$lu>%kC}FUO{U<%fWq9OH=14y*_Ww6ihQ z0UHz@Cbf`opb;Q_3dwQ}Q?lT8S|#cqM!aT!5`<3^LH*&+Kl8UAHP`R*fU{1d2#@ z=-ZuwM4AzD4gmq7oHe*(sb3kSF;q3Cv=U~utTclRdQk!sDZK`9k+zvtt;O0pWktMF zthD-Yzyc`$(KsX>eS&M8w~$~wk>Ue!7Z#T@LCi5d23hwdCcR%@6q zdDc`8GyYtrxd&>wTr~mT2VEcoj!>y6sxU*-A5i3mV8AyVL0+M*Uon7z!y!+>5UJ`} zhS1pMQ3C#b$|!CztBu2Ae3bscJf^{f@eCB9^JEgNo zxu#>Ci0(G|4y%Essi2Gn^-4c*UpU#_;UpfCm_%B*(am1)dAQ1>Otn zYZ9TmGc6gWl1p?5hO84u2-^uWia1)1jYF(~R?$>JisG1cKovcPH#f0~9#J1;TqwWi zsYF6?@9&U>lq&y1j+v*dC1FYZAnt0vHZ8y<O&1l zP+;O3u8%$|6qhSm*I>z&gW0+@o_1e1#4m%xpnnP%k33`HilA3$;hM*q?~S~_CVL0EK&`FAO9C{i%PfzYSQfq%S!u@2e5oX@ckQ#$)G_Kh? z<#nHP_XFmxcC#ryj&1RED?*+eB2+X5OwZJnK{j|mz;5ohj2p4=dsfuEBtVo0@v|EE zS+(&i+@;1N%T;gm{)t(_?BrojP=_udyXi>7rjh44mX)^a1&L0Rl_S{dnZ?@j&Z(nv zkrzAw{tFPq9LzrXUy}*nFHrpZ>BN83()}kOlwF*@DujQr*se;t^8aY*T5F$LSpt{m zSrmXAMZS*!`<0xNQ3F*I<^o z!fk%R>3q5Jx_7j63AAX);KRecX5TTVz0QN4Q)GW?rd@qndGmiwd(1-Dj6&o-){bdf@keI zSRvLNbrqGWuo=p}f>+lXEA{x~lGy-m1+=?d=6WYTo8O5KsEDz`&!} zBN2KmHK{$%J&EUd6X^qC_$5b@C>A@bVFNFmC58eb?r0de^kG6KtV5{-Npu-(F^J|5 zs`oO$nu!FKBYKE^c4;32KcL|zArzd(%n{NZJMwe0`w!PF3RTSOCjgPlBYpsdAQ74e z%7SkAMe>*Nw1kgz9|_G6N*wFBAz!Q-7S_G0nS|Y(2*dvF)szD-!c;bP?ceBHot!3sPpYNVv{_sz|+ZPWH4X%6QIy!*ZcUygz_hNdP z)wIZ?+2e1lj7sbILODbUygA_cVY^hgh3VZJ2ULB1wGZR(k~e)7IBYm z8DI&iwgp23e|?lY>IGn%FDd!q6G^VTwOn%b7_@GFR4&coC7wb-5&Alr;>An1JE!Hi`InU_2>pwVX&;uR|VHx}oEe<2SRmw@w zq6%@yC4R)@nG1!zGyVwqv)$ciV&>NPh1$?iMjd~`z_db;4gQpb=C_4G;l2YhUtC?P z9<_=%-+2O8x+oW{f)B`FZ1j@;6Q=TujVAw=jrji)RH)in|0m7Ae+-)xk$BUZ&_-cW z?a|TH=bK#G{gJ7$P)QkaaKDC4;SsGHoiwnoGwU1qgZ~^h6&ma!68;WjnxqxQCAEC2 zXLdK6OlNj}{CIiaBlq_lXY%3W@KF3HRc~!12hrA_ue9wf)duK0^AfZh8ax4LDdtcvYO8;o0viukgt=Nq3{{b1U4+dt;*Z$M|4co~paxvt z{;oorbEYF9D$xh`7JQ=9D5pFbs=fa?MEpfkKH^W__3qvHl=GHRzJog{5V?qL_gju9?fFS=yMblbzw6kkJ|>x(v?uCowNn4IIH;@CDRT(6*4I9v)UlU#&z6(_5Zxjf zfZ97qV z&E-FX8}L$T6y=s&Ry-jW^$)L6}`>+)Ss_T^!`j{c^-{(UUJ@E z5PrVh;0PdE!A%kHW*q-O%H3J*sJVL*(8-K(A7pJ;VwJhTZb~UzZu{0wBGaQQ7-f1< z+)y`txS=%=gE;Oqhn{_HMX9>8kWAz|es}L`&07L}c2|9#TbWLVz0M@>I;W!Xy$_|A zu>wUCGk9-S)8z8<^!!x*#E9sF0c;S7ZkbgaRUJGnWA{*J#7Zx-B&8Y0-Evf%e+nIH$B9FzTfc zv{{^HP;Ar4R2h&@V>;VlfI zvJ2+V5Hi@9CNj_}0yh+98-#8U zMG`82E6zUtl{Dr+#@LwDyy2ZU$#C5zUr!r{o61d$fsJ5`P_~I2lo)~5M%rpwW=R!% z@yR0h&H~;!A5b-fKh-3+pA2{L`}V`NPS;5FlFMA0F_ zkZO!}>_MgK%qrWa@w{-Y*h&3hF+(&-cuYq{y;Y@Elh*kZrma4sOp!~cfU3=fe4$At z^E2J<3}%NZ#bMEnf-kh5dz!UTn6;^ZxFt~jdy%?3(MC6CZb-raRNwEEjdB2o(Yirqkb=o}+p9DJ70IZ#h(j62M za@6*tOZ!BI(GM=WV8)0{QsRip^858DLmB^miQ1)L({d>E;5!#wcO2;F0XAQNDY$-O z9+ryu#mamgZNvlsu6lK31g?RBL*g@kZ3%r`3F}UKIO0_g%(US`7#c!&ni#aNN96S( zi{xh*r6amhu~m%0JNNor^W$h6HLj{>%H?c==F3Jr(`ebgRSNcwjMR=8dqk8Ff9E$N zC2Rk8MoNDZ%hXjV{ZRLJPk*t(kvlg_xA9!i852kB8FdZ~Jk3GCzC6bp=ss$%_u2B^ z@}4oG2yUta&C?V3yoC>V1g6AdkNkANr0SJEngXbA8n<39q7KLE3x1cB8{RoKR9F9w zh66Mqe_x{p!)kr-hq=UOcp*!Uw$LFZPB(PTk^P5Hhz;Wtb@HynHw+q)utaJsy}@I9 z?LV!$fA(-6B8(g>jKOp1jZeQ9r+pLS_8Y|OQ^u2=4R3gI&l*)U_%->RgFUzVx&78V zmoaYBaP&nRhyS`BG2RprkWau_0;L5rJ&8xHq6@FuJt(d=(ga(CgqcsDP1dP}+sY?WuT_Zs(^i%3cd~98*r|r~|PoXew`?%(}`(c7v9d0TvDC`ax>5W|(^~(>f|c z80NWeRd*o#O;}C=9e0RRLjDNjI!f~&j?;qVoyg%X(LSaQYq*lZc9Wczp>5pUmXd9( zP!kC#COFqS%ALY!Lojr(>8&`utP24}CTMe$EOZKNP>}m#kRrQIQD;|6c_E2GQRHg~ z2=EKrQ2!lA@p~I_7oM5fo6681f;|*;QBuZmJ(HIxWLTt16A-qFwr#I4`Qh+iHG9xj zS*tvob2E~7I;w~Gb}`q8J)l!AFc>>@?DKm9nVZ^R*0N6P@2`Suoy{N#68Xv!|9%`FFa1Z`bZEZC>e0KA-uGH$X*W^Z^hOl(7= z^xbE{_dHDD3FIjlXKGDO@w-@+o8?)Dzjp4e^_{rOOe?Dvhz3_JF z$Hpi#afmQMamSPkE18)K>ATPEq4*ZPVH^}p30qYhYF$KDu#IvKxhY<+*VKG3%Xc!I z5wm7$4#fcnHr1YA$B0=XeM3}8Jq?Qx%+Px=L-0{!=CP8iCDSDluG!t<`SqD>(0>E zujspe(}ucKDB7LsRHW11gE^75_=QipLi|K+*vEbfcqm>J~M)^?pqH}!)5?6CcF z+0o@Qm2~Lpu#UN9ya_U+{Ybn^zma~Mz`Z2AP69{wLek(&4u5oz2m&bY$T0yS`+N_w zx9#nvZ#6?G^irB&5K&RBTttPOv6;9D{*+Ny>yMT#IAWaVDO0F`QCl?)(X`e0-)d%i z3{6Z-XjBD#)|U99n3{>hELP5X<{X+UeHFh?gYZVChglG~Hz1W-!#o3?6Ij4G17aRj z=$&kPovjaywcFo<;Y+v{p3}dESw~foFc{QV3g{ZILzjlFf#@pb6vl?Y&ZW@fdRLtm z3|CKa;8v)%s}YhoORQp<6poPd?w4D&cM&PCw8)Y#h8>0g59s;uoi zCx-UH#+G0-UX)*mX&0#_L2UF(Qi?&cC1YBM7mZ;$;HEBhsZIdX-90l#u`@C94YYPY50Yll>6k0Z7da7afrFK#pN2oT(Jit;irjxZd0l69Fd1ko(;NTK%u9*uE%>9lv710+Bd z8GK@dIr|J}ufN6dO4ZKK6WgOdXn#=Fc@daCg<|+!xOE6foUjz>u`x=cn~qAKSjc3( z)f~$fi5le%)^MY}gpR)mola2s$f#`Zw7YMD;t%*S!+Oxb(J0WmYr(1A8m~#AZ|%*4 zVbqF5b6K0=3b9#?H+kQ5JtFY_%8zCC)Ez7IB9Y==31zAs-L`4hi!nyNdCG@_jF7lr z-4nRGondo`?aAb;Dn6H3u`IT=I|?#%#=gsUHB72sZ(z23v{d=?CUD$B#}Mt#obE8; zU>2tLvHIq*@3!a*9i#JTny(!*E0Oz}JJX^)fc~b?ug8|hK^EXv4nuCWVeXBcVkhtXhTQ45tJ34Q2h1u+eS?{%?&JBYtJHcPAwWx!uOysW?V zv4a1dApd)++1MLff3=M1zpfeBxH?<9eJxblmsto8rm6}|Bu8o{hBPS2_X4u zqsRy;NdSEOy#t_(L&_*Xf`b*jsmfNR?m9MQvc8|WHdu>)`x-0oPcxH)LB`@em6jPt zl|eo*6nI`vWUhF=IDY~eVB&&wS56+UJ=v@@cvCGslXtAo$P;M6&oXC0%ly#7626-_9bJjfWlCNIR@)xyz_rJF<{m zxf_Q$nyfc<7HV8H{HkneDn%zCY;dnLX=+1C-A#H_7zq>w5*4<3x+`H|=zLZY^u1vf zY8vC%^o9w5n&kbWWkoe!^n38|XjSCMQFge0x@QqPO8+;o9xRKhs#{IuB9q!Qs>W+K zShaNh=_v3b7!J7)72Ndx$$~eyB5mI_tvc^ypmY6?sDn(cX(7lB^Op_g&eWf*3OHFoh}1Nm|Ab0Jj$ONR$yLP zVE85i8CAF~4Z%7SBeAr8MHDPwb>)}VD2Xa*Gi8(?2kmHz9TtsOCUoZG`An6btF%wX z?gDxlx~If>lyrt>);9T|&kREiHDx3)3*qEXxl2IO#frSWkD5D-$6D9QQ6-XM9^CYs zvETTu5miIekCdce0|9EEVIQ4{gz9BK`&2{67*}Gwm-@kV%c?(Q9~t995`Es+Pi$Ba zr6;%3I+7CNK`A#KjeTk4S=g}%-ub6b1e(iAci8$GWOd;l?e1X(eb)y%6J2rvb?05p zb%B;16lr4tn$6e*ZDkQK#p~Ev232dmw@+A0gBow41E}+D)-jBB1bdTMh_N_dKU0wC z3$4umkEzq3s^Veq7iR3a6VyMA%YY^+CuLLgz?c-xS6T0jLC|SZ5)~)@_XsBJN^!GzbY7gEjOWMqG z`G1vR<+DtUv>1{Su54YBYp5^h%mg|~R}Je&n^hPG%7z4?Tb22ooRsQ#MUe>#8{Q^3 zlJTi&Si9>rPWQ)qq-iH56 z>U3}hbNvmhB2Rnyg>@74C1bv@z5NzDj8Gk{G0@}+^)ID3ZMox%{fark-^To3l;Xc) zF7man4Pb5l$OG! zP>EkCpn;YZh7GO=fL9AmMp^tND4IZ4i~Bn0c(%N=DwlxNaW&YN<6(%nwwIHzsAM}k zh?>;&$#Sj(T964ek?QkB9qmWlM?PIY-tKR!fl{wH``i%;D%3C2ZS8EKx7gBT%Z(>9 z)uzwd3BK;q(%*w>}ExCl9P3iAg1WPg?WHT3#j{lG$6L>^6J(mIBGm(=s8o*Ih>+>f{AM6jCU(U-bI4cO}GX1OxPc@%2v8okh>Ka5}ba z8y!38*tUMLZQHhO+qP||W82Q{bH00D&Uf$sVUHSPkG-DOs=caa&6@S_4T%}J18ZO& zZut-GxA1qGh&gPbnAl8s`4CL01>fw!u=_Yvncu6&=mz+bfrv%?w)%Hsyogv~8I9Q9 z{8D+ZxsRHkOX`T>24M#QyBvZ{Q!G1zbK-24uq15JeS1h~4rkVVKUz@5TnniNyWsY( z2%_?dK0|%y%CjP?u7z?~vWI__x{)|U> z`ePflYZ*wf`*y`rj)-hRT)iEdYnVM-g7?3pda)Ma@SRz4DJt-LEAyT_@@)u15uCI7 zsvtoFBE$x)0(Ve7wStMr0s2{%=tR-)d{S~-L8vSc{Db+6 z+-U~f99bLvkBh?lP%6_jx4D=l7;b4e-k-cZRNp~^y@kp1%+HsFTZMYi%vyg-Y;O9u z2DL?BY+SXHA5oN{*t2DR{2UlF$$hCacLvXNXibi(&rT?f7dtszBO!f<)}D0b&CzoA z68}0h#^<_aiJr{?pZHuIcSFV`T4)l#(l-#mW+d$)!R<_WZSq+!^sS#CBFmJBUW@ zk!9kL^~rhen&|aTkZ4}?ukZYyhsLt-IZ^+MVE*H{^BGBRDI#5?IGUlylOe}q?_P46aXe+x(v~Ep$ zyzzVOp-0au1h^-xufU+>yT$kDE@Oqh>05CEy5MX!Yoa3aQmPKRA}MXuSTTr#J8?-X zOWQy_*olV3)Q~hrx_(4wBd(Mb9^>$}n8Wt0xO#Kb(H7jCb3oF}#rAktDpHFn_Lid& zkP57IrdQ^u)!y)g11qe|bS3u|d#8i*b1{L^1z)Dd>nz>Jr!r7b&#&a+3UOaP+;&8%&B4v>>Q zk*O*5gSC}I^;~JK25O!*+m3`%-C`YRQ_)6z7?lYfdTZyJNMpytVFv|&E*>*uQ zKR+t3YY+(pK8D_efo;fmGw@#Wy9;?IF)l&?c6kr~dU0w(1?>0KoE`1K5|uz4_m~9& zCfAQ)ArSt85idpjo`a%f&!l{D=n675Ib*RNC{)HF|43sB$MX{j7)qMLd=&c6ZjQWr z0H4`o{5Z%XihdH&?4lM}H%(dL2eW4Ld`CczB!|0SNY1R;JJ65CGk3P$vwX0m$AsN4 zYXbWxUbca8U>npi-`qJTNZ$2_d!T$^VmihSw7DO!J7}*_affe+kinz8dZxKcxuvG4 zS$qRx3Dm{zAkQuWzP`mT61vNv z!TRYnV&~qrAzE+oFK&t<%5QgB++^_=Oau@?5M>t8)2)nOPnu+GryHBFK_q(+0{kMx z=u{NCs3SHYw^@YqEX>gmgztn!hCle^?+ScuP1v_dEidIBCT)A)dR}@CyjMSV3}^XY zfBQLeOxhjp_UDX%pn*s_rCHWTlti5BiFk`B%atqz8I*UROP@2!It5a+88~R-Do*J+ zg^7huJ1tb1VJjn(*Vc*;2TG8kDF;XS%Ve&Iu38s$iyFrG{>~Oh?8j9Mu!K6&)L!Ob zSEiF)Lb6FKiad?Zf65=xi;7j=qV;EV8}!%+yT`K#V6K{rb`#o?H-OstZ9!R%%8uP~ zR;VecW`N&@DfvP}A}J&|zYn(xe|e%X8HgN`5QHD=82HK!4S8CJkr~cud}<$k?b@uvA6BG7A)?V)sxsH7?m<169U6+g|nEFVRovl*mMRQtyS2; zxK&Bsp3{PtTnix;_e29-F{JHem<=7mKoj3A3NVMPPV*z5YUgF50?qD21+%KPdYR_F!_- zk}hn8VsHXukB=omnixKLB_1n5Z)^vdASKgauBb4?wS(>Ns4gJk-U^^{`sQ zDcF=NbpCyvqe_^MriX4ThrQ<$YG&OiEmAZ;y)d7AqX}hty|+j3z(iM&9#|?(KurQ5 zmH&PhCslAgD>)jp34JyQU8%;A1;iJx8pf)xXX+?a5fK3PFLzFc-aA;>DK$_-Ir{3- z!nk3{a*6_95gkvL>J^tCP)@ukt$%Pb4?f!D`G)Mq+n;h+I61~!V@2F0-PQxYl;OBh zEh-t;7mkt)(zMA}CB%O((OWs+#O23QgFxjhm%9Js6l_@fzz!T_6h|FVb;WaS#~Bw3 zQXxI^CE_4YX>1SJ$eKq8YO|zI!l26bGhq#{8AR!2c~r*P9@B92A!<@?o{;CAval;b zROBocX9xCdMFzToJ=LWL&ggri>8O*pHn0lgk4tT8Xj%K$j#LA-0#@VxkfB>DNV9Tv zqGMVdAA0kx%vV@qxBIara4>Cf8c}+RkN&bvbEe{|f82FZgl`Y(94GfN%rHR;ISOV9y^eg@$7i_i`@po>?rtuvthOxOGEGo) zSF^QkwffM_!2{ALZV@`dbe0st6OZI2YTwMs z0L?64=s$dn8n6=|fWQR)sZaE{C8_|+&^gYctX<)c^6ch_h?U2J8gv%w9&gba@IFL1 z5k}^tcX$EpjTtJFoPaiyQ=Z~`B|s;3SsLOwVKTmgnryqdOQEJi*lk6A#E+Y(ila(| zIo-+NkY*7Y!Z3N<5lcO6b*3*)v6q?(JqrHp zC>;)^xO0yG{;L-^98y20&V+<5->hzyX+X8&7SYPZT*`6MYBnK-RC~mcC$fxcs6F6% zpZT{6{jlG)98BTiBA@B7Bsm+uoTiqqmRr8);pMIgrp=hMnF1Xc^kkBlilv$V zfQpR9BHg-lsiITkBAHl|y@%x3>Z7aT-WMf1%m(@4wjzItkZ`gvi%cy6J@(8BheYwW zVd)U$6Hj*6L*r#1(gdG2=_j$4Mt=Mu=YFkOz}$3P32A%KUwL2@rp8xpQw7EXA>?mD z6S$AGLga5@IX_n9Z|N7YAXOxKW#49QY2T2ZIpq@N^Md3g*MQvu&(;d-k?~r1w_baSp!@lux!pU`pkn^ z;#CinDNCD}@!XbyPgvURAE)a|&7*|hW^AJ=RSm2~+LV=5(U;rY;g#nxhL&IUO|pib zMcp>YoffeN8Ofvb@%_yxY%j!42OYF8bV1=H0M=+bVezrN-t74uaZ_-1tMT1pnHtyv znQK_^Oi7E2b2V`7U#@vZ$mjLX=CER);~Nr1`1QfGC9VDf_*9Mg1e4b4vNt5Z)bx_! zjI~V$sXZcKD7(Z5ZCCQL54lC_YMy^Jy;oChDGUGmx;}M%%{)owKu=hn{B8op?JDRh z{^V>ml301+#UjAi4G(YwX$&zgMh41IH@syM$r;W~ti$$Qg1d9b6iSN-RVFqYNJV%CGZ@cs;v2Pu}_y)yIEB%%gbuBbXNUi@nfT4qOg#83hX6 z*5RW!rJp^u^JV@X#fYd}x0ieO-dF3EFL`#dfmX{ZCYdv&(3GIIwiEc%{|2e{iVp-#pn!m=k^fT_iSGX%y@~y|qK?WxsS9yiYh!6!TT5rV{}IVW z{~uB`&9+aTx`Mp2kqRZ$CLE?j;1FnWpAcM0F)1JG;`Zj%!q>#54IJaW&?m+SXf*jZ zkZ;mmi&@luAOo}G%$DO#yX*1h%dGCNDnp6g?KAVnXVDu;%Rm0rw&$vHy35sbvD$Lv zHkg<`W+)F4JPC|<#=0XR%M_M~r9M@*&qWxE75JPX3?zeiN2fMcRT>wuoT|${XP)IJ zj7TrV^&@e>qi|tKI2=>(62sb&Z<7OJyim3#1oq&x^{Y2}}dufW&QNs(k`V<+}dFJKL`Z}p9l zunwR7pr$9CcM?LsM0N<6G)F*l{oWYTJf4sikM1d^viDrx=ow7s_;>p~^=Kz=x%{UP z{wtTRmVZxL|A%%p{71Bl`ad0>{|$`)7s~lRPEN4~j2EtPGr#FGV`JhKO=c2(v9W|! zr+EVuU0jQnVuspgQ)UwjobgAVv{<^G!uXXZX<}Z# z5T7LncOVN8)m3I(8#AoF$xCqo#Z!-o>_I zk8Q)=e?-_OY1xvuRrAp1k)jlQv#oj8Y8Z z9qr_Cl8mLMocg0k$Xx}x61=GC@~BHh8U@Ci;>v-INJOWY$WfI@GghWYc65*sHHCeW zX9^$EyOdmwI{e0svAa9DO!J(9t*La%7LcKn3Y;gD2M_zxd2i!Uhsvl6WS3h~Qx>6< zQ|2%9l6^4M^7X=(tvJ$E8QY&O9B&y*&h?BsG}xD}pA>n6l`9It*Cvih^;w`ZqPbZe z5kT>agWhBJ2yADL7|%bK>R-K$kt!M?|ST+Zj=z3`2r+h zKaoO~BXM|SmXju7W0%_Nr2-^hEQD=XJe9C)P139V=$a;ksR7U~2nhYT=)xt%gmKb} z6GEYoR(DU(a72`~vt&+6`LL=RXaP_(4TBm=a=}6QXk1e)tHg=SDB~mI#F3Y-sDe+Y zCVk+rs5}N7dXErO0=#us6*Yh4Z86OtgEo`~4O%%_z0{?SA2+~*ZTg_>d2uF5q2J4C zPhf5H*rEAsX-DdvJ*3DB;Yh%Lz&4f}0x(L@$TsM}9g32S5xc@|RL`cJCZ%;WWf5}= z6w-Hqk7N|rDvTkBYNT6k<8(F)uH{R z=%8hfTBgOxuZ-Y{T^G2OI|9G6#|dZ=3_mVAl{>O`=qwbBz*oWIUdo(kx>L)~ngjIR zD|c*-F72+zpU|F-J2K6sZfRvL4Qq_{3jS=O9jnM5xI=n6_iBLY@n>_$@T|qUZ4PW0mJZ&kD;>%q`oS za!|WQr3gwPK({E;&UKY^p9@Eqr0u>5KUs_6Ue4TR)3~AW0c==-*>dxP)V#vECJBN> z!Lm%jfQPmeA4v5vF{bDUAP%)`{(=QeUg+u|!H*hqKKar))7yjvY1GxKRD6uBrFp8P z5UUynExVg@J=1loFAWdHKfdtktKzBRoiDgjeU=dxC|L!%xF29#bjr`Diy6N7x+M(6 znP_WhKJy9wK^PFT{;7)eJ<_vfk7V!AWni^qE9j5wTXmB8ruhrPTr~vS^9T%q_gvkN z&K|O-=QsnY+@?w=t)OGR`4X%Pbiph$OPVu|-x@Z(LbEV7y^+BB_B3hDZr;DvEjiBv zC{OH4pM_P2bho7V>!h|2;wxY<^Fe_3Mu)%W_DhSy*5k*+{65Mh`B91+iA{=RSPIs! z-s@6*=&>ufPkqy7GU+8P>Eoj!-#?^K2|)X5l|2-i$Zh6*OBIBKjE8fBVM)K}zGUNG zbq^61>)5*=A?C-r#C?P6=ST?Y(3dZY`4`24OaKi{@T~A;&M4i3y4DZha9N~`T4{l* z-+n~8`MoeSUm#4_XEud%7;a}#bGJf>0moWS5yz+EqusROIr~H|Ni9XHXG!ZSr`qHh z6=z`j4yJ*r#;VFLjbfCj5j~&UU527;X;uttkrjQ8X#iIn4yIWl!7yo>v0z|N3WnQT zuNqpmnPMO&wQ_Ab2Ud0(uN_)Wg&}A|zcNEu#G>CJ;G^<39$FgWi;XE?3EDGKScSuQ zQS${AS*pe(VS6J)bmOGZ<4e%g)SOHd3@2#R42IGej-gB*=sC>u2(k>{1-l-cW6k)K z=m#N+uwV>Yfx}n0$ZtfO@z_kE-CK}92mi3vy(w~=x$Z7-_>f>Jlf&)sg{BY&6vQ+f z`Yc7Rc|=$<37TE*n32bT<`qV|77e&OL~zCSqIADVh|85ifxWtk3z0q@b-xH454Jcq zX+MG$5KWIYa4;k0j(ZJ=W5A(*^{FRGh&?4cDKmJy$Q53umIp~Eg3bE!0{$7t+U8>Y z#qJ884j#Zpz;ZOR&AGtd1~J+(aGArglh+Xak{NcDrxX>a*!Gx?n5`w?@{t*B2OKA` zDu?g#C=4!a-B@7nlZpiHMo$x+7H`l5i}zI$7PBjoN?nvO5uRM!N(7TE{?x728%$5^ zXDP4OZX>;U@pEoc?G8WL^UZ=K(0C>i69i=6ue;#%viWVZ_MVTA&}64D>`&XSK>T$E zR-%*)7ILs*t$s9QUFI3Q74? zEkm{*Ij$@-gouFblSa(*NIE_1bbl4f-=h2IDEsq14J^J$#tEC0TSbmD^5nmL?1f7XMyN+#O?EZeT!h38>dfjg6#@U{8^eF&ujJ!@7O)Ot^JbCGXl*ouEnS?WN>2*C zG;y6g9nyly$gGDTPf~wFUdq8t{$u zqrP;U+a~^*zS=P^@HtHpp#-ti4U@bizMj%#BZw6koWxmh%b@ZdTsBf6znqsMdqIhU z0amI#IdZvNW!wl1sr+L39sTEvZZV-TU?Qqrkd1i|Nt|k7+Nx-n@ATXMr|kabO->r; zo4|*fxg-&6C0kHyVeDKj;-cg5*2tyrY$XJ9yUOLM_LDvNXMiDf3a1l7pDk&omqf)V zv4fAaz&8`fH+i<~69K9*k{KM~NfMa|kB5#k0-&JEr!jCyjL~!8Mux>4bC`m<#+ZJp zM2Z&N8&%qh9THxY2N!Njvw|9<@7zr5u3{cDMxR6K5W)fM1JJ^@H>V>@GK>glu-#y7 zXOYW5XiY#zHJutzgP`FcE>n~*JVaUT_a9IT3scji>`|so9HL~R%ZkACA)OC5v7U%& zi^)U^d`5TEpw-EfJdu*>TGIdNkRNNPeH0p}T~nQt!YEfv4k|Z-KM#Rq+H_fDsJv9c zZPV5yf(^SX;-cYu@9U4rAiK;V$ok@;qFjb{f~AqtuMZKF%35+bTO-_X=p4j&RxJ7_ zMx%$$G#{~QHVxA*VG)NNjQ{)Sbz&=MaseBxFz1Q4K#Cm#PQ0TW_Q;!=QjV9V@FkLa zUNjRJzFXQtv0PA7%fV0qnoQ~IG0T%kJuB}zAsCu77KYg;Cs+DGe&FR;IOUVe37lPL)h*(n) z6d}!r+|s$9iE*8ux%x06?0H(tR>5xMU(9-H;BYHKQ(tX`A{zV0qLkki@PZha;~>vu zq(L|On$FLbB0+)nMQI>N!rhdN3o6o2!ROd%xc8UPWJ_F}x0)o#@B?nm^>FR*Qub4k z>B_{_5C#L=A@Y5+j44GT#!_rN8D)L+G-gWHE_#yik7p>scrg_95k_a`1-z3;@Rbp zPCsETixkF8sK+)c-i#|1G+dKn4KM#|OGK;mjG*DH!bPH)pU?+V?fE9{Hjj#lUaX$4 zbIh`d4UwJOe0ZEu=&($RiCz3C&{rF~!7YB_7kpt1-u8JRd1Nd(@Y=XR?&TkU1QicG z;>qTidHFb+=t4|Hk6OgE13P~mOE<0iR?o@dkoCzMm!CQLy6@-V%`UAC(IGL#@B3b@ z`U0=#@8y*HYlZB$4D{6kr+MW7u>5-W%ITqqivc?OKv(=j$Vnma)!>P2bu#!^*lCXB z=WFn*Q>@G&%Lg5=_=gV-7@Keqy6Bn4{e9TJ0=a4EhS>H&2y8nxZTd6!aF@WN+hlq;<>(`Y+Iv~1 z8pP7@un|yReI@siJs-#6U~DXX8h&!k+3#$SzsK?Py5~2ouVxH;F<-a2uiyMYzK8NW zSv-R=yKdp!1_`8%)-i^w}`Rm{6fKZ$|g_-BjKhi}T-(`$=yB%9-cMI~}BK%9Q} zbvrIskZ*@?WV`WlrcqTpk64fy6|L5pZ-;Y&*AO=t)}a4}T4T?9-eyeQowuNz63>Sv z>YmkoC5Af(`$U~ZlYeHipb(ef$REY4%rZ*}2w^#QmzI`sL<~OW9`4{X#0-PjHp>=N zLT#I}my>0p6^L)cJHQs@(HsTy`A+NM^VuxXE7tC^-N&`L+EJgI;IG1#5>XqmOCM4Kxj(&kbfTKlbzM-2;ew55p`0)=6xCY?h2<4!=gVU#Z-*ZqA9E z)-~C|6KIxHmTWJ-S*M0N`m>VkEhVHtvnsy)S52KMs7*k!*igjdbw?e=q1q?D02L`@ z_U^3o9CAESm_TVj#tCR{M94BRYwTY%B*h951DcDkoDQm>99lBv*Rz~F_W-%rhsF6Y zf`s?%C;79~htI0y;6fc@*&6zwShBxtkwdE#b@g~xGY{-HCCfzmav6c6t<_1$m?tNN zz^&hTvAq<6vA*&{AA3~S$G-n>As3w8$11y?(-^Q#X&Bg@cq z8CC)Vb&uX$Q%JrzH@;BmM2Z4OXkI)0a`@QD?;y)JzZ_m58H6LwL%e5sn!JN}eco8S zOX(Rn_xR=l4u6F>f6~b5ZMBM2KS-bn5)uhpcasUre6_JqY_L*KSI@XtyiqtRgbbyxho`J}wI5I76bDVPD@ZdZ6ta0n8 z+=|>53*V~Ts;oZIbY1hXak6d6$=uGq7U21(Gq~c|`hk71euCeWW9veYsCCD4+_Mf6=aVU7yo^@AuRt+atj$oRLLDXXNdi3lj^_edQge#kA91HmlhN(SR3vi=a~~;HBudLPJrdBlQs&%a zfan~m2zv`tW?Wh34a9JCcGo1Na08o`;!9xgTIKufadZw}!IwDz1;(-vbgmOk1Dvsd zld7WR8A7n^C*_N-BvsB;#q7r5^K3PxF?T=gEJh0_{KClWmwAg5$ZC5&@l=jpsZ=iA zg2}8}c@)v>=9;6X8MK0@nnIrwYD9pOl<_k$j%7OZOig$ zZ;a;7n-ch!hbE03L9N5qMb$UUC92*(n}_@YYMAT!4B@yx5dVe3j;a6&k)Z(rO;G(O z2%q@>j>1aVI6CQDS^fX0rO|3|URo+>KYxp+J-xj@%sO49UY4D4oU9jZ0#lGi^qi!r zi=&(igWx7D?=yPn#%abUJNyZ$iHRYJ%QoW};v))xUCi^N?ubA_0+jv;I6=ZI{1HJ# zjd!1sX(-WQTm8$xd$Se$;5_@4>-ggJxjP7i9+?chN#AMplps~n8NDmYj9&4q2H{z8 zQ5opcG#h~#V?64mz-_ePwiT5oI#4tYAlZX?&ghR0H)2t^x?v=SYV7G?xQxX1=8H6T zVrOT7rnf0*z9U=z;vE+c0!Qu+u|=vkp|u*8X0{m~VCfi-q7cW3W-#Zd(GO=ZvZ?4% z4n~~gx-{Z3t7#%G>4W9Qw}BmvmLIaZjK%TxHtDKoO|gp-H`*Zv0|QQE$IOfx2}6Qm z&)M$ohvkCi0cJijTc{_F7T`vg9yu_XGPlaN7Ihs`&RZCf5j6q~!DGiiRQEKsgj+jg z8nZL`Cj4Qnh0=gB4MxMDoOH0Sz;H}lN7^XE%|I=kswf)vsTz47PgUJjzL z3@i%nnt{}aI}vRecs#D!-G8IwDr&EeO~gjk>Z&kT_ql*a({Nv@kMH~7P)Eb?;4_QN zJbJj7$SEW?qua{EfPb9tJ-|v4id9r7VbD~ld&Yk+4A(Wv^m(dFK--jz#Yy6|-rn2p zsYbYQ5gF6bVxC_Dmn3lA*I|Sx@RtXXf~9N zMrGzNmk?bn4?4-Nx38${GJ#O6pNTaz(;M2&AcMsoaZ+lC`xNZi^AO3mxlBv`MMjf@ zUW%cginm`=d~6C4s}Hq5-EC=-NPo+NDS8)In0 zS_{@qh@^92LavBdmsLRslt$YQ-=PM^n^?!7JbN&*U}Hr6jM&fl?J?DCKhU7Tda!He zHKjW+iR}~pH;U$DUCMXJ;ajVRvlj&sjv7FAGIkV%_mCK0Yiuuit-XlT`mtDjOwdN2 zE?eSs>K0g7N8n4Ec_l0q#f6CGTaYl5j@CNP7}|H0R%pR8R@8diBFcK6Z51qafI`9c zPfy3s(t5PtBAHo?`|t4I$XoU<_7*nDcIa;ja88%ZZMo%u9iT$+qlq!gIf&QPke54K zhuXgp!I$4b5kK-pWkfEpG@^REysND#0FoVjKoW~#KTFsr2EoHO2x_wpO$w)@%G{vd z#wk5CYAfk_j%*uevB%kVeuUsaHA+T?a(a~Kw&(yB$mpEl*NJro||6@rO}9=m!FZp1p58{aZJO%*nPolTi?;A zN^e1%?l{4UF&2#$E0H4UuTwReJ?$^IW9MXi?7uRlViGIB3YFp53S!1VT!iPH3EnaE zUZ6lM8-H$@p@E$Cxb$GpF{XYdroIQfVKqs0b~J2X|;Kn2?O)Re8*66jV`W zIMfcL{?x!@(qowyXBfl9lN$XaFf-JUHByIuok=<$;{|%(!n`;1 zv}&X8{b?rvudHm--~5SN{%q49Yi9s2jWvk##s5cAKDzzPJ9txqLcjXU7Yzhy%} zT1vkk@*KEXN2o0IasV}k!MenkDvKkiIIv85Z>id>LMq>w2HQ*y?28(NstQ+BYqv@u z3&rd&+^nCc!S>fFDba=EZ$(Jw6>#7SbJps#6}~X6Z{Uq%2Hc@4zrRYkg0?4w1wO;u zRUR3UUWy%>H8#PjHxKAVcJZyh!Ax-?Lhb8y@&3>}q=J2(Cl+1waRZz|Qz1S#5cxjr z9P2wZ7*;1EZ~CliHES5)Un#^3BfB$FdwS;FgXzKHyUv$CE7ZJ!bkW6qwHfNrM(k8=7EO zOPa4Qf!2lx3$?S0g#&g3S*TvcxvCV5c6wMAjBVo2qw|(n?nbIVy;zECyqw{LEIIJ6 zFt2`6KRi*rTd}@HxB6#dRPZgPKn&ukFy6)kB0k~IND7FzmqQ=^eyw#hyYwhIF#$~Z zE~sptiUn<3i_46pU8Nz<@U(D%o%UR*AU@zv*16&N zX7s6b7H8#K3qXpD;0Uvb>ahs*g>}QW(R2=cX#qPsqEVD-?KtG6pD%NkBK3P z^u}U$+LF>inSCC6rsiu`DGvnJ9%+a>zoJ-$#Zf1Ooa9I2%fv_4%hX313xYHs@#a*@ zWp$YaDCM3s)dEDLifIV zJpm#^L@H^oZrAXVbM%Gi3uwLe0`dI*#&w6vy>xo-v~%fUIurjcb`p=$ai}(eWDeB> zw@$41KNH)Y6Zh|Bu0uDmd&$&|V>i)1(|hHi_HUi=rFdKc@ z0|fN*FN64hw~_xp2tfZQd-&h>zgx)v2aUrxe)GTPXNCNzH#gU;cy!#^pz%2CR8Wcx z;|QRl3JBaXZOgXKU-}zqF%0pA+3p2H0{*-GUkeQhYi#QC?O0BHhad14$jSh)TmQG$ zY^zfSYfEvx0+pJEaD-&_yXN$V2leE2bN`)WPs_XuJ`xCl>Key+} zfAo!?Cj0}(nIg(KDD|yiNy@k=4S8x!KtmATlI2fI#`u|oEM)Cfrm|)YR(!ZvKus+h8`y_4}oXsgBC`-`gpi!wqctkCJop@A-dkC*glg2LHzn7OO+K z;fy-_2myh%1;8g17@gLwCYkwjh~ptq3ANzjH^?9rpel;#ji;pc1!zO98M|O4n5{}~ zjG4!@m?M{lCyh94uQ+K@L~BA76$+oDbviE=nJ*TZZj9J$l&EFwgcg3<0>u$RO_&$T z5tx`BPfumOe82RvdmVA-_Q(ovipb6lJD!BN^6qd|6w95Nl(5cc%(RSXE~@$rjG5Qy zr{8rY&okOwaOyZZNyk{q^6=J_%5esFEoO{aaEiq?%SH`9YzS}d@``qLv=q1A1XXoc zHt=bU9sS;ovb?iCJwHy&o^ ztzC#{e)Rb11+!%D8tKvQ75#ljaZoc6g4MNa)c*0)41RJm z7VDd+7%gu zE5w;gM__dxG_)$gMX4%>Fux^74GG+{d>ornreNkNy#SqJ(=K-V3?EG@$c~@>sGPn4 zoQKaqwzNTZUdcqbV#27MUQhvavl46pXVk4eM?T}0kJWc~;F3VL7yjikPped{wWWh6 zzqOhfM5k@~-XjiMQr+b^;T5giOm@S9r z8?nHKkoDv#phIr15J5b#5({#D#LS!JQ{yPa28I@?cJtw)e)#i>stLNz@$Td30pluM08sQ zoa$QFwA?5v*G!sat}TkvBr|K9^lw(XPsm&+!MPrGQAC2;b+2U&+HzLay`GFbR&fGR zmj*#!@1reJGgG*vu6mSTAMp^L`LS9`r_SmRz2kTwKN+c z>l=T4*m%SW@=M&i#tnBN#>$8Xo#$3;IB>rKbsy*^%R)>G1j^?`4ia zSAQ?mbx&14Nr^nwa?-eE;(42k zrka@Zwz3Xg>>PM(7UR}k3|r$YQ)5WB+P3}laBPiDIe>?$h6qs<`i<^9$XY+2yPO!C z;_aX4-_WGdyh09yM!7a?SxDe+b9#ClBvY60vQ?QXyb`7~z8av$#F{3S()B7}koIJ( zqc)IXMb|rh(1kv~g%gwRrjWckAzX5>kwt?_0VP3mV=AW!CR7=&@+h1n#IWtW?Lw9# ze1-|cNU8gf^RI zGihfh9WD`8?a*rP4Im%^d;aJMM|jIYutnB;E(=EQfYrA%Q;eb)_cJre{F77nBrLMq zeBm+yQUszh#|Cxt^y)vyARl1wpo8~`0`KncU|_>rrGJpX9vDHU9L1)mI7Ss8sL85M zy~ffgRn*i_J0`Y{R%KEfv-0M;49sga#x7bO>7CL_uu^>OcYIWceL6zI1|E!hjW0YM zJ@7k;f%qqjCrwYePDhqzJC4GGiFh&ze1m_X$N10Inf zE>BL45hoMCSVEtPv<^&TRH>=bfP7(=OA3vRcOL)&*Y7!HP?Fzl-hh0yQ`c9cCAX(H zrLtdktAFVjCsY4~qES4eH)zDXfPl49Gko^sZB}fv_&y_`zC(YIv7D@1_%k(q%jYvJ z668B1LD{*e%Ky^@+H^{uoSIc^o6VieZLs`-1(ZAI<$mMZaR(kk1^$qol=bG-KFp$Y zLAOi9%Nvo8ft{tErefv$MpHM;QWKuG6~qBs_sl(6xg+Yd__Z`wn^|E?9 z)6%BZFcf%a8(rjI>?Op24a7-v0)DhjKBVz>GTUmIF)M_<`SCNTli}QkIP1lv{*n06 z$*w|B2D|?e#7Cpg>FmhF*QKtL-oE1D;UNUE>fN@u8^A^|+{($-;xWq^g zq^LUzI??9$Z;a`eiZU*u&k|Rwo65Tgh~BIluN6*!4FbcQi4QwvN_ZYIYQ2}hfKCHb ztz?@4Sr)0P3cleH?^glTdFRUBp3$<1RH6iKn`RSbfkst&FYOsd>#qWFnXI#^1roTR z4!y4}To+A>6&hkvHb3B7xASFOl5HiRy+Ajqa+8|->MhsuX+)}h7kdaT;Mhs>U1puJ z{8O&WQe{^SU3bNj_&tiD7C#jNw1>Ln2}zPUpfkeVj*yret0E^ytHE_1Q0L{=7v@ znkBSIsN7OYc_qzzWQKrCgY?e5DMt5@NKXnWu$;AMV1&e%DNiWkCMWQHd?12imcbsD zrno7o!rQ}4kyzqulx}rB4sG`h7k%Jm0r|&3D#pfDu}@nxBw4{3yhfy|&+p}F5#K2d zOr*?@rz+L4_T=w=uu1!GzqL^p+^nC~G*m>fexnwzHoS%a;^B7h#6O&K>eFxy zEHGgQe{|Y+rORx_mn}F5@%Q#SMb7|u^RW)X2i3>p+*iNi(NWu3l}$C8k}QMZyG78G zIB<|j&>PIa5*2RHF84tr(yD&v3H$TkV- z#4aFURp%t_jwK#j{_I4$c#}GNWn|RMpD*pQGz-@(Y@Dh<57#WbPa^ZdHTkoppoc@$ z72#hsm=%e;;?pgpL>5iSd)Y-?N1~f+S=<^|0*4*4VxodUdsbcBx5kd$Dq1y2tO(o&uNe%qH-&o`y%WJc*i|_V-&hF(jkL zn{V)o5cs1a?shBFu{DTW5%0Ul$E@V9tOwo6lq)kWBxRI@=3Rn8i~XzciPp~BtKRBA z63CG079`JK?3k7jov-tW0PY-~kP0JX)akjA{AC}Ne#ax0-s1RoU+5nMDu35R>ejhB2@y5)hcbr^mG#<)0|l&CYJeX>R#}X`10(4NbEV z@;YwD{LOBB*8BxUaQXCW?E=k<-R@0C)Re)5$E=fhLD!z8cg$wvvfWh(wROEOCt8@@ zD%8;Q^j_rN9l)Urv8@|;Sd1~zCsME6Vz0)@mD4S%rd0kV->6M&Nkz_Oj{eb`L!F|g2f)!%0p>`M;ImV-2Blc$SR5u z=CP>p8d;S$iwt{@aGJ@b+kTF`InxFZQrHQ(F&HcSM}#4PbXupb^DoSm)&M`obY>)1 zN`XgYE6uL4DOFQOqZS(=Af_08RNowm(EN|^yuRD2)ox}wkyFLfdvutf$&W!zho}`z zfCf=&^1K8SHPUJyl$O3>?JwVw4=k6QtH^vDc(acmJW|+h_F_Pcg?1by}~YwLF! zHHP><2&^}Q%u4uwc$2^+#^PR%(!`tv8_md!Hc}(Lai4>-q}HA@Px!%P&^`b zAo$tJN`LCk-F5l?-mEuoe37*Rn4G-bHVgM<9A#~@4wGAQbQ|}>9Z(IroXuBIS|F&b zbDsCvK7@K!v(mKNB-B#T8RR>z$nxeAH=EwbTp^9_9@I0e(6Uw3x}ouLcdEnvE`Du+ zGK6}sZk{kG+R=40wk@=o&p_X&Nrzjitc2&g%G6& z{6uM6t#wSFK(wF+2E2kL*%=-~?w$AH+>z+=S<+dYkb1LWI-ESD_G@9{RZqqUNFRRR zRXCJ4Dt@Ip4!BP&H$i6RbPosT3-%BxRXfN}5NU}3Gujz%pmg>aeJ29qY_nt-edTzU@J9H$oM82r9fW=vom0&)d z3E7OBEnnml?0M5G(?>(lJ-bwXKPszDK(MY)4+GK}+5)&C-3{-jm_^%Fx|j)2KQe9JB+hDnJf^9>;MWwfi{^D_WVWxtjai z*-DR}gi4ZHj`t4M_c_rFDukE)@t)z<7>9_?hqoZmSjCq`3~m^w@3S=^tHjhiJVcus zoe{yQYd!eWL1r1Gdq@i_ui0E$Vq?4bmH;!3f%(9>S)04U4FK;OJDC0RL`13SYTi&M zI#Q6~biS@5o0G`QgA-0oD^c8uZvR<@c?^NL^68_u2_IxQK&fOO<+Fjcr9M#U8od3n zQK6u^7v@ynKc{8}9#gLovSA>mSd@L}{gUEn*k8Ys_4v&pMJuCVFasVX(9AdTYeNh_7)B)yf@6fGA zx>r?2V7iI0C6hKrWsH7&jd|=^i9M6NlUEt?Jorkv5T^NREU}QR@Ayh}9uw=;xlg z@h-VPwxwK~;pC>bvb86NUZmynNMV8oh%lhB>$#)OlJ=ScNFr^E+$}hJX|?b(fU1c^ z6lImajjwZH3i`|q7;#(GJ~J3MIJWrJ5j{0WMp!*sST>=hdxj{9xTg5$_p0r8F}*(5 zfR7*DTbV-d&(oB~V*_n+S@M}Ssy`k~@z>;PD#)!R((>@pm8N3jKmmr3koNONrX4QV zrQoX??~^HzC(nnWPpkVKfJDZk^oklZ3stx}+_9hM``enhD({wkjSuan5L59hBpt^q z;mR*jFJ!0Pq4?mm7Q5b?nSme$B7b-As(0X_S_K3%K+5hJ;m$8~Aqg*1)AvfXJQ&5D z2gP6_>RxAg#>Ub_zjdW+p*dxBjVjg6(J}5;yMfdz6izmLfj2_N>TSy*^n+i1Hf%PV z53>_0&Pm@PPH=#5Qm8()@N6$#Xl^EYJ)J0E5#c~rd!g%Y4nAi&~Yaa}a{W&D1O17)|rEK|;lTk>1d-ZD1{OJu6mlKX?d ze=_it>%wHNX~tb}Z7J~$;kzeeoBTSXpp0L$?2jNll{G&(J{c5sVG}~JP0*o8(I|R6 z+Agbd`x3)IX5PUUo<}YXD}d=qDMN<`jHz;V)H>|~+)edSZzoq-V>h5!-mRc?Z@(B) zO4AIX@;iSl*zDH0RtKkc2~?rM(x#Gv3zmAfuILpZu z)LTz$WT7SByXA{!Xk}tLhb8=ks+(`3ad?Qb?nB>7|1oc)z{`W>otP|ySU)gQ790D| z20W9v5RfRs)Z$qYg{oia9-Pl?>z+QZ%0-`op9HXv+`k~pBc_EN9aCv4{iG2(!} zFn1>Hysi9RSE83++?ZYl>fHMVO$yGP4OA}pz=fO2{DIl@^$S@(uYNb=(YC$G!!~a= zZHsSn(p30JNB$!Naw`olKuF5q6qR^|9!xp?#To<4N8g{B^K#eTmcwbTwPg21M^Rk5 z3uaPFQt|3k)!=9zP!wV82`=gBL>nbQU#U}L=2Sh{dq$i;K7Yg02njOvI2DtA#<^$> zhr1L-YN7~JJx#kCK+cUcz2h>~-EmLuMk_Hp*RPc_JyV@_T9F6nkY|X=^fx}aJx@+xApA#6 z#`a#+wjXg-auvlM493l!wTh3>N92<&JN+th>am_KbvR zhjCl5S=e@aEd`n|6<ICvtGs}-`gUq{Veqhy|8P@3F&kM1 zAcT(QCe^|Q0Zlp&lD&+~9Z$wsnV?}6dLY&faaPvl`5QcO<T9TS33R&$cn^Bp{(QGE;^ZHLrts=5sh~1zY1bZ`HUt|HtSG7SI#J2fOg@E! ztXz6qz~viXj3pTCkrQt`NMNlN&KRE-zKKf#aUKq`;Yb?f9^x{000Eb(-Kz^_}RR)GT-$y`v3@W1=AaiBcA9cbq7F)cw4|Vkm%p z#HbA66XC7SJ|UTJ&zGQ$jCk)k=Ok(T+nfo-ZI%0Zq^oUQ^pg_37wRk@GO}D}IF>+J zrBiXHmY0kcXt$QdUhW3u@XhJTGxO4T9SATLqK`Zrh}^=)!Z9$3%PGuJ)BR*mLkUnH zlfa-4Pn=l7ZrDH78EZL7^J9MG4gaN z-q@LJ__kkHm44um5UZcihno*fyLwSN{7D)!P%@t`^=YrWy%3W0jVO}}DZokB$^BAu zLm#`RFf~(WE4Qm^rl)c*laVYVDB+%eg0G8t?{}M440rZtiKZ^}vVB1UpC=TX18?6< zw!aP=0BD&bN9H-SzODwZ=!zK>nH+@zBz=C6cIj zS<4PbVl3M*kA>9=L(@;Zjn38i?E;eS5XtX`GGIkHi@j#&Y}@@ZrK6^%NKHXcj0z5v z9#u4BS&G2`l+H^?Yc5;zoh&1>zN!vegU z-vH$8NLGC1G~-}v3#WFY-!n<(v^o(kxi1x@D?*J z0C8X?O5($nw~D(#n0Ix2mm8hcTYGjgB6h)nP%jzu)ikM(%;S{2#d2fRe^^*x1mHqY z=Fri`4!H_peQTile?U|lZ%!N@8hfc2{NG*&=J$7OtqzId8jh-`FV%~gzB8u$UnGx+;^n3 z9!27*+HCzmeV`n5msZz*v})30x=qsqg0tWMQnq{hd1wYeW3Bu;r0X@a_qV*Hx5ew} z^xeitBy0Hb5XJqS*d+3O13S6b?_9TkHN2nfcx~^3sSF-s63|D!yJ|567~J(|@tIlA z?D#rsjF{F@p(!ia_p&~4o=F$YE2?tz=UDo1m3m-VU6q&1STk4o?FMk=fCO#FIP-e$ zqlaHV59q4}m6r>JF!MZ%a(G?{ma^g}yIuR42=}FGRzUbMtlM`D9U+8fK^^wI>cob3 z0}+vk5Qq@a(P7vi1ZsrJ`aH@d90Y_G1_T6r*i-9lfF;#LS!EQY*yUx!B^6X9)zwfD zV8hgZra3;SnlpiIH-mkM&ZGgss$Kt00~S?~k&;wZV*^Y5YbvBRl$qNw5hvK^&Y4tG zuvCsNmh6^)`UJ6?+F7%oq8P!@>hAV1|5TVIzPZx{oz?R#w=*jTJHVdgFJT>IczNR_ zEb%YXxe!WnKDq6SYpJ@hu_OR)a^aQ&?$W^Uo=0;31GxVovjoBVw^eU z$-lKO=cb=;=4rGroG5(~oAg)K{Oiv!l9=pk-&Ndp(`R#&o}QhjP2~r#0T_y)!$r*r-4dmlSgp>Bl(|4>Jqx! z`8_|){ed%?PJ)*I_sOqxGd#^ZIeV3j3!IVoFW^{H0RA`Q4uOvx67ePU4ov zg?X=FfOvl2Prt1Rcg8yjeXUD0{;ot^;FEV=;PirS_)DKBF>imNz<(BTpQnqQPkef5 z@!6w8{pixfm#hvyuW@?16~0LMB%ofGY5eBIo}M#<&()rUNW_I{FPynOzq6+&g3jLN zhoUabdfDvT`Q)cd!SK1HlTeMhIQbQ3md=ZuE{>f&rR511id><_d|u=9U '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 000000000..9b42019c7 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega From 2c69123211b451d4ead7c514958a54ee80a3875d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 16:20:46 +0100 Subject: [PATCH 12/63] kmp: simplify map interop api --- .../map/interop/MapFactoryImplementation.kt | 17 ++-- .../feature/map/interop/MapImplementations.kt | 92 ++++++++----------- .../feature/map/interop/MapRasterLayer.kt | 11 +++ .../feature/map/interop/MapCameraInterface.kt | 12 +-- .../core/feature/map/interop/MapFactory.kt | 6 +- .../core/feature/map/interop/MapGpsLayer.kt | 10 +- .../core/feature/map/interop/MapInterface.kt | 14 +-- .../feature/map/interop/MapVectorLayer.kt | 4 +- .../feature/map/interop/MapCameraInterface.kt | 5 + .../MapCameraInterfaceImplementation.kt | 42 --------- .../map/interop/MapFactoryImplementation.kt | 14 +-- .../map/interop/MapGpsLayerImplementation.kt | 22 ++--- .../map/interop/MapInterfaceImplementation.kt | 29 +++--- .../interop/MapRasterLayerImplementation.kt | 8 +- .../interop/MapVectorLayerImplementation.kt | 8 +- 15 files changed, 128 insertions(+), 166 deletions(-) create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index 4b454d13b..35e19be20 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -21,14 +21,14 @@ actual abstract class MapFactory actual constructor( protected val coroutineScope = coroutineScope protected val lifecycle = lifecycle as? Lifecycle - actual abstract fun _createVectorLayer( + actual abstract fun createVectorLayer( layerName: String, dataProvider: MapDataProviderProtocol, ): MapVectorLayer? - actual abstract fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? + actual abstract fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? - actual abstract fun _createGpsLayer(): MapGpsLayer? + actual abstract fun createGpsLayer(): MapGpsLayer? actual companion object { actual fun create( @@ -44,7 +44,7 @@ private class MapFactoryImpl( coroutineScope: CoroutineScope?, lifecycle: Any?, ) : MapFactory(platformContext, coroutineScope, lifecycle) { - override fun _createVectorLayer( + override fun createVectorLayer( layerName: String, dataProvider: MapDataProviderProtocol, ): MapVectorLayer? { @@ -68,15 +68,16 @@ private class MapFactoryImpl( ).let { MapVectorLayerImpl(it) } } - override fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { + override fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { val context = requireNotNull(context) { "MapFactory requires an Android Context" } val cacheDir = File(context.cacheDir, "raster").apply { mkdirs() } val loader = DataLoader(context, cacheDir, 25L * 1024 * 1024) - return TiledRasterLayer(MapTiled2dMapLayerConfigImplementation(config), arrayListOf(loader)) - .let { MapRasterLayerImpl(it) } + return MapRasterLayer( + TiledRasterLayer(MapTiled2dMapLayerConfigImplementation(config), arrayListOf(loader)), + ) } - override fun _createGpsLayer(): MapGpsLayer? { + override fun createGpsLayer(): MapGpsLayer? { val context = requireNotNull(context) { "MapFactory requires an Android Context" } val locationProvider = GpsProviderType.GOOGLE_FUSED.getProvider(context) val gpsLayer = GpsLayer( diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt index c9099e66b..4e544b506 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt @@ -4,7 +4,6 @@ import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode import io.openmobilemaps.gps.GpsLayer import io.openmobilemaps.gps.providers.LocationProviderInterface import io.openmobilemaps.gps.shared.gps.GpsMode as MapscoreGpsMode -import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer import io.openmobilemaps.mapscore.map.view.MapView as MapscoreMapView import io.openmobilemaps.mapscore.shared.map.LayerInterface import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer @@ -17,13 +16,13 @@ import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureI actual abstract class MapInterface actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle - actual abstract fun _addVectorLayer(layer: MapVectorLayer?) - actual abstract fun _removeVectorLayer(layer: MapVectorLayer?) - actual abstract fun _addRasterLayer(layer: MapRasterLayer?) - actual abstract fun _removeRasterLayer(layer: MapRasterLayer?) - actual abstract fun _addGpsLayer(layer: MapGpsLayer?) - actual abstract fun _removeGpsLayer(layer: MapGpsLayer?) - actual abstract fun _getCamera(): MapCameraInterface? + actual abstract fun addVectorLayer(layer: MapVectorLayer?) + actual abstract fun removeVectorLayer(layer: MapVectorLayer?) + actual abstract fun addRasterLayer(layer: MapRasterLayer?) + actual abstract fun removeRasterLayer(layer: MapRasterLayer?) + actual abstract fun addGpsLayer(layer: MapGpsLayer?) + actual abstract fun removeGpsLayer(layer: MapGpsLayer?) + actual abstract fun getCamera(): MapCameraInterface? actual companion object { actual fun create(nativeHandle: Any?): MapInterface = MapInterfaceImpl(nativeHandle) @@ -34,67 +33,65 @@ private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) private val mapView = nativeHandle as? MapscoreMapView private val cameraInterface = MapCameraInterfaceImpl(mapView?.getCamera()) - override fun _addVectorLayer(layer: MapVectorLayer?) { + override fun addVectorLayer(layer: MapVectorLayer?) { val handle = layer as? MapVectorLayerImpl ?: return handle.layerInterface()?.let { mapView?.addLayer(it) } } - override fun _removeVectorLayer(layer: MapVectorLayer?) { + override fun removeVectorLayer(layer: MapVectorLayer?) { val handle = layer as? MapVectorLayerImpl ?: return handle.layerInterface()?.let { mapView?.removeLayer(it) } } - override fun _addRasterLayer(layer: MapRasterLayer?) { + override fun addRasterLayer(layer: MapRasterLayer?) { layer?.layerInterface()?.let { mapView?.addLayer(it) } } - override fun _removeRasterLayer(layer: MapRasterLayer?) { + override fun removeRasterLayer(layer: MapRasterLayer?) { layer?.layerInterface()?.let { mapView?.removeLayer(it) } } - override fun _addGpsLayer(layer: MapGpsLayer?) { + override fun addGpsLayer(layer: MapGpsLayer?) { val handle = layer as? MapGpsLayerImpl ?: return handle.layerInterface()?.let { mapView?.addLayer(it) } } - override fun _removeGpsLayer(layer: MapGpsLayer?) { + override fun removeGpsLayer(layer: MapGpsLayer?) { val handle = layer as? MapGpsLayerImpl ?: return handle.layerInterface()?.let { mapView?.removeLayer(it) } } - override fun _getCamera(): MapCameraInterface? = cameraInterface + override fun getCamera(): MapCameraInterface? = cameraInterface } -actual abstract class MapCameraInterface actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - actual abstract fun _setBounds(bounds: RectCoord) - actual abstract fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) - actual abstract fun _setMinZoom(zoom: Double) - actual abstract fun _setMaxZoom(zoom: Double) - actual abstract fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) +actual abstract class MapCameraInterface actual constructor() { + actual abstract fun setBounds(bounds: RectCoord) + actual abstract fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) + actual abstract fun setMinZoom(zoom: Double) + actual abstract fun setMaxZoom(zoom: Double) + actual abstract fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) } -private class MapCameraInterfaceImpl(nativeHandle: Any?) : MapCameraInterface(nativeHandle) { +private class MapCameraInterfaceImpl(private val nativeHandle: Any?) : MapCameraInterface() { private val camera = nativeHandle as? io.openmobilemaps.mapscore.shared.map.MapCameraInterface - override fun _setBounds(bounds: RectCoord) { + override fun setBounds(bounds: RectCoord) { camera?.setBounds(bounds) } - override fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { + override fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { camera?.moveToCenterPositionZoom(coord, zoom, animated) } - override fun _setMinZoom(zoom: Double) { + override fun setMinZoom(zoom: Double) { camera?.setMinZoom(zoom) } - override fun _setMaxZoom(zoom: Double) { + override fun setMaxZoom(zoom: Double) { camera?.setMaxZoom(zoom) } - override fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + override fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { camera?.setBoundsRestrictWholeVisibleRect(enabled) } } @@ -102,19 +99,19 @@ private class MapCameraInterfaceImpl(nativeHandle: Any?) : MapCameraInterface(na actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle - actual abstract fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) - actual abstract fun _setGlobalState(state: Map) + actual abstract fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) + actual abstract fun setGlobalState(state: Map) } class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { private val layer = nativeHandle as? MapscoreVectorLayer - override fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { + override fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { val callback = delegate?.let { MapVectorLayerSelectionCallbackAdapterImplementation(it) } layer?.setSelectionDelegate(callback) } - override fun _setGlobalState(state: Map) { + override fun setGlobalState(state: Map) { val mapped = HashMap() state.forEach { (key, value) -> mapped[key] = value.asMapscore() @@ -125,23 +122,14 @@ class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { internal fun layerInterface(): LayerInterface? = layer?.asLayerInterface() } -actual open class MapRasterLayer actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - internal fun layerInterface(): LayerInterface? = - (nativeHandle as? TiledRasterLayer)?.layerInterface() -} - -class MapRasterLayerImpl(nativeHandle: Any?) : MapRasterLayer(nativeHandle) - actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle - actual abstract fun _setMode(mode: GpsMode) - actual abstract fun _getMode(): GpsMode - actual abstract fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - actual abstract fun _notifyPermissionGranted() - actual abstract fun _lastLocation(): Coord? + actual abstract fun setMode(mode: GpsMode) + actual abstract fun getMode(): GpsMode + actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + actual abstract fun notifyPermissionGranted() + actual abstract fun lastLocation(): Coord? } class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { @@ -156,21 +144,21 @@ class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { } } - override fun _setMode(mode: GpsMode) { + override fun setMode(mode: GpsMode) { gpsLayer?.setMode(mode.asMapscore()) } - override fun _getMode(): GpsMode = gpsLayer?.layerInterface?.getMode()?.asShared() ?: GpsMode.DISABLED + override fun getMode(): GpsMode = gpsLayer?.layerInterface?.getMode()?.asShared() ?: GpsMode.DISABLED - override fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { + override fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { modeListener = listener } - override fun _notifyPermissionGranted() { + override fun notifyPermissionGranted() { locationProvider?.notifyLocationPermissionGranted() } - override fun _lastLocation(): Coord? = locationProvider?.getLastLocation() + override fun lastLocation(): Coord? = locationProvider?.getLastLocation() internal fun layerInterface(): LayerInterface? = gpsLayer?.asLayerInterface() } diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt new file mode 100644 index 000000000..fe049c900 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt @@ -0,0 +1,11 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer +import io.openmobilemaps.mapscore.shared.map.LayerInterface + +actual open class MapRasterLayer actual constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? = nativeHandle + + internal fun layerInterface(): LayerInterface? = + (nativeHandle as? TiledRasterLayer)?.layerInterface() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt index 90e760d82..6a64da9a0 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt @@ -1,9 +1,9 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect abstract class MapCameraInterface constructor(nativeHandle: Any? = null) { - abstract fun _setBounds(bounds: RectCoord) - abstract fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) - abstract fun _setMinZoom(zoom: Double) - abstract fun _setMaxZoom(zoom: Double) - abstract fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) +expect abstract class MapCameraInterface { + abstract fun setBounds(bounds: RectCoord) + abstract fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) + abstract fun setMinZoom(zoom: Double) + abstract fun setMaxZoom(zoom: Double) + abstract fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt index 39f752be6..abc9a977c 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt @@ -7,12 +7,12 @@ expect abstract class MapFactory constructor( coroutineScope: CoroutineScope? = null, lifecycle: Any? = null, ) { - abstract fun _createVectorLayer( + abstract fun createVectorLayer( layerName: String, dataProvider: MapDataProviderProtocol, ): MapVectorLayer? - abstract fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? - abstract fun _createGpsLayer(): MapGpsLayer? + abstract fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? + abstract fun createGpsLayer(): MapGpsLayer? companion object { fun create( diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt index b3392f82a..7d70b910d 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt @@ -3,9 +3,9 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode expect abstract class MapGpsLayer constructor(nativeHandle: Any? = null) { - abstract fun _setMode(mode: GpsMode) - abstract fun _getMode(): GpsMode - abstract fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - abstract fun _notifyPermissionGranted() - abstract fun _lastLocation(): Coord? + abstract fun setMode(mode: GpsMode) + abstract fun getMode(): GpsMode + abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + abstract fun notifyPermissionGranted() + abstract fun lastLocation(): Coord? } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt index 7fbfda99d..8a7a106d0 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt @@ -1,13 +1,13 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop expect abstract class MapInterface constructor(nativeHandle: Any? = null) { - abstract fun _addVectorLayer(layer: MapVectorLayer?) - abstract fun _removeVectorLayer(layer: MapVectorLayer?) - abstract fun _addRasterLayer(layer: MapRasterLayer?) - abstract fun _removeRasterLayer(layer: MapRasterLayer?) - abstract fun _addGpsLayer(layer: MapGpsLayer?) - abstract fun _removeGpsLayer(layer: MapGpsLayer?) - abstract fun _getCamera(): MapCameraInterface? + abstract fun addVectorLayer(layer: MapVectorLayer?) + abstract fun removeVectorLayer(layer: MapVectorLayer?) + abstract fun addRasterLayer(layer: MapRasterLayer?) + abstract fun removeRasterLayer(layer: MapRasterLayer?) + abstract fun addGpsLayer(layer: MapGpsLayer?) + abstract fun removeGpsLayer(layer: MapGpsLayer?) + abstract fun getCamera(): MapCameraInterface? companion object { fun create(nativeHandle: Any?): MapInterface diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt index 27c71f65a..50f7930f9 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt @@ -1,6 +1,6 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop expect abstract class MapVectorLayer constructor(nativeHandle: Any? = null) { - abstract fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) - abstract fun _setGlobalState(state: Map) + abstract fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) + abstract fun setGlobalState(state: Map) } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt new file mode 100644 index 000000000..e4d20d588 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCMapCameraInterface + +actual typealias MapCameraInterface = MCMapCameraInterface diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt deleted file mode 100644 index 0f2831af8..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt +++ /dev/null @@ -1,42 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - -import MapCoreSharedModule.MCMapCameraInterface - -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapCameraInterface", exact = true) -actual abstract class MapCameraInterface actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - actual abstract fun _setBounds(bounds: RectCoord) - actual abstract fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) - actual abstract fun _setMinZoom(zoom: Double) - actual abstract fun _setMaxZoom(zoom: Double) - actual abstract fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) -} - -internal class MapCameraInterfaceImpl(nativeHandle: Any?) : MapCameraInterface(nativeHandle) { - private val camera = nativeHandle as? MCMapCameraInterface - - override fun _setBounds(bounds: RectCoord) { - camera?.setBounds(bounds) - } - - override fun _moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { - camera?.moveToCenterPositionZoom(coord, zoom, animated) - } - - override fun _setMinZoom(zoom: Double) { - camera?.setMinZoom(zoom) - } - - override fun _setMaxZoom(zoom: Double) { - camera?.setMaxZoom(zoom) - } - - override fun _setBoundsRestrictWholeVisibleRect(enabled: Boolean) { - camera?.setBoundsRestrictWholeVisibleRect(enabled) - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index 7a0b933a9..d612ed07e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -23,12 +23,12 @@ actual abstract class MapFactory actual constructor( protected val coroutineScope: kotlinx.coroutines.CoroutineScope? = coroutineScope protected val lifecycle: Any? = lifecycle - actual abstract fun _createVectorLayer( + actual abstract fun createVectorLayer( layerName: String, dataProvider: MapDataProviderProtocol, ): MapVectorLayer? - actual abstract fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? - actual abstract fun _createGpsLayer(): MapGpsLayer? + actual abstract fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? + actual abstract fun createGpsLayer(): MapGpsLayer? actual companion object { actual fun create( @@ -57,7 +57,7 @@ private class MapFactoryImpl( coroutineScope: kotlinx.coroutines.CoroutineScope?, lifecycle: Any?, ) : MapFactory(platformContext, coroutineScope, lifecycle) { - override fun _createVectorLayer( + override fun createVectorLayer( layerName: String, dataProvider: MapDataProviderProtocol, ): MapVectorLayer? { @@ -95,7 +95,7 @@ private class MapFactoryImpl( return layer?.let { MapVectorLayerImpl(it) } } - override fun _createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { + override fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { val loader = MCMapCoreObjCFactory.createTextureLoader() as? MCLoaderInterfaceProtocol ?: run { logMissing("texture loader") @@ -106,10 +106,10 @@ private class MapFactoryImpl( MapTiled2dMapLayerConfigImplementation(config), loaders = loaders, ) - return layer?.let { MapRasterLayerImpl(it) } + return layer?.let { MapRasterLayer(it) } } - override fun _createGpsLayer(): MapGpsLayer? { + override fun createGpsLayer(): MapGpsLayer? { return MapGpsLayerImpl(null) } } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt index c5b08235c..e7e9d60a0 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -31,11 +31,11 @@ import platform.UIKit.UIImagePNGRepresentation actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle - actual abstract fun _setMode(mode: GpsMode) - actual abstract fun _getMode(): GpsMode - actual abstract fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - actual abstract fun _notifyPermissionGranted() - actual abstract fun _lastLocation(): Coord? + actual abstract fun setMode(mode: GpsMode) + actual abstract fun getMode(): GpsMode + actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + actual abstract fun notifyPermissionGranted() + actual abstract fun lastLocation(): Coord? } class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { @@ -55,22 +55,22 @@ class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { locationManager.headingFilter = 1.0 } - override fun _setMode(mode: GpsMode) { + override fun setMode(mode: GpsMode) { gpsLayer.setMode(mode.asLayerMode()) } - override fun _getMode(): GpsMode = gpsLayer.getMode().asSharedMode() + override fun getMode(): GpsMode = gpsLayer.getMode().asSharedMode() - override fun _setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { + override fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { modeListener = listener } - override fun _notifyPermissionGranted() { + override fun notifyPermissionGranted() { locationManager.startUpdatingLocation() locationManager.startUpdatingHeading() } - override fun _lastLocation(): Coord? = lastKnownLocation + override fun lastLocation(): Coord? = lastKnownLocation internal fun layerInterface(): MapCoreLayerInterfaceProtocol? = gpsLayer.asLayerInterface() as? MapCoreLayerInterfaceProtocol @@ -131,7 +131,7 @@ private class GpsLocationDelegate( } override fun locationManager(manager: CLLocationManager, didFailWithError: platform.Foundation.NSError) { - layer._setMode(GpsMode.DISABLED) + layer.setMode(GpsMode.DISABLED) } } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt index 3bcfa062b..6dbf49aa7 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt @@ -10,13 +10,13 @@ import MapCoreSharedModule.MCMapInterface actual abstract class MapInterface actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle - actual abstract fun _addVectorLayer(layer: MapVectorLayer?) - actual abstract fun _removeVectorLayer(layer: MapVectorLayer?) - actual abstract fun _addRasterLayer(layer: MapRasterLayer?) - actual abstract fun _removeRasterLayer(layer: MapRasterLayer?) - actual abstract fun _addGpsLayer(layer: MapGpsLayer?) - actual abstract fun _removeGpsLayer(layer: MapGpsLayer?) - actual abstract fun _getCamera(): MapCameraInterface? + actual abstract fun addVectorLayer(layer: MapVectorLayer?) + actual abstract fun removeVectorLayer(layer: MapVectorLayer?) + actual abstract fun addRasterLayer(layer: MapRasterLayer?) + actual abstract fun removeRasterLayer(layer: MapRasterLayer?) + actual abstract fun addGpsLayer(layer: MapGpsLayer?) + actual abstract fun removeGpsLayer(layer: MapGpsLayer?) + actual abstract fun getCamera(): MapCameraInterface? actual companion object { actual fun create(nativeHandle: Any?): MapInterface = MapInterfaceImpl(nativeHandle) @@ -25,37 +25,36 @@ actual abstract class MapInterface actual constructor(nativeHandle: Any?) { private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) { private val nativeMapInterface = nativeHandle as? MCMapInterface - private val cameraInterface = MapCameraInterfaceImpl(nativeMapInterface?.getCamera()) - override fun _addVectorLayer(layer: MapVectorLayer?) { + override fun addVectorLayer(layer: MapVectorLayer?) { val handle = layer as? MapVectorLayerImpl ?: return handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } } - override fun _removeVectorLayer(layer: MapVectorLayer?) { + override fun removeVectorLayer(layer: MapVectorLayer?) { val handle = layer as? MapVectorLayerImpl ?: return handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } } - override fun _addRasterLayer(layer: MapRasterLayer?) { + override fun addRasterLayer(layer: MapRasterLayer?) { val handle = layer ?: return handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } } - override fun _removeRasterLayer(layer: MapRasterLayer?) { + override fun removeRasterLayer(layer: MapRasterLayer?) { val handle = layer ?: return handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } } - override fun _addGpsLayer(layer: MapGpsLayer?) { + override fun addGpsLayer(layer: MapGpsLayer?) { val handle = layer as? MapGpsLayerImpl ?: return handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } } - override fun _removeGpsLayer(layer: MapGpsLayer?) { + override fun removeGpsLayer(layer: MapGpsLayer?) { val handle = layer as? MapGpsLayerImpl ?: return handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } } - override fun _getCamera(): MapCameraInterface? = cameraInterface + override fun getCamera(): MapCameraInterface? = nativeMapInterface?.getCamera() } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt index f2ce6f9e0..4797ac72d 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt @@ -4,15 +4,15 @@ import kotlin.experimental.ExperimentalObjCName import kotlin.native.ObjCName import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface +import MapCoreSharedModule.MCLayerInterfaceProtocol @OptIn(ExperimentalObjCName::class) @ObjCName("MapRasterLayer", exact = true) actual open class MapRasterLayer actual constructor( - nativeHandle: Any?, + nativeHandle: Any? = null, ) { private val layer = nativeHandle as? MCTiled2dMapRasterLayerInterface - internal fun layerInterface() = layer?.asLayerInterface() + internal fun layerInterface(): MCLayerInterfaceProtocol? = + layer?.asLayerInterface() as? MCLayerInterfaceProtocol } - -class MapRasterLayerImpl(nativeHandle: Any?) : MapRasterLayer(nativeHandle) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt index 1c3b1d434..d07760f8f 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -11,18 +11,18 @@ import MapCoreSharedModule.MCVectorLayerFeatureInfoValue actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle - actual abstract fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) - actual abstract fun _setGlobalState(state: Map) + actual abstract fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) + actual abstract fun setGlobalState(state: Map) } class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface - override fun _setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { + override fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { layer?.setSelectionDelegate(delegate) } - override fun _setGlobalState(state: Map) { + override fun setGlobalState(state: Map) { val mapped = mutableMapOf() state.forEach { (key, value) -> mapped[key] = value.asMapCore() From e1708f51c047a17393a84bab92d88a6328b9445a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 16:26:10 +0100 Subject: [PATCH 13/63] kmp: align expect/actual for camera and raster --- .../feature/map/interop/MapImplementations.kt | 21 +++++++++++++------ .../feature/map/interop/MapRasterLayer.kt | 2 +- .../feature/map/interop/MapCameraInterface.kt | 12 +++++------ .../interop/MapRasterLayerImplementation.kt | 2 +- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt index 4e544b506..d9fb3a6d5 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt @@ -64,12 +64,21 @@ private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) override fun getCamera(): MapCameraInterface? = cameraInterface } -actual abstract class MapCameraInterface actual constructor() { - actual abstract fun setBounds(bounds: RectCoord) - actual abstract fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) - actual abstract fun setMinZoom(zoom: Double) - actual abstract fun setMaxZoom(zoom: Double) - actual abstract fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) +actual open class MapCameraInterface actual constructor() { + open fun setBounds(bounds: RectCoord) { + } + + open fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { + } + + open fun setMinZoom(zoom: Double) { + } + + open fun setMaxZoom(zoom: Double) { + } + + open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + } } private class MapCameraInterfaceImpl(private val nativeHandle: Any?) : MapCameraInterface() { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt index fe049c900..849c1ba01 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt @@ -3,7 +3,7 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer import io.openmobilemaps.mapscore.shared.map.LayerInterface -actual open class MapRasterLayer actual constructor(nativeHandle: Any? = null) { +actual open class MapRasterLayer actual constructor(nativeHandle: Any?) { protected val nativeHandle: Any? = nativeHandle internal fun layerInterface(): LayerInterface? = diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt index 6a64da9a0..e8212cc11 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt @@ -1,9 +1,9 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect abstract class MapCameraInterface { - abstract fun setBounds(bounds: RectCoord) - abstract fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) - abstract fun setMinZoom(zoom: Double) - abstract fun setMaxZoom(zoom: Double) - abstract fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) +expect open class MapCameraInterface { + open fun setBounds(bounds: RectCoord) + open fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) + open fun setMinZoom(zoom: Double) + open fun setMaxZoom(zoom: Double) + open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt index 4797ac72d..ed6769624 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt @@ -9,7 +9,7 @@ import MapCoreSharedModule.MCLayerInterfaceProtocol @OptIn(ExperimentalObjCName::class) @ObjCName("MapRasterLayer", exact = true) actual open class MapRasterLayer actual constructor( - nativeHandle: Any? = null, + nativeHandle: Any?, ) { private val layer = nativeHandle as? MCTiled2dMapRasterLayerInterface From 1b2814958040f61ea02dbe22f1ef0fa592616ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 16:29:59 +0100 Subject: [PATCH 14/63] kmp: align camera parameter names --- .../feature/map/interop/MapImplementations.kt | 18 +++++++++--------- .../feature/map/interop/MapCameraInterface.kt | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt index d9fb3a6d5..bb7629445 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt @@ -68,13 +68,13 @@ actual open class MapCameraInterface actual constructor() { open fun setBounds(bounds: RectCoord) { } - open fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { + open fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { } - open fun setMinZoom(zoom: Double) { + open fun setMinZoom(minZoom: Double) { } - open fun setMaxZoom(zoom: Double) { + open fun setMaxZoom(maxZoom: Double) { } open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { @@ -88,16 +88,16 @@ private class MapCameraInterfaceImpl(private val nativeHandle: Any?) : MapCamera camera?.setBounds(bounds) } - override fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) { - camera?.moveToCenterPositionZoom(coord, zoom, animated) + override fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { + camera?.moveToCenterPositionZoom(centerPosition, zoom, animated) } - override fun setMinZoom(zoom: Double) { - camera?.setMinZoom(zoom) + override fun setMinZoom(minZoom: Double) { + camera?.setMinZoom(minZoom) } - override fun setMaxZoom(zoom: Double) { - camera?.setMaxZoom(zoom) + override fun setMaxZoom(maxZoom: Double) { + camera?.setMaxZoom(maxZoom) } override fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt index e8212cc11..e8ee996b7 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt @@ -2,8 +2,8 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop expect open class MapCameraInterface { open fun setBounds(bounds: RectCoord) - open fun moveToCenterPositionZoom(coord: Coord, zoom: Double, animated: Boolean) - open fun setMinZoom(zoom: Double) - open fun setMaxZoom(zoom: Double) + open fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) + open fun setMinZoom(minZoom: Double) + open fun setMaxZoom(maxZoom: Double) open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) } From 06f33ba248fa76522f49c21302caee149e043716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 16:33:46 +0100 Subject: [PATCH 15/63] kmp: fix camera expect/actual members --- .../kmp/core/feature/map/interop/MapImplementations.kt | 10 +++++----- .../kmp/core/feature/map/interop/MapCameraInterface.kt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt index bb7629445..79197c190 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt @@ -65,19 +65,19 @@ private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) } actual open class MapCameraInterface actual constructor() { - open fun setBounds(bounds: RectCoord) { + actual open fun setBounds(bounds: RectCoord) { } - open fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { + actual open fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { } - open fun setMinZoom(minZoom: Double) { + actual open fun setMinZoom(minZoom: Double) { } - open fun setMaxZoom(maxZoom: Double) { + actual open fun setMaxZoom(maxZoom: Double) { } - open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + actual open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { } } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt index e8ee996b7..9b647fa9f 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt @@ -1,6 +1,6 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect open class MapCameraInterface { +expect open class MapCameraInterface() { open fun setBounds(bounds: RectCoord) open fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) open fun setMinZoom(minZoom: Double) From 1bb478b76a5ab8176f25c5bb007ff8c974e7f41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 16:38:32 +0100 Subject: [PATCH 16/63] kmp: remove redundant layer cast --- .../core/feature/map/interop/MapRasterLayerImplementation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt index ed6769624..566061987 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt @@ -14,5 +14,5 @@ actual open class MapRasterLayer actual constructor( private val layer = nativeHandle as? MCTiled2dMapRasterLayerInterface internal fun layerInterface(): MCLayerInterfaceProtocol? = - layer?.asLayerInterface() as? MCLayerInterfaceProtocol + layer?.asLayerInterface() } From 573ad1265e9b159dffa6ff30fdd908cbe975ba47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 16:45:07 +0100 Subject: [PATCH 17/63] kmp: make GpsLayerHandle public --- .../mapscore/kmp/core/feature/map/interop/MapImplementations.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt index 79197c190..fa9775b3c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt @@ -235,7 +235,7 @@ private fun MapscoreGpsMode.asShared(): GpsMode = when (this) { MapscoreGpsMode.FOLLOW_AND_TURN -> GpsMode.FOLLOW } -internal data class GpsLayerHandle( +data class GpsLayerHandle( val layer: GpsLayer, val locationProvider: LocationProviderInterface, ) From a4f3341766d1121c1777a876cadd50fee813be90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 21:55:32 +0100 Subject: [PATCH 18/63] fix(kmp): add ios arm64 cinterop and spm fallback --- build.gradle.kts | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7c5d3ca82..c7318e29d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -57,11 +57,9 @@ kotlin { ) iosTargets.forEach { iosTarget -> - if (iosTarget.name == "iosSimulatorArm64") { - iosTarget.compilations { - val main by getting { - cinterops.create(mapCoreCinteropName) - } + iosTarget.compilations { + val main by getting { + cinterops.create(mapCoreCinteropName) } } } @@ -136,6 +134,33 @@ val mapCoreSpmBuiltDir = project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64 x86_64-apple-ios-simulator/release").get().asFile mapCoreSpmBuiltDir.mkdirs() +val mapCoreSpmDeviceDir = + project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios/release") +val mapCoreSpmSimulatorDir = + project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios-simulator/release") + +afterEvaluate { + val deviceTaskName = "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64" + if (tasks.findByName(deviceTaskName) != null) return@afterEvaluate + + val simulatorTaskName = "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosSimulatorArm64" + tasks.register(deviceTaskName) { + group = "io.github.frankois944.spmForKmp.tasks" + description = "Fallback: copy simulator SwiftPM output for iOS device metal compilation" + dependsOn(simulatorTaskName) + doLast { + val sourceDir = mapCoreSpmSimulatorDir.get().asFile + if (!sourceDir.exists()) return@doLast + val targetDir = mapCoreSpmDeviceDir.get().asFile + targetDir.mkdirs() + copy { + from(sourceDir) + into(targetDir) + } + } + } +} + abstract class CompileMapCoreMetallibTask : DefaultTask() { @get:Input abstract val sdk: Property From 09becdb282a10a56ce77fe4dda02f0de43218fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 26 Jan 2026 22:06:26 +0100 Subject: [PATCH 19/63] fix(kmp): avoid duplicate spm task registration --- build.gradle.kts | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c7318e29d..a28e67a6f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -141,23 +141,29 @@ val mapCoreSpmSimulatorDir = afterEvaluate { val deviceTaskName = "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64" - if (tasks.findByName(deviceTaskName) != null) return@afterEvaluate - val simulatorTaskName = "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosSimulatorArm64" - tasks.register(deviceTaskName) { - group = "io.github.frankois944.spmForKmp.tasks" - description = "Fallback: copy simulator SwiftPM output for iOS device metal compilation" - dependsOn(simulatorTaskName) - doLast { - val sourceDir = mapCoreSpmSimulatorDir.get().asFile - if (!sourceDir.exists()) return@doLast - val targetDir = mapCoreSpmDeviceDir.get().asFile - targetDir.mkdirs() - copy { - from(sourceDir) - into(targetDir) + if (tasks.findByName(deviceTaskName) != null) return@afterEvaluate + runCatching { + tasks.register(deviceTaskName) { + group = "io.github.frankois944.spmForKmp.tasks" + description = "Fallback: copy simulator SwiftPM output for iOS device metal compilation" + dependsOn(simulatorTaskName) + doLast { + val sourceDir = mapCoreSpmSimulatorDir.get().asFile + if (!sourceDir.exists()) return@doLast + val targetDir = mapCoreSpmDeviceDir.get().asFile + targetDir.mkdirs() + copy { + from(sourceDir) + into(targetDir) + } } } + }.onFailure { error -> + val message = error.message.orEmpty() + if (!message.contains("already exists")) { + throw error + } } } From 328de4c467c6b3fe88ff1715069afa686eb8d3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 06:49:48 +0100 Subject: [PATCH 20/63] update gradle --- .gitignore | 1 + build.gradle.kts | 19 +++++-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 9407b7681..e93dc8b12 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,4 @@ compile_commands.json cmake-build-test /local.properties +/.gradle diff --git a/build.gradle.kts b/build.gradle.kts index a28e67a6f..354f73fd1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,7 +34,7 @@ val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARG plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" - id("com.android.library") version "8.12.0" + id("com.android.kotlin.multiplatform.library") version "8.12.0" id("io.github.frankois944.spmForKmp") version "1.4.6" } @@ -44,10 +44,13 @@ kotlin { freeCompilerArgs.add("-Xexpect-actual-classes") // Opt-in for expect/actual classes } - androidTarget { + android { compilerOptions { jvmTarget.set(JvmTarget.JVM_17) } + namespace = "io.openmobilemaps.mapscore.kmp" + compileSdk = 36 + minSdk = 31 } val mapCoreCinteropName = "MapCoreKmp" @@ -295,15 +298,3 @@ tasks.matching { it.name == "compileKotlinIosSimulatorArm64" } .configureEach { dependsOn(compileMapCoreMetallibIosSimulator) } tasks.matching { it.name == "compileKotlinIosArm64" } .configureEach { dependsOn(compileMapCoreMetallibIosArm64) } - -android { - namespace = "io.openmobilemaps.mapscore.kmp" - compileSdk = 36 - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - defaultConfig { - minSdk = 31 - } -} From 0a644ec18049c965c6b054b9dad6fa378124cbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 07:06:09 +0100 Subject: [PATCH 21/63] remove dependsOn --- build.gradle.kts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 354f73fd1..c63463393 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -84,16 +84,13 @@ kotlin { implementation("ch.ubique.android:djinni-support-lib:1.1.1") } } - val iosMain by creating { - dependsOn(commonMain) + val iosMain by getting { kotlin.srcDir("kmp/iosMain/kotlin") } val iosArm64Main by getting { - dependsOn(iosMain) languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } val iosSimulatorArm64Main by getting { - dependsOn(iosMain) languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } } From 555bd913dc5d36cd2ceabf05b520a28943913aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 07:20:06 +0100 Subject: [PATCH 22/63] targetHierarchy.default() --- build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index c63463393..ab7c12b16 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,6 +44,8 @@ kotlin { freeCompilerArgs.add("-Xexpect-actual-classes") // Opt-in for expect/actual classes } + applyDefaultHierarchyTemplate() + android { compilerOptions { jvmTarget.set(JvmTarget.JVM_17) From c37b8e62ec9387631fc2455c4e10a171be92a739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 09:25:54 +0100 Subject: [PATCH 23/63] improve kmp setup --- build.gradle.kts | 31 +++++++++++++++++++++++++++++++ gradle.properties | 1 + 2 files changed, 32 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index ab7c12b16..6cf8cbe59 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -125,6 +125,37 @@ swiftPackageConfig { } } +// Avoid overlapping Package.resolved outputs between per-target SwiftPM compile tasks. +tasks + .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackage") } + .configureEach { + val packageResolveFileGetter = javaClass.methods.firstOrNull { it.name == "getPackageResolveFile" } + val packageResolveFile = + project.layout.buildDirectory.file( + "spmKmpPlugin/MapCoreKmp/package-resolved/${name}/Package.resolved", + ) + val packageResolveProperty = + packageResolveFileGetter + ?.invoke(this) as? RegularFileProperty + packageResolveProperty?.set(packageResolveFile) + + doLast { + val sourceFile = + project.layout.buildDirectory + .file("spmKmpPlugin/MapCoreKmp/Package.resolved") + .get() + .asFile + if (!sourceFile.exists()) return@doLast + val targetFile = + project.layout.buildDirectory + .file("spmKmpPlugin/MapCoreKmp/package-resolved/${name}/Package.resolved") + .get() + .asFile + targetFile.parentFile.mkdirs() + sourceFile.copyTo(targetFile, overwrite = true) + } + } + tasks.withType().configureEach { if (name.contains("MapCoreKmp")) { settings.compilerOpts("-I$mapCoreCheckoutPath/external/djinni/support-lib/objc") diff --git a/gradle.properties b/gradle.properties index 5bac8ac50..b65e5f51d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ android.useAndroidX=true +kotlin.mpp.enableCInteropCommonization=true From 7fa24871d078389c3e51e6bdf78eeb0a22900db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 10:02:26 +0100 Subject: [PATCH 24/63] configure tasks --- build.gradle.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 6cf8cbe59..409d3e217 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -324,6 +324,11 @@ val compileMapCoreMetallibIosArm64 = tasks.register( metallibFile.set(bundleDir.map { it.file("default.metallib") }) } +tasks.matching { it.name == "SwiftPackageConfigAppleMapCoreKmpCopyPackageResourcesIosSimulatorArm64" } + .configureEach { dependsOn(compileMapCoreMetallibIosSimulator) } +tasks.matching { it.name == "SwiftPackageConfigAppleMapCoreKmpCopyPackageResourcesIosArm64" } + .configureEach { dependsOn(compileMapCoreMetallibIosArm64) } + tasks.matching { it.name == "compileKotlinIosSimulatorArm64" } .configureEach { dependsOn(compileMapCoreMetallibIosSimulator) } tasks.matching { it.name == "compileKotlinIosArm64" } From f7ba2aedb624ad45bdd74e837a48ff81d13fea49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 13:11:18 +0100 Subject: [PATCH 25/63] kmp: opt in to ExperimentalForeignApi for Coord --- .../mapscore/kmp/core/feature/map/interop/Coord.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt index 4e299f4c5..799b5220c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt @@ -1,3 +1,5 @@ +@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class) + package io.openmobilemaps.mapscore.kmp.feature.map.interop import MapCoreSharedModule.MCCoord From 3c6206c362cff366e1f062743a5176094eb7d2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 13:12:21 +0100 Subject: [PATCH 26/63] kmp: opt in to ExperimentalForeignApi in iosMain --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index 409d3e217..8a78f5a6f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -88,6 +88,7 @@ kotlin { } val iosMain by getting { kotlin.srcDir("kmp/iosMain/kotlin") + languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } val iosArm64Main by getting { languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") From 173c8dde58ce9eced5ea450c1972709824120afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 27 Jan 2026 13:15:26 +0100 Subject: [PATCH 27/63] kmp: drop redundant ExperimentalForeignApi opt-in --- .../mapscore/kmp/core/feature/map/interop/Coord.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt index 799b5220c..4e299f4c5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt @@ -1,5 +1,3 @@ -@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class) - package io.openmobilemaps.mapscore.kmp.feature.map.interop import MapCoreSharedModule.MCCoord From fa80dbb76b0c29b501d518afdac4ff9bbb311d1e Mon Sep 17 00:00:00 2001 From: Christoph Maurhofer Date: Wed, 28 Jan 2026 14:18:34 +0100 Subject: [PATCH 28/63] Adjust android multiplatform plugin version, adjust minSDK for android --- .gitignore | 1 + build.gradle.kts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e93dc8b12..51ad34768 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,4 @@ compile_commands.json cmake-build-test /local.properties /.gradle +/.kotlin diff --git a/build.gradle.kts b/build.gradle.kts index 8a78f5a6f..21e705874 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,6 +12,7 @@ import org.gradle.api.tasks.TaskAction import org.gradle.process.ExecOperations import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinAndroidTarget import org.jetbrains.kotlin.gradle.tasks.CInteropProcess import java.net.URI import javax.inject.Inject @@ -34,7 +35,7 @@ val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARG plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" - id("com.android.kotlin.multiplatform.library") version "8.12.0" + id("com.android.kotlin.multiplatform.library") version "8.13.2" id("io.github.frankois944.spmForKmp") version "1.4.6" } @@ -52,7 +53,7 @@ kotlin { } namespace = "io.openmobilemaps.mapscore.kmp" compileSdk = 36 - minSdk = 31 + minSdk = 28 } val mapCoreCinteropName = "MapCoreKmp" From aa3b2f767db9b8eedd0e4cad7deeaf471f8e5f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Wed, 28 Jan 2026 10:49:10 +0100 Subject: [PATCH 29/63] ignore .kotlin --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 51ad34768..08b088cd4 100644 --- a/.gitignore +++ b/.gitignore @@ -91,4 +91,4 @@ compile_commands.json cmake-build-test /local.properties /.gradle -/.kotlin +.kotlin From f05d8a70971407db1e3273666fc4a9bceaf9a9dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 10:07:30 +0100 Subject: [PATCH 30/63] update bridging --- kmp/INTEROP_MAPPING.md | 263 ++++++++++++++++++ .../kmp/core/feature/map/interop/Color.kt | 5 + .../IndexedLayerInterfaceImplementation.kt | 16 ++ .../interop/LayerInterfaceImplementation.kt | 90 ++++++ .../MapCameraInterfaceImplementation.kt | 230 +++++++++++++++ .../map/interop/MapCoreTypesAndroid.kt | 106 +++++++ ...ProviderLocalDataProviderImplementation.kt | 4 +- .../map/interop/MapFactoryImplementation.kt | 2 +- .../map/interop/MapGpsLayerImplementation.kt | 65 +++++ .../feature/map/interop/MapImplementations.kt | 241 ---------------- .../map/interop/MapInterfaceImplementation.kt | 197 +++++++++++++ .../feature/map/interop/MapRasterLayer.kt | 10 +- .../MapTiled2dMapLayerConfigImplementation.kt | 13 +- .../interop/MapVectorLayerImplementation.kt | 62 +++++ .../MapVectorLayerSelectionCallbackProxy.kt | 27 +- .../feature/map/interop/RecordTypealiases.kt | 23 ++ .../interop/Tiled2dMapVectorLayerInterface.kt | 46 +++ .../Tiled2dMapVectorLayerTypesAndroid.kt | 34 +++ .../feature/map/interop/Camera3dConfig.kt | 44 +++ .../kmp/core/feature/map/interop/Color.kt | 13 + .../map/interop/IndexedLayerInterface.kt | 8 + .../feature/map/interop/LayerInterface.kt | 29 ++ .../core/feature/map/interop/MapCallbacks.kt | 17 ++ .../map/interop/MapCamera3dInterface.kt | 14 + .../feature/map/interop/MapCameraInterface.kt | 80 +++++- .../map/interop/MapCameraListenerInterface.kt | 19 ++ .../kmp/core/feature/map/interop/MapConfig.kt | 7 + .../map/interop/MapCoordinateSystem.kt | 11 + .../core/feature/map/interop/MapCoreTypes.kt | 53 ++++ .../core/feature/map/interop/MapGpsLayer.kt | 12 +- .../core/feature/map/interop/MapInterface.kt | 81 +++++- .../feature/map/interop/MapRasterLayer.kt | 2 +- .../map/interop/MapTiled2dMapLayerConfig.kt | 28 +- .../feature/map/interop/MapVectorLayer.kt | 6 +- .../map/interop/MapVectorLayerFeatureInfo.kt | 10 +- .../MapVectorLayerSelectionCallback.kt | 10 +- .../kmp/core/feature/map/interop/RectI.kt | 13 + .../interop/Tiled2dMapVectorLayerInterface.kt | 19 ++ .../map/interop/Tiled2dMapVectorLayerTypes.kt | 17 ++ .../kmp/core/feature/map/interop/Vec2F.kt | 9 + .../kmp/core/feature/map/interop/Vec2I.kt | 9 + .../kmp/core/feature/map/interop/Vec3D.kt | 11 + .../kmp/core/feature/map/interop/Color.kt | 5 + .../IndexedLayerInterfaceImplementation.kt | 16 ++ .../interop/LayerInterfaceImplementation.kt | 91 ++++++ .../MapCameraInterfaceImplementation.kt | 245 ++++++++++++++++ .../feature/map/interop/MapCoreTypesIos.kt | 106 +++++++ .../map/interop/MapFactoryImplementation.kt | 2 +- .../map/interop/MapGpsLayerImplementation.kt | 15 +- .../map/interop/MapInterfaceImplementation.kt | 226 ++++++++++++--- .../interop/MapRasterLayerImplementation.kt | 11 +- .../MapTiled2dMapLayerConfigImplementation.kt | 11 +- .../interop/MapVectorLayerImplementation.kt | 49 ++-- .../MapVectorLayerSelectionCallbackProxy.kt | 41 ++- .../feature/map/interop/MapViewWrapper.kt | 2 +- .../feature/map/interop/RecordTypealiases.kt | 23 ++ .../interop/Tiled2dMapVectorLayerInterface.kt | 46 +++ .../interop/Tiled2dMapVectorLayerTypesIos.kt | 34 +++ .../feature/map/interop/MapInterface.ios.kt | 5 + .../MapCoreKmp/StartYourBridgeHere.swift | 15 + 60 files changed, 2483 insertions(+), 416 deletions(-) create mode 100644 kmp/INTEROP_MAPPING.md create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt create mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt create mode 100644 src/swift/MapCoreKmp/StartYourBridgeHere.swift diff --git a/kmp/INTEROP_MAPPING.md b/kmp/INTEROP_MAPPING.md new file mode 100644 index 000000000..5aba999ae --- /dev/null +++ b/kmp/INTEROP_MAPPING.md @@ -0,0 +1,263 @@ +# KMP ↔ Djinni Interop Mapping (Maps Core) + +This document defines **the canonical mapping patterns** for KMP APIs that must be **drop‑in replacements on Android** (using Djinni types) and **wrappable on iOS** (ObjC/Swift interop). It is intended to be a **consistent recipe** for all maps‑core APIs. + +## Goals + +- **Common API is KMP‑first**: `expect` declarations in `commonMain`. +- **Android is drop‑in**: actuals map to Djinni types wherever possible. +- **iOS is implementable**: actuals wrap ObjC interfaces with minimal glue. +- **Predictable patterns**: same shapes across all APIs, minimal surprises. + +--- + +## 1) Type Mapping Decisions + +### Djinni records (structs / data) +- [x] **Selected:** `expect class` in `commonMain` with constructor + properties. Actuals are **`typealias`** to Djinni records when signatures match. +- [ ] Wrapper class (custom Kotlin data class, manual mapping). +- [ ] `expect data class` always (even if actual can be alias). + +**Why:** Djinni records already match Kotlin data classes. `typealias` makes Android drop‑in and iOS easy (ObjC record classes). Wrapper is only used when names or defaults differ. + +### Djinni enums +- [x] **Selected:** `expect enum class` with **actual `typealias`** on Android and iOS when possible. +- [ ] Wrapper enum mapping to Djinni enum values. + +**Why:** Direct alias avoids extra mapping and stays drop‑in on Android. + +### Djinni interfaces (class‑like) +- [x] **Selected:** `expect class` with `nativeHandle: Any?` and instance methods. Actuals: + - **Android:** wrapper around Djinni interface (not typealias), unless the Djinni type already exactly matches expected API. + - **iOS:** wrapper around ObjC interface (store ObjC instance in `nativeHandle`). +- [ ] `typealias` for all interfaces. + +**Why:** iOS needs a wrapper to manage ObjC lifetimes and method translation. Keeping a wrapper in both platforms makes the API consistent and allows optional adaptation. + +--- + +## 2) Factory / Static Methods + +### Djinni static creators +- [x] **Selected:** `companion object` in the `expect class` with factory methods. Actuals forward to Djinni static and return **wrapper instances**. +- [ ] Standalone `expect object` for all factories. +- [ ] Global top‑level functions. + +**Why:** Mirrors Djinni static methods closely and keeps the type cohesive. Works for both platforms and preserves Android drop‑in behavior. + +**Pattern:** +```kotlin +// commonMain +expect class Foo constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + companion object { + fun create(...): Foo? + } +} +``` + +--- + +## 3) Arguments & Return Types + +### Non‑primitive arguments +- [x] **Selected:** Common API uses **KMP wrapper types**, not Djinni types directly. +- [ ] Expose Djinni types in common API. + +**Why:** Common API should be platform‑agnostic. Wrappers give room for platform differences. + +### Collections +- [x] **Selected:** Use `List` / `Map` in common. Convert to `ArrayList` / `HashMap` in platform actuals as needed. +- [ ] Use mutable collections everywhere. + +**Why:** `List`/`Map` is idiomatic and safer in common. Convert only where Djinni requires mutable types. + +### Optionals +- [x] **Selected:** Kotlin nullable types (`T?`) for Djinni `optional`. + +--- + +## 4) Callbacks + +### Djinni callback interfaces +- [x] **Selected:** Common `interface` for callbacks, plus **platform proxy** that implements Djinni callback interface and forwards to the common callback. +- [ ] Expose Djinni callback interface directly in common. + +**Why:** Common code should not depend on Djinni types. A proxy keeps the boundary clean. + +**Selected API shape:** +```kotlin +// commonMain +interface SelectionCallback { + fun didSelectFeature(feature: FeatureInfo, layerIdentifier: String, coord: Coord): Boolean + fun didMultiSelectLayerFeatures(features: List, layerIdentifier: String, coord: Coord): Boolean + fun didClickBackgroundConfirmed(coord: Coord): Boolean +} +``` + +--- + +## 5) Async & Future Types + +- [x] **Selected:** Keep Djinni future types **in platform layer only**, translate to `suspend` in common API when needed. +- [ ] Expose Djinni Future in common. + +**Why:** KMP callers should use Kotlin concurrency primitives. Platform adapters can bridge futures. + +--- + +## 6) Ownership & Lifecycle + +- [x] **Selected:** Wrapper types may expose `close()`/`destroy()` if Djinni object requires disposal. If not, omit. +- [ ] Always expose `close()` even if unused. + +**Why:** Keep API minimal but safe when required by Djinni. + +--- + +## 7) Naming & Interop + +- [x] **Selected:** Keep KMP names close to Djinni names, but **no `MC` prefix** in common. +- [ ] Mirror ObjC names exactly in common. + +**Why:** KMP API should be platform‑agnostic and readable. Prefixes are implementation details. + +--- + +# Templates + +## A) Record (Djinni `record`) +```kotlin +// commonMain +expect class Coord( + systemIdentifier: Int, + x: Double, + y: Double, + z: Double, +) { + val systemIdentifier: Int + val x: Double + val y: Double + val z: Double +} + +// androidMain +actual typealias Coord = io.openmobilemaps.mapscore.shared.map.coordinates.Coord + +// iosMain +actual typealias Coord = MapCoreSharedModule.MCCoord +``` + +## B) Interface Wrapper (Djinni `interface`) +```kotlin +// commonMain +expect class MapVectorLayer constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + fun setSelectionDelegate(delegate: SelectionCallback?) + fun setGlobalState(state: Map) +} + +// androidMain +actual class MapVectorLayer actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val layer = nativeHandle as? MapscoreVectorLayerInterface + + actual fun setSelectionDelegate(delegate: SelectionCallback?) { + val proxy = delegate?.let { SelectionCallbackProxy(it) } + layer?.setSelectionDelegate(proxy) + } + + actual fun setGlobalState(state: Map) { + // map → Djinni + } +} + +// iosMain +actual class MapVectorLayer actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface + + actual fun setSelectionDelegate(delegate: SelectionCallback?) { + val proxy = delegate?.let { SelectionCallbackProxy(it) } + layer?.setSelectionDelegate(proxy) + } + + actual fun setGlobalState(state: Map) { + // map → ObjC + } +} +``` + +## C) Static Creator (Djinni `static`) +```kotlin +// commonMain +expect class VectorLayer constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + companion object { + fun createExplicitly(...): VectorLayer? + } +} + +// androidMain +actual class VectorLayer actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + actual companion object { + actual fun createExplicitly(...): VectorLayer? { + val raw = DjinniVectorLayerInterface.createExplicitly(...) + return raw?.let { VectorLayer(it) } + } + } +} + +// iosMain +actual class VectorLayer actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + actual companion object { + actual fun createExplicitly(...): VectorLayer? { + val raw = MCVectorLayerInterface.createExplicitly(...) + return raw?.let { VectorLayer(it) } + } + } +} +``` + +## D) Callback Proxy +```kotlin +// commonMain +interface SelectionCallback { ... } + +// androidMain +actual class SelectionCallbackProxy actual constructor( + private val handler: SelectionCallback, +) : MapscoreSelectionCallbackInterface() { + override fun didSelectFeature(...): Boolean = + handler.didSelectFeature(...) +} + +// iosMain +actual class SelectionCallbackProxy actual constructor( + private val handler: SelectionCallback, +) : NSObject(), MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol { + override fun didSelectFeature(...): Boolean = + handler.didSelectFeature(...) +} +``` + +--- + +## When to Deviate +- **Defaults / renames required:** use a wrapper instead of typealias. +- **Async API surface:** expose suspend/Flow in common and bridge in actuals. +- **Performance‑critical:** consider direct alias on Android only, but keep wrapper for iOS. + +--- + +## Checklist for New API +1. Does it exist in Djinni? → use these mappings. +2. Record/enum? → expect + typealias. +3. Interface? → wrapper + `nativeHandle`. +4. Static creators? → companion object forwarding. +5. Callback? → common interface + platform proxy. +6. Any list/map? → use Kotlin `List/Map`, convert in actuals. +7. Any optional? → Kotlin nullable. + diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt new file mode 100644 index 000000000..335f6c8f0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.graphics.common.Color as MapscoreColor + +actual typealias Color = MapscoreColor diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt new file mode 100644 index 000000000..7a62fa82a --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt @@ -0,0 +1,16 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface as MapscoreIndexedLayerInterface + +actual open class IndexedLayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val indexedLayer = nativeHandle as? MapscoreIndexedLayerInterface + + actual fun getLayerInterface(): LayerInterface = + LayerInterface(indexedLayer?.getLayerInterface()) + + actual fun getIndex(): Int = indexedLayer?.getIndex() ?: 0 +} + +internal fun IndexedLayerInterface.asMapscore(): MapscoreIndexedLayerInterface? = + nativeHandle as? MapscoreIndexedLayerInterface diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt new file mode 100644 index 000000000..c6507117f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt @@ -0,0 +1,90 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.LayerInterface as MapscoreLayerInterface +import io.openmobilemaps.mapscore.shared.map.LayerReadyState as MapscoreLayerReadyState + +actual open class LayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + + private val layer = nativeHandle as? MapscoreLayerInterface + + actual fun setMaskingObject(maskingObject: MaskingObjectInterface?) { + layer?.setMaskingObject(maskingObject?.asMapscore()) + } + + actual fun update() { + layer?.update() + } + + actual fun buildRenderPasses(): List { + return layer?.buildRenderPasses()?.map { RenderPassInterface(it) } ?: emptyList() + } + + actual fun buildComputePasses(): List { + return layer?.buildComputePasses()?.map { ComputePassInterface(it) } ?: emptyList() + } + + actual fun onAdded(mapInterface: MapInterface, layerIndex: Int) { + layer?.onAdded(mapInterface.asMapscore(), layerIndex) + } + + actual fun onRemoved() { + layer?.onRemoved() + } + + actual fun pause() { + layer?.pause() + } + + actual fun resume() { + layer?.resume() + } + + actual fun hide() { + layer?.hide() + } + + actual fun show() { + layer?.show() + } + + actual fun setAlpha(alpha: Float) { + layer?.setAlpha(alpha) + } + + actual fun getAlpha(): Float = layer?.getAlpha() ?: 0f + + actual fun setScissorRect(scissorRect: RectI?) { + layer?.setScissorRect(scissorRect) + } + + actual fun isReadyToRenderOffscreen(): LayerReadyState = + layer?.isReadyToRenderOffscreen().asShared() + + actual fun enableAnimations(enabled: Boolean) { + layer?.enableAnimations(enabled) + } + + actual fun setErrorManager(errorManager: ErrorManager) { + layer?.setErrorManager(errorManager.asMapscore()) + } + + actual fun forceReload() { + layer?.forceReload() + } + + actual fun setPrimaryRenderTarget(target: RenderTargetInterface?) { + layer?.setPrimaryRenderTarget(target?.asMapscore()) + } +} + +internal fun LayerInterface.asMapscore(): MapscoreLayerInterface? = + nativeHandle as? MapscoreLayerInterface + +internal fun MapscoreLayerReadyState?.asShared(): LayerReadyState = when (this) { + MapscoreLayerReadyState.READY -> LayerReadyState.READY + MapscoreLayerReadyState.NOT_READY -> LayerReadyState.NOT_READY + MapscoreLayerReadyState.ERROR -> LayerReadyState.ERROR + MapscoreLayerReadyState.TIMEOUT_ERROR -> LayerReadyState.TIMEOUT_ERROR + null -> LayerReadyState.NOT_READY +} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt new file mode 100644 index 000000000..8830fb6bb --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt @@ -0,0 +1,230 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface as MapscoreMapCamera3dInterface +import io.openmobilemaps.mapscore.shared.map.MapCameraInterface as MapscoreMapCameraInterface +import io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface as MapscoreMapCameraListenerInterface + +actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val camera = nativeHandle as? MapscoreMapCameraInterface + + actual companion object { + actual fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface { + val created = MapscoreMapCameraInterface.create(requireNotNull(mapInterface.asMapscore()), screenDensityPpi, is3d) + return MapCameraInterface(created) + } + } + + actual fun freeze(freeze: Boolean) { + camera?.freeze(freeze) + } + + actual fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { + camera?.moveToCenterPositionZoom(centerPosition, zoom, animated) + } + + actual fun moveToCenterPosition(centerPosition: Coord, animated: Boolean) { + camera?.moveToCenterPosition(centerPosition, animated) + } + + actual fun moveToBoundingBox(boundingBox: RectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) { + camera?.moveToBoundingBox(boundingBox, paddingPc, animated, minZoom, maxZoom) + } + + actual fun getCenterPosition(): Coord = requireNotNull(camera?.getCenterPosition()) + + actual fun setZoom(zoom: Double, animated: Boolean) { + camera?.setZoom(zoom, animated) + } + + actual fun getZoom(): Double = requireNotNull(camera?.getZoom()) + + actual fun setRotation(angle: Float, animated: Boolean) { + camera?.setRotation(angle, animated) + } + + actual fun getRotation(): Float = requireNotNull(camera?.getRotation()) + + actual fun setMinZoom(minZoom: Double) { + camera?.setMinZoom(minZoom) + } + + actual fun setMaxZoom(maxZoom: Double) { + camera?.setMaxZoom(maxZoom) + } + + actual fun getMinZoom(): Double = requireNotNull(camera?.getMinZoom()) + + actual fun getMaxZoom(): Double = requireNotNull(camera?.getMaxZoom()) + + actual fun setBounds(bounds: RectCoord) { + camera?.setBounds(bounds) + } + + actual fun getBounds(): RectCoord = requireNotNull(camera?.getBounds()) + + actual fun isInBounds(coords: Coord): Boolean = camera?.isInBounds(coords) ?: false + + actual fun setPaddingLeft(padding: Float) { + camera?.setPaddingLeft(padding) + } + + actual fun setPaddingRight(padding: Float) { + camera?.setPaddingRight(padding) + } + + actual fun setPaddingTop(padding: Float) { + camera?.setPaddingTop(padding) + } + + actual fun setPaddingBottom(padding: Float) { + camera?.setPaddingBottom(padding) + } + + actual fun getVisibleRect(): RectCoord = requireNotNull(camera?.getVisibleRect()) + + actual fun getPaddingAdjustedVisibleRect(): RectCoord = requireNotNull(camera?.getPaddingAdjustedVisibleRect()) + + actual fun getScreenDensityPpi(): Float = requireNotNull(camera?.getScreenDensityPpi()) + + actual fun update() { + camera?.update() + } + + actual fun getInvariantModelMatrix(coordinate: Coord, scaleInvariant: Boolean, rotationInvariant: Boolean): List = + camera?.getInvariantModelMatrix(coordinate, scaleInvariant, rotationInvariant) ?: emptyList() + + actual fun addListener(listener: MapCameraListenerInterface) { + camera?.addListener(MapCameraListenerProxy(listener)) + } + + actual fun removeListener(listener: MapCameraListenerInterface) { + camera?.removeListener(MapCameraListenerProxy(listener)) + } + + actual fun notifyListenerBoundsChange() { + camera?.notifyListenerBoundsChange() + } + + actual fun coordFromScreenPosition(posScreen: Vec2F): Coord = + requireNotNull(camera?.coordFromScreenPosition(posScreen)) + + actual fun coordFromScreenPositionZoom(posScreen: Vec2F, zoom: Float): Coord = + requireNotNull(camera?.coordFromScreenPositionZoom(posScreen, zoom)) + + actual fun screenPosFromCoord(coord: Coord): Vec2F = + requireNotNull(camera?.screenPosFromCoord(coord)) + + actual fun screenPosFromCoordZoom(coord: Coord, zoom: Float): Vec2F = + requireNotNull(camera?.screenPosFromCoordZoom(coord, zoom)) + + actual fun mapUnitsFromPixels(distancePx: Double): Double = requireNotNull(camera?.mapUnitsFromPixels(distancePx)) + + actual fun getScalingFactor(): Double = requireNotNull(camera?.getScalingFactor()) + + actual fun coordIsVisibleOnScreen(coord: Coord, paddingPc: Float): Boolean = + camera?.coordIsVisibleOnScreen(coord, paddingPc) ?: false + + actual fun setRotationEnabled(enabled: Boolean) { + camera?.setRotationEnabled(enabled) + } + + actual fun setSnapToNorthEnabled(enabled: Boolean) { + camera?.setSnapToNorthEnabled(enabled) + } + + actual fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + camera?.setBoundsRestrictWholeVisibleRect(enabled) + } + + actual fun asCameraInterface(): CameraInterface = CameraInterface(requireNotNull(camera?.asCameraInterface())) + + actual fun getLastVpMatrixD(): List? = camera?.getLastVpMatrixD() + + actual fun getLastVpMatrix(): List? = camera?.getLastVpMatrix() + + actual fun getLastInverseVpMatrix(): List? = camera?.getLastInverseVpMatrix() + + actual fun getLastVpMatrixViewBounds(): RectCoord? = camera?.getLastVpMatrixViewBounds() + + actual fun getLastVpMatrixRotation(): Float? = camera?.getLastVpMatrixRotation() + + actual fun getLastVpMatrixZoom(): Float? = camera?.getLastVpMatrixZoom() + + actual fun getLastCameraPosition(): Vec3D? = camera?.getLastCameraPosition() + + actual fun asMapCamera3d(): MapCamera3dInterface? = camera?.asMapCamera3d()?.let { MapCamera3dInterface(it) } +} + +internal fun MapCameraInterface.asMapscore(): MapscoreMapCameraInterface? = + nativeHandle as? MapscoreMapCameraInterface + +private class MapCameraListenerProxy( + private val handler: MapCameraListenerInterface, +) : MapscoreMapCameraListenerInterface() { + override fun onVisibleBoundsChanged(visibleBounds: RectCoord, zoom: Double) { + handler.onVisibleBoundsChanged(visibleBounds, zoom) + } + + override fun onRotationChanged(angle: Float) { + handler.onRotationChanged(angle) + } + + override fun onMapInteraction() { + handler.onMapInteraction() + } + + override fun onCameraChange( + viewMatrix: ArrayList, + projectionMatrix: ArrayList, + origin: Vec3D, + verticalFov: Float, + horizontalFov: Float, + width: Float, + height: Float, + focusPointAltitude: Float, + focusPointPosition: Coord, + zoom: Float, + ) { + handler.onCameraChange( + viewMatrix = viewMatrix, + projectionMatrix = projectionMatrix, + origin = origin, + verticalFov = verticalFov, + horizontalFov = horizontalFov, + width = width, + height = height, + focusPointAltitude = focusPointAltitude, + focusPointPosition = focusPointPosition, + zoom = zoom, + ) + } +} + +actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val camera3d = nativeHandle as? MapscoreMapCamera3dInterface + + actual fun getCameraConfig(): Camera3dConfig = requireNotNull(camera3d?.getCameraConfig()) + + actual fun setCameraConfig( + config: Camera3dConfig, + durationSeconds: Float?, + targetZoom: Float?, + targetCoordinate: Coord?, + ) { + camera3d?.setCameraConfig(config, durationSeconds, targetZoom, targetCoordinate) + } +} + +actual class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + + actual companion object { + actual fun getBasicConfig(): Camera3dConfig = + io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getBasicConfig() + + actual fun getRestorConfig(): Camera3dConfig = + io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getRestorConfig() + } +} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt new file mode 100644 index 000000000..f16d17c3d --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt @@ -0,0 +1,106 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.graphics.CameraInterface as MapscoreCameraInterface +import io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface as MapscoreComputePassInterface +import io.openmobilemaps.mapscore.shared.graphics.MaskingObjectInterface as MapscoreMaskingObjectInterface +import io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface as MapscoreRenderPassInterface +import io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface as MapscoreRenderTargetInterface +import io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface as MapscoreRenderingContextInterface +import io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface as MapscoreGraphicsObjectFactoryInterface +import io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface as MapscoreShaderFactoryInterface +import io.openmobilemaps.mapscore.shared.map.ErrorManager as MapscoreErrorManager +import io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface as MapscorePerformanceLoggerInterface +import io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface as MapscoreTouchHandlerInterface +import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface as MapscoreCoordinateConversionHelperInterface +import io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface as MapscoreSchedulerInterface + +actual open class GraphicsObjectFactoryInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class ShaderFactoryInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class RenderingContextInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class SchedulerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class TouchHandlerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class PerformanceLoggerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class CoordinateConversionHelperInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class RenderTargetInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class RenderPassInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class ComputePassInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class MaskingObjectInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class ErrorManager actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class CameraInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +internal fun GraphicsObjectFactoryInterface.asMapscore(): MapscoreGraphicsObjectFactoryInterface? = + nativeHandle as? MapscoreGraphicsObjectFactoryInterface + +internal fun ShaderFactoryInterface.asMapscore(): MapscoreShaderFactoryInterface? = + nativeHandle as? MapscoreShaderFactoryInterface + +internal fun RenderingContextInterface.asMapscore(): MapscoreRenderingContextInterface? = + nativeHandle as? MapscoreRenderingContextInterface + +internal fun SchedulerInterface.asMapscore(): MapscoreSchedulerInterface? = + nativeHandle as? MapscoreSchedulerInterface + +internal fun TouchHandlerInterface.asMapscore(): MapscoreTouchHandlerInterface? = + nativeHandle as? MapscoreTouchHandlerInterface + +internal fun PerformanceLoggerInterface.asMapscore(): MapscorePerformanceLoggerInterface? = + nativeHandle as? MapscorePerformanceLoggerInterface + +internal fun CoordinateConversionHelperInterface.asMapscore(): MapscoreCoordinateConversionHelperInterface? = + nativeHandle as? MapscoreCoordinateConversionHelperInterface + +internal fun RenderTargetInterface.asMapscore(): MapscoreRenderTargetInterface? = + nativeHandle as? MapscoreRenderTargetInterface + +internal fun RenderPassInterface.asMapscore(): MapscoreRenderPassInterface? = + nativeHandle as? MapscoreRenderPassInterface + +internal fun ComputePassInterface.asMapscore(): MapscoreComputePassInterface? = + nativeHandle as? MapscoreComputePassInterface + +internal fun MaskingObjectInterface.asMapscore(): MapscoreMaskingObjectInterface? = + nativeHandle as? MapscoreMaskingObjectInterface + +internal fun ErrorManager.asMapscore(): MapscoreErrorManager? = + nativeHandle as? MapscoreErrorManager + +internal fun CameraInterface.asMapscore(): MapscoreCameraInterface? = + nativeHandle as? MapscoreCameraInterface diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt index d4861eec5..b90aaac0a 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt @@ -4,7 +4,7 @@ import android.graphics.BitmapFactory import com.snapchat.djinni.Future import com.snapchat.djinni.Promise import io.openmobilemaps.mapscore.graphics.BitmapTextureHolder -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface as MapscoreLocalDataProvider import io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult import io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus import io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult @@ -16,7 +16,7 @@ import java.nio.ByteBuffer internal class MapDataProviderLocalDataProviderImplementation( private val dataProvider: MapDataProviderProtocol, private val coroutineScope: CoroutineScope, -) : Tiled2dMapVectorLayerLocalDataProviderInterface() { +) : MapscoreLocalDataProvider() { override fun getStyleJson(): String? = dataProvider.getStyleJson() diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index 35e19be20..b052f0bec 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -65,7 +65,7 @@ private class MapFactoryImpl( null, null, null, - ).let { MapVectorLayerImpl(it) } + ).let { MapVectorLayer(it) } } override fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt new file mode 100644 index 000000000..f1b83afe6 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -0,0 +1,65 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.gps.GpsLayer +import io.openmobilemaps.gps.providers.LocationProviderInterface +import io.openmobilemaps.gps.shared.gps.GpsMode as MapscoreGpsMode +import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode + +actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : LayerInterface( + (nativeHandle as? GpsLayerHandle)?.layer?.asLayerInterface(), +) { + protected val gpsHandle: GpsLayerHandle? = nativeHandle as? GpsLayerHandle + + actual abstract fun setMode(mode: GpsMode) + actual abstract fun getMode(): GpsMode + actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + actual abstract fun notifyPermissionGranted() + actual abstract fun lastLocation(): Coord? +} + +internal class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { + private val handle = gpsHandle + private val gpsLayer = handle?.layer + private val locationProvider = handle?.locationProvider + private var modeListener: ((GpsMode) -> Unit)? = null + + init { + gpsLayer?.setOnModeChangedListener { mode -> + modeListener?.invoke(mode.asShared()) + } + } + + override fun setMode(mode: GpsMode) { + gpsLayer?.setMode(mode.asMapscore()) + } + + override fun getMode(): GpsMode = gpsLayer?.layerInterface?.getMode()?.asShared() ?: GpsMode.DISABLED + + override fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { + modeListener = listener + } + + override fun notifyPermissionGranted() { + locationProvider?.notifyLocationPermissionGranted() + } + + override fun lastLocation(): Coord? = locationProvider?.getLastLocation() +} + +private fun GpsMode.asMapscore(): MapscoreGpsMode = when (this) { + GpsMode.DISABLED -> MapscoreGpsMode.DISABLED + GpsMode.STANDARD -> MapscoreGpsMode.STANDARD + GpsMode.FOLLOW -> MapscoreGpsMode.FOLLOW +} + +private fun MapscoreGpsMode.asShared(): GpsMode = when (this) { + MapscoreGpsMode.DISABLED -> GpsMode.DISABLED + MapscoreGpsMode.STANDARD -> GpsMode.STANDARD + MapscoreGpsMode.FOLLOW -> GpsMode.FOLLOW + MapscoreGpsMode.FOLLOW_AND_TURN -> GpsMode.FOLLOW +} + +data class GpsLayerHandle( + val layer: GpsLayer, + val locationProvider: LocationProviderInterface, +) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt deleted file mode 100644 index fa9775b3c..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapImplementations.kt +++ /dev/null @@ -1,241 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode -import io.openmobilemaps.gps.GpsLayer -import io.openmobilemaps.gps.providers.LocationProviderInterface -import io.openmobilemaps.gps.shared.gps.GpsMode as MapscoreGpsMode -import io.openmobilemaps.mapscore.map.view.MapView as MapscoreMapView -import io.openmobilemaps.mapscore.shared.map.LayerInterface -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface as MapscoreSelectionCallback -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo as MapscoreFeatureInfo -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue as MapscoreFeatureInfoValue -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfo as SharedFeatureInfo -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfoValue as SharedFeatureInfoValue - -actual abstract class MapInterface actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - actual abstract fun addVectorLayer(layer: MapVectorLayer?) - actual abstract fun removeVectorLayer(layer: MapVectorLayer?) - actual abstract fun addRasterLayer(layer: MapRasterLayer?) - actual abstract fun removeRasterLayer(layer: MapRasterLayer?) - actual abstract fun addGpsLayer(layer: MapGpsLayer?) - actual abstract fun removeGpsLayer(layer: MapGpsLayer?) - actual abstract fun getCamera(): MapCameraInterface? - - actual companion object { - actual fun create(nativeHandle: Any?): MapInterface = MapInterfaceImpl(nativeHandle) - } -} - -private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) { - private val mapView = nativeHandle as? MapscoreMapView - private val cameraInterface = MapCameraInterfaceImpl(mapView?.getCamera()) - - override fun addVectorLayer(layer: MapVectorLayer?) { - val handle = layer as? MapVectorLayerImpl ?: return - handle.layerInterface()?.let { mapView?.addLayer(it) } - } - - override fun removeVectorLayer(layer: MapVectorLayer?) { - val handle = layer as? MapVectorLayerImpl ?: return - handle.layerInterface()?.let { mapView?.removeLayer(it) } - } - - override fun addRasterLayer(layer: MapRasterLayer?) { - layer?.layerInterface()?.let { mapView?.addLayer(it) } - } - - override fun removeRasterLayer(layer: MapRasterLayer?) { - layer?.layerInterface()?.let { mapView?.removeLayer(it) } - } - - override fun addGpsLayer(layer: MapGpsLayer?) { - val handle = layer as? MapGpsLayerImpl ?: return - handle.layerInterface()?.let { mapView?.addLayer(it) } - } - - override fun removeGpsLayer(layer: MapGpsLayer?) { - val handle = layer as? MapGpsLayerImpl ?: return - handle.layerInterface()?.let { mapView?.removeLayer(it) } - } - - override fun getCamera(): MapCameraInterface? = cameraInterface -} - -actual open class MapCameraInterface actual constructor() { - actual open fun setBounds(bounds: RectCoord) { - } - - actual open fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { - } - - actual open fun setMinZoom(minZoom: Double) { - } - - actual open fun setMaxZoom(maxZoom: Double) { - } - - actual open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { - } -} - -private class MapCameraInterfaceImpl(private val nativeHandle: Any?) : MapCameraInterface() { - private val camera = nativeHandle as? io.openmobilemaps.mapscore.shared.map.MapCameraInterface - - override fun setBounds(bounds: RectCoord) { - camera?.setBounds(bounds) - } - - override fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { - camera?.moveToCenterPositionZoom(centerPosition, zoom, animated) - } - - override fun setMinZoom(minZoom: Double) { - camera?.setMinZoom(minZoom) - } - - override fun setMaxZoom(maxZoom: Double) { - camera?.setMaxZoom(maxZoom) - } - - override fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { - camera?.setBoundsRestrictWholeVisibleRect(enabled) - } -} - -actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - actual abstract fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) - actual abstract fun setGlobalState(state: Map) -} - -class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { - private val layer = nativeHandle as? MapscoreVectorLayer - - override fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { - val callback = delegate?.let { MapVectorLayerSelectionCallbackAdapterImplementation(it) } - layer?.setSelectionDelegate(callback) - } - - override fun setGlobalState(state: Map) { - val mapped = HashMap() - state.forEach { (key, value) -> - mapped[key] = value.asMapscore() - } - layer?.setGlobalState(mapped) - } - - internal fun layerInterface(): LayerInterface? = layer?.asLayerInterface() -} - -actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - actual abstract fun setMode(mode: GpsMode) - actual abstract fun getMode(): GpsMode - actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - actual abstract fun notifyPermissionGranted() - actual abstract fun lastLocation(): Coord? -} - -class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { - private val handle = nativeHandle as? GpsLayerHandle - private val gpsLayer = handle?.layer - private val locationProvider = handle?.locationProvider - private var modeListener: ((GpsMode) -> Unit)? = null - - init { - gpsLayer?.setOnModeChangedListener { mode -> - modeListener?.invoke(mode.asShared()) - } - } - - override fun setMode(mode: GpsMode) { - gpsLayer?.setMode(mode.asMapscore()) - } - - override fun getMode(): GpsMode = gpsLayer?.layerInterface?.getMode()?.asShared() ?: GpsMode.DISABLED - - override fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { - modeListener = listener - } - - override fun notifyPermissionGranted() { - locationProvider?.notifyLocationPermissionGranted() - } - - override fun lastLocation(): Coord? = locationProvider?.getLastLocation() - - internal fun layerInterface(): LayerInterface? = gpsLayer?.asLayerInterface() -} - -private class MapVectorLayerSelectionCallbackAdapterImplementation( - private val proxy: MapVectorLayerSelectionCallbackProxy, -) : MapscoreSelectionCallback() { - override fun didSelectFeature(featureInfo: MapscoreFeatureInfo, layerIdentifier: String, coord: Coord): Boolean { - val shared = featureInfo.asShared(layerIdentifier) - return proxy.handler._didSelectFeature(shared, coord) - } - - override fun didMultiSelectLayerFeatures( - featureInfos: ArrayList, - layerIdentifier: String, - coord: Coord, - ): Boolean { - return proxy.handler._didMultiSelectLayerFeatures(layerIdentifier, coord) - } - - override fun didClickBackgroundConfirmed(coord: Coord): Boolean { - return proxy.handler._didClickBackgroundConfirmed(coord) - } -} - -private fun MapscoreFeatureInfo.asShared(layerIdentifier: String): SharedFeatureInfo { - val props = properties.mapValues { it.value.asShared() } - return SharedFeatureInfo( - identifier = identifier, - layerIdentifier = layerIdentifier, - properties = props, - ) -} - -private fun MapscoreFeatureInfoValue.asShared(): SharedFeatureInfoValue { - val stringValue = stringVal - ?: intVal?.toString() - ?: doubleVal?.toString() - ?: boolVal?.toString() - val list = listStringVal?.filterIsInstance() - return SharedFeatureInfoValue(stringVal = stringValue, listStringVal = list) -} - -private fun SharedFeatureInfoValue.asMapscore(): MapscoreFeatureInfoValue = - MapscoreFeatureInfoValue( - stringVal, - null, - null, - null, - null, - null, - listStringVal?.let { ArrayList(it) }, - ) - -private fun GpsMode.asMapscore(): MapscoreGpsMode = when (this) { - GpsMode.DISABLED -> MapscoreGpsMode.DISABLED - GpsMode.STANDARD -> MapscoreGpsMode.STANDARD - GpsMode.FOLLOW -> MapscoreGpsMode.FOLLOW -} - -private fun MapscoreGpsMode.asShared(): GpsMode = when (this) { - MapscoreGpsMode.DISABLED -> GpsMode.DISABLED - MapscoreGpsMode.STANDARD -> GpsMode.STANDARD - MapscoreGpsMode.FOLLOW -> GpsMode.FOLLOW - MapscoreGpsMode.FOLLOW_AND_TURN -> GpsMode.FOLLOW -} - -data class GpsLayerHandle( - val layer: GpsLayer, - val locationProvider: LocationProviderInterface, -) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt new file mode 100644 index 000000000..1cbe29e38 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt @@ -0,0 +1,197 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.MapInterface as MapscoreMapInterface +import io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface as MapscoreMapReadyCallbackInterface +import io.openmobilemaps.mapscore.shared.map.MapCallbackInterface as MapscoreMapCallbackInterface + +actual open class MapInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val map = nativeHandle as? MapscoreMapInterface + + actual companion object { + actual fun create( + graphicsFactory: GraphicsObjectFactoryInterface, + shaderFactory: ShaderFactoryInterface, + renderingContext: RenderingContextInterface, + mapConfig: MapConfig, + scheduler: SchedulerInterface, + pixelDensity: Float, + is3d: Boolean, + ): MapInterface { + val created = MapscoreMapInterface.create( + requireNotNull(graphicsFactory.asMapscore()), + requireNotNull(shaderFactory.asMapscore()), + requireNotNull(renderingContext.asMapscore()), + mapConfig, + requireNotNull(scheduler.asMapscore()), + pixelDensity, + is3d, + ) + return MapInterface(created) + } + + actual fun createWithOpenGl( + mapConfig: MapConfig, + scheduler: SchedulerInterface, + pixelDensity: Float, + is3d: Boolean, + ): MapInterface { + val created = MapscoreMapInterface.createWithOpenGl( + mapConfig, + requireNotNull(scheduler.asMapscore()), + pixelDensity, + is3d, + ) + return MapInterface(created) + } + } + + actual fun setCallbackHandler(callbackInterface: MapCallbackInterface?) { + val proxy = callbackInterface?.let { MapCallbackInterfaceProxy(it) } + map?.setCallbackHandler(proxy) + } + + actual fun getGraphicsObjectFactory(): GraphicsObjectFactoryInterface = + GraphicsObjectFactoryInterface(map?.getGraphicsObjectFactory()) + + actual fun getShaderFactory(): ShaderFactoryInterface = + ShaderFactoryInterface(map?.getShaderFactory()) + + actual fun getScheduler(): SchedulerInterface = + SchedulerInterface(map?.getScheduler()) + + actual fun getRenderingContext(): RenderingContextInterface = + RenderingContextInterface(map?.getRenderingContext()) + + actual fun getMapConfig(): MapConfig = requireNotNull(map?.getMapConfig()) + + actual fun getCoordinateConverterHelper(): CoordinateConversionHelperInterface = + CoordinateConversionHelperInterface(map?.getCoordinateConverterHelper()) + + actual fun setCamera(camera: MapCameraInterface) { + map?.setCamera(requireNotNull(camera.asMapscore())) + } + + actual fun getCamera(): MapCameraInterface = MapCameraInterface(map?.getCamera()) + + actual fun setTouchHandler(touchHandler: TouchHandlerInterface) { + map?.setTouchHandler(requireNotNull(touchHandler.asMapscore())) + } + + actual fun getTouchHandler(): TouchHandlerInterface = + TouchHandlerInterface(map?.getTouchHandler()) + + actual fun setPerformanceLoggers(performanceLoggers: List) { + val list = ArrayList(performanceLoggers.mapNotNull { it.asMapscore() }) + map?.setPerformanceLoggers(list) + } + + actual fun getPerformanceLoggers(): List = + map?.getPerformanceLoggers()?.map { PerformanceLoggerInterface(it) } ?: emptyList() + + actual fun getLayers(): List = + map?.getLayers()?.map { LayerInterface(it) } ?: emptyList() + + actual fun getLayersIndexed(): List = + map?.getLayersIndexed()?.map { IndexedLayerInterface(it) } ?: emptyList() + + actual fun addLayer(layer: LayerInterface) { + map?.addLayer(requireNotNull(layer.asMapscore())) + } + + actual fun insertLayerAt(layer: LayerInterface, atIndex: Int) { + map?.insertLayerAt(requireNotNull(layer.asMapscore()), atIndex) + } + + actual fun insertLayerAbove(layer: LayerInterface, above: LayerInterface) { + map?.insertLayerAbove(requireNotNull(layer.asMapscore()), requireNotNull(above.asMapscore())) + } + + actual fun insertLayerBelow(layer: LayerInterface, below: LayerInterface) { + map?.insertLayerBelow(requireNotNull(layer.asMapscore()), requireNotNull(below.asMapscore())) + } + + actual fun removeLayer(layer: LayerInterface) { + map?.removeLayer(requireNotNull(layer.asMapscore())) + } + + actual fun setViewportSize(size: Vec2I) { + map?.setViewportSize(size) + } + + actual fun setBackgroundColor(color: Color) { + map?.setBackgroundColor(color) + } + + actual fun is3d(): Boolean = map?.is3d() ?: false + + actual fun invalidate() { + map?.invalidate() + } + + actual fun resetIsInvalidated() { + map?.resetIsInvalidated() + } + + actual fun prepare() { + map?.prepare() + } + + actual fun getNeedsCompute(): Boolean = map?.getNeedsCompute() ?: false + + actual fun drawOffscreenFrame(target: RenderTargetInterface) { + map?.drawOffscreenFrame(requireNotNull(target.asMapscore())) + } + + actual fun drawFrame() { + map?.drawFrame() + } + + actual fun compute() { + map?.compute() + } + + actual fun resume() { + map?.resume() + } + + actual fun pause() { + map?.pause() + } + + actual fun destroy() { + map?.destroy() + } + + actual fun drawReadyFrame(bounds: RectCoord, paddingPc: Float, timeout: Float, callbacks: MapReadyCallbackInterface) { + val proxy = MapReadyCallbackInterfaceProxy(callbacks) + map?.drawReadyFrame(bounds, paddingPc, timeout, proxy) + } + + actual fun forceReload() { + map?.forceReload() + } +} + +internal fun MapInterface.asMapscore(): MapscoreMapInterface? = + nativeHandle as? MapscoreMapInterface + +private class MapCallbackInterfaceProxy( + private val handler: MapCallbackInterface, +) : MapscoreMapCallbackInterface() { + override fun invalidate() { + handler.invalidate() + } + + override fun onMapResumed() { + handler.onMapResumed() + } +} + +private class MapReadyCallbackInterfaceProxy( + private val handler: MapReadyCallbackInterface, +) : MapscoreMapReadyCallbackInterface() { + override fun stateDidUpdate(state: io.openmobilemaps.mapscore.shared.map.LayerReadyState) { + handler.stateDidUpdate(state.asShared()) + } +} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt index 849c1ba01..c5472707b 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt @@ -1,11 +1,11 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer -import io.openmobilemaps.mapscore.shared.map.LayerInterface -actual open class MapRasterLayer actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle +actual open class MapRasterLayer actual constructor(nativeHandle: Any?) : LayerInterface( + (nativeHandle as? TiledRasterLayer)?.layerInterface(), +) { + private val rasterLayer = nativeHandle as? TiledRasterLayer - internal fun layerInterface(): LayerInterface? = - (nativeHandle as? TiledRasterLayer)?.layerInterface() + internal fun rasterLayerInterface(): TiledRasterLayer? = rasterLayer } diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt index 7676a8aa9..77b28b59f 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt @@ -1,7 +1,6 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapTiled2dMapLayerConfig as SharedLayerConfig -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapTiled2dMapZoomInfo as SharedZoomInfo import io.openmobilemaps.mapscore.shared.map.coordinates.Coord as MapscoreCoord import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig as MapscoreLayerConfig @@ -85,7 +84,7 @@ class MapTiled2dMapLayerConfigImplementation( } } - override fun getZoomInfo(): MapscoreZoomInfo = config.zoomInfo.asMapscore() + override fun getZoomInfo(): MapscoreZoomInfo = config.zoomInfo override fun getLayerName(): String = config.layerName @@ -108,13 +107,3 @@ class MapTiled2dMapLayerConfigImplementation( ) } } - -private fun SharedZoomInfo.asMapscore(): MapscoreZoomInfo = MapscoreZoomInfo( - zoomLevelScaleFactor = zoomLevelScaleFactor.toFloat(), - numDrawPreviousLayers = numDrawPreviousLayers, - numDrawPreviousOrLaterTLayers = numDrawPreviousOrLaterTLayers, - adaptScaleToScreen = adaptScaleToScreen, - maskTile = maskTile, - underzoom = underzoom, - overzoom = overzoom, -) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt new file mode 100644 index 000000000..d4eadd8ec --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -0,0 +1,62 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo as MapscoreFeatureInfo +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue as MapscoreFeatureInfoValue +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfo as SharedFeatureInfo +import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfoValue as SharedFeatureInfoValue + +actual class MapVectorLayer actual constructor(nativeHandle: Any?) : LayerInterface( + (nativeHandle as? MapscoreVectorLayer)?.asLayerInterface(), +) { + private val layer = nativeHandle as? MapscoreVectorLayer + + actual fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) { + val proxy = delegate?.let { MapVectorLayerSelectionCallbackProxy(it) } + layer?.setSelectionDelegate(proxy) + } + + actual fun setGlobalState(state: Map) { + val mapped = HashMap() + state.forEach { (key, value) -> + mapped[key] = value.asMapscore() + } + layer?.setGlobalState(mapped) + } + + internal fun vectorLayerInterface(): MapscoreVectorLayer? = layer +} + +internal fun MapscoreFeatureInfo.asShared(): SharedFeatureInfo { + val props = HashMap() + for ((key, value) in properties) { + props[key] = value.asShared() + } + return SharedFeatureInfo( + identifier = identifier, + properties = props, + ) +} + +internal fun MapscoreFeatureInfoValue.asShared(): SharedFeatureInfoValue { + return SharedFeatureInfoValue( + stringVal = stringVal, + doubleVal = doubleVal, + intVal = intVal, + boolVal = boolVal, + colorVal = colorVal, + listFloatVal = listFloatVal, + listStringVal = listStringVal, + ) +} + +private fun SharedFeatureInfoValue.asMapscore(): MapscoreFeatureInfoValue = + MapscoreFeatureInfoValue( + stringVal, + doubleVal, + intVal, + boolVal, + colorVal, + listFloatVal, + listStringVal, + ) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt index 3bb6a53e1..9890dd2aa 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt @@ -1,7 +1,32 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface as MapscoreSelectionCallback +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo as MapscoreFeatureInfo + actual class MapVectorLayerSelectionCallbackProxy actual constructor( handler: MapVectorLayerSelectionCallback, -) { +) : MapscoreSelectionCallback() { actual val handler: MapVectorLayerSelectionCallback = handler + + override fun didSelectFeature( + featureInfo: MapscoreFeatureInfo, + layerIdentifier: String, + coord: Coord, + ): Boolean { + val shared = featureInfo.asShared() + return handler.didSelectFeature(shared, layerIdentifier, coord) + } + + override fun didMultiSelectLayerFeatures( + featureInfos: ArrayList, + layerIdentifier: String, + coord: Coord, + ): Boolean { + val sharedInfos = featureInfos.map { it.asShared() } + return handler.didMultiSelectLayerFeatures(sharedInfos, layerIdentifier, coord) + } + + override fun didClickBackgroundConfirmed(coord: Coord): Boolean { + return handler.didClickBackgroundConfirmed(coord) + } } diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt new file mode 100644 index 000000000..c100da149 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt @@ -0,0 +1,23 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.graphics.common.Vec2F as MapscoreVec2F +import io.openmobilemaps.mapscore.shared.graphics.common.Vec2I as MapscoreVec2I +import io.openmobilemaps.mapscore.shared.graphics.common.Vec3D as MapscoreVec3D +import io.openmobilemaps.mapscore.shared.graphics.common.RectI as MapscoreRectI +import io.openmobilemaps.mapscore.shared.map.MapConfig as MapscoreMapConfig +import io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem as MapscoreMapCoordinateSystem +import io.openmobilemaps.mapscore.shared.map.CameraInterpolation as MapscoreCameraInterpolation +import io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue as MapscoreCameraInterpolationValue +import io.openmobilemaps.mapscore.shared.map.Camera3dConfig as MapscoreCamera3dConfig +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo as MapscoreTiled2dMapZoomInfo + +actual typealias Vec2F = MapscoreVec2F +actual typealias Vec2I = MapscoreVec2I +actual typealias Vec3D = MapscoreVec3D +actual typealias RectI = MapscoreRectI +actual typealias MapConfig = MapscoreMapConfig +actual typealias MapCoordinateSystem = MapscoreMapCoordinateSystem +actual typealias CameraInterpolation = MapscoreCameraInterpolation +actual typealias CameraInterpolationValue = MapscoreCameraInterpolationValue +actual typealias Camera3dConfig = MapscoreCamera3dConfig +actual typealias Tiled2dMapZoomInfo = MapscoreTiled2dMapZoomInfo diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt new file mode 100644 index 000000000..aa198e69e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -0,0 +1,46 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayerInterface +import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreLoaderInterface + +actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + + actual companion object { + actual fun createExplicitly( + layerName: String, + styleJson: String?, + localStyleJson: Boolean?, + loaders: List, + fontLoader: FontLoaderInterface?, + localDataProvider: Tiled2dMapVectorLayerLocalDataProviderInterface?, + customZoomInfo: Tiled2dMapZoomInfo?, + symbolDelegate: Tiled2dMapVectorLayerSymbolDelegateInterface?, + sourceUrlParams: Map?, + ): Tiled2dMapVectorLayerInterface? { + val typedLoaders = ArrayList(loaders.size).apply { + loaders.forEach { add(requireNotNull(it.asMapscore())) } + } + val typedFontLoader = fontLoader?.asMapscore() + val typedLocalDataProvider = localDataProvider?.asMapscore() + val typedZoomInfo = customZoomInfo + val typedSymbolDelegate = symbolDelegate?.asMapscore() + val typedSourceUrlParams = sourceUrlParams?.let { HashMap(it) } + val layer = MapscoreVectorLayerInterface.createExplicitly( + layerName = layerName, + styleJson = styleJson, + localStyleJson = localStyleJson, + loaders = typedLoaders, + fontLoader = typedFontLoader, + localDataProvider = typedLocalDataProvider, + customZoomInfo = typedZoomInfo, + symbolDelegate = typedSymbolDelegate, + sourceUrlParams = typedSourceUrlParams, + ) + return layer?.let { Tiled2dMapVectorLayerInterface(it) } + } + } +} + +internal fun Tiled2dMapVectorLayerInterface.asMapscore(): MapscoreVectorLayerInterface? = + nativeHandle as? MapscoreVectorLayerInterface diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt new file mode 100644 index 000000000..fa2080d37 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt @@ -0,0 +1,34 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface as MapscoreLocalDataProvider +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface as MapscoreSymbolDelegate +import io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface as MapscoreFontLoader +import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreLoader + +actual open class LoaderInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class FontLoaderInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class Tiled2dMapVectorLayerLocalDataProviderInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class Tiled2dMapVectorLayerSymbolDelegateInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +internal fun LoaderInterface.asMapscore(): MapscoreLoader? = + nativeHandle as? MapscoreLoader + +internal fun FontLoaderInterface.asMapscore(): MapscoreFontLoader? = + nativeHandle as? MapscoreFontLoader + +internal fun Tiled2dMapVectorLayerLocalDataProviderInterface.asMapscore(): MapscoreLocalDataProvider? = + nativeHandle as? MapscoreLocalDataProvider + +internal fun Tiled2dMapVectorLayerSymbolDelegateInterface.asMapscore(): MapscoreSymbolDelegate? = + nativeHandle as? MapscoreSymbolDelegate diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt new file mode 100644 index 000000000..c5a2363d6 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt @@ -0,0 +1,44 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class CameraInterpolationValue( + stop: Float, + value: Float, +) { + val stop: Float + val value: Float +} + +expect class CameraInterpolation( + stops: List, +) { + val stops: List +} + +expect class Camera3dConfig( + key: String, + allowUserInteraction: Boolean, + rotationSpeed: Float?, + animationDurationMs: Int, + minZoom: Float, + maxZoom: Float, + pitchInterpolationValues: CameraInterpolation, + verticalDisplacementInterpolationValues: CameraInterpolation, +) { + val key: String + val allowUserInteraction: Boolean + val rotationSpeed: Float? + val animationDurationMs: Int + val minZoom: Float + val maxZoom: Float + val pitchInterpolationValues: CameraInterpolation + val verticalDisplacementInterpolationValues: CameraInterpolation +} + +expect class Camera3dConfigFactory constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + companion object { + fun getBasicConfig(): Camera3dConfig + fun getRestorConfig(): Camera3dConfig + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt new file mode 100644 index 000000000..3bbc3d415 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt @@ -0,0 +1,13 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class Color( + r: Float, + g: Float, + b: Float, + a: Float, +) { + val r: Float + val g: Float + val b: Float + val a: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt new file mode 100644 index 000000000..cf179a89f --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt @@ -0,0 +1,8 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect open class IndexedLayerInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + fun getLayerInterface(): LayerInterface + fun getIndex(): Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt new file mode 100644 index 000000000..583e32425 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt @@ -0,0 +1,29 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect open class LayerInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + fun setMaskingObject(maskingObject: MaskingObjectInterface?) + fun update() + fun buildRenderPasses(): List + fun buildComputePasses(): List + fun onAdded(mapInterface: MapInterface, layerIndex: Int) + fun onRemoved() + fun pause() + fun resume() + fun hide() + fun show() + + fun setAlpha(alpha: Float) + fun getAlpha(): Float + + fun setScissorRect(scissorRect: RectI?) + + fun isReadyToRenderOffscreen(): LayerReadyState + fun enableAnimations(enabled: Boolean) + + fun setErrorManager(errorManager: ErrorManager) + fun forceReload() + + fun setPrimaryRenderTarget(target: RenderTargetInterface?) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt new file mode 100644 index 000000000..d6a87b956 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt @@ -0,0 +1,17 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +interface MapCallbackInterface { + fun invalidate() + fun onMapResumed() +} + +interface MapReadyCallbackInterface { + fun stateDidUpdate(state: LayerReadyState) +} + +enum class LayerReadyState { + READY, + NOT_READY, + ERROR, + TIMEOUT_ERROR, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt new file mode 100644 index 000000000..031db77ba --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt @@ -0,0 +1,14 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect open class MapCamera3dInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + fun getCameraConfig(): Camera3dConfig + + fun setCameraConfig( + config: Camera3dConfig, + durationSeconds: Float?, + targetZoom: Float?, + targetCoordinate: Coord?, + ) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt index 9b647fa9f..2578fd9d2 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt @@ -1,9 +1,77 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect open class MapCameraInterface() { - open fun setBounds(bounds: RectCoord) - open fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) - open fun setMinZoom(minZoom: Double) - open fun setMaxZoom(maxZoom: Double) - open fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) +expect open class MapCameraInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + companion object { + fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface + } + + fun freeze(freeze: Boolean) + + fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) + fun moveToCenterPosition(centerPosition: Coord, animated: Boolean) + fun moveToBoundingBox(boundingBox: RectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) + fun getCenterPosition(): Coord + + fun setZoom(zoom: Double, animated: Boolean) + fun getZoom(): Double + + fun setRotation(angle: Float, animated: Boolean) + fun getRotation(): Float + + fun setMinZoom(minZoom: Double) + fun setMaxZoom(maxZoom: Double) + + fun getMinZoom(): Double + fun getMaxZoom(): Double + + fun setBounds(bounds: RectCoord) + fun getBounds(): RectCoord + fun isInBounds(coords: Coord): Boolean + + fun setPaddingLeft(padding: Float) + fun setPaddingRight(padding: Float) + fun setPaddingTop(padding: Float) + fun setPaddingBottom(padding: Float) + + fun getVisibleRect(): RectCoord + fun getPaddingAdjustedVisibleRect(): RectCoord + + fun getScreenDensityPpi(): Float + + fun update() + + fun getInvariantModelMatrix(coordinate: Coord, scaleInvariant: Boolean, rotationInvariant: Boolean): List + + fun addListener(listener: MapCameraListenerInterface) + fun removeListener(listener: MapCameraListenerInterface) + fun notifyListenerBoundsChange() + + fun coordFromScreenPosition(posScreen: Vec2F): Coord + fun coordFromScreenPositionZoom(posScreen: Vec2F, zoom: Float): Coord + + fun screenPosFromCoord(coord: Coord): Vec2F + fun screenPosFromCoordZoom(coord: Coord, zoom: Float): Vec2F + + fun mapUnitsFromPixels(distancePx: Double): Double + fun getScalingFactor(): Double + + fun coordIsVisibleOnScreen(coord: Coord, paddingPc: Float): Boolean + + fun setRotationEnabled(enabled: Boolean) + fun setSnapToNorthEnabled(enabled: Boolean) + fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) + + fun asCameraInterface(): CameraInterface + + fun getLastVpMatrixD(): List? + fun getLastVpMatrix(): List? + fun getLastInverseVpMatrix(): List? + fun getLastVpMatrixViewBounds(): RectCoord? + fun getLastVpMatrixRotation(): Float? + fun getLastVpMatrixZoom(): Float? + fun getLastCameraPosition(): Vec3D? + + fun asMapCamera3d(): MapCamera3dInterface? } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt new file mode 100644 index 000000000..c30069c84 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt @@ -0,0 +1,19 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +interface MapCameraListenerInterface { + fun onVisibleBoundsChanged(visibleBounds: RectCoord, zoom: Double) + fun onRotationChanged(angle: Float) + fun onMapInteraction() + fun onCameraChange( + viewMatrix: List, + projectionMatrix: List, + origin: Vec3D, + verticalFov: Float, + horizontalFov: Float, + width: Float, + height: Float, + focusPointAltitude: Float, + focusPointPosition: Coord, + zoom: Float, + ) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt new file mode 100644 index 000000000..b16a0eedc --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt @@ -0,0 +1,7 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class MapConfig( + mapCoordinateSystem: MapCoordinateSystem, +) { + val mapCoordinateSystem: MapCoordinateSystem +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt new file mode 100644 index 000000000..b1e06995e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt @@ -0,0 +1,11 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class MapCoordinateSystem( + identifier: Int, + bounds: RectCoord, + unitToScreenMeterFactor: Float, +) { + val identifier: Int + val bounds: RectCoord + val unitToScreenMeterFactor: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt new file mode 100644 index 000000000..1ac2aa10c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt @@ -0,0 +1,53 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect open class GraphicsObjectFactoryInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class ShaderFactoryInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class RenderingContextInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class SchedulerInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class TouchHandlerInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class PerformanceLoggerInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class CoordinateConversionHelperInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class RenderTargetInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class RenderPassInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class ComputePassInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class MaskingObjectInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class ErrorManager constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class CameraInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt index 7d70b910d..baf7fb58b 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt @@ -2,10 +2,10 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode -expect abstract class MapGpsLayer constructor(nativeHandle: Any? = null) { - abstract fun setMode(mode: GpsMode) - abstract fun getMode(): GpsMode - abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - abstract fun notifyPermissionGranted() - abstract fun lastLocation(): Coord? +expect abstract class MapGpsLayer constructor(nativeHandle: Any? = null) : LayerInterface { + abstract fun setMode(mode: GpsMode) + abstract fun getMode(): GpsMode + abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) + abstract fun notifyPermissionGranted() + abstract fun lastLocation(): Coord? } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt index 8a7a106d0..b970694aa 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt @@ -1,15 +1,72 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect abstract class MapInterface constructor(nativeHandle: Any? = null) { - abstract fun addVectorLayer(layer: MapVectorLayer?) - abstract fun removeVectorLayer(layer: MapVectorLayer?) - abstract fun addRasterLayer(layer: MapRasterLayer?) - abstract fun removeRasterLayer(layer: MapRasterLayer?) - abstract fun addGpsLayer(layer: MapGpsLayer?) - abstract fun removeGpsLayer(layer: MapGpsLayer?) - abstract fun getCamera(): MapCameraInterface? - - companion object { - fun create(nativeHandle: Any?): MapInterface - } +expect open class MapInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + companion object { + fun create( + graphicsFactory: GraphicsObjectFactoryInterface, + shaderFactory: ShaderFactoryInterface, + renderingContext: RenderingContextInterface, + mapConfig: MapConfig, + scheduler: SchedulerInterface, + pixelDensity: Float, + is3d: Boolean, + ): MapInterface + + fun createWithOpenGl( + mapConfig: MapConfig, + scheduler: SchedulerInterface, + pixelDensity: Float, + is3d: Boolean, + ): MapInterface + } + + fun setCallbackHandler(callbackInterface: MapCallbackInterface?) + + fun getGraphicsObjectFactory(): GraphicsObjectFactoryInterface + fun getShaderFactory(): ShaderFactoryInterface + fun getScheduler(): SchedulerInterface + fun getRenderingContext(): RenderingContextInterface + fun getMapConfig(): MapConfig + fun getCoordinateConverterHelper(): CoordinateConversionHelperInterface + + fun setCamera(camera: MapCameraInterface) + fun getCamera(): MapCameraInterface + + fun setTouchHandler(touchHandler: TouchHandlerInterface) + fun getTouchHandler(): TouchHandlerInterface + + fun setPerformanceLoggers(performanceLoggers: List) + fun getPerformanceLoggers(): List + + fun getLayers(): List + fun getLayersIndexed(): List + + fun addLayer(layer: LayerInterface) + fun insertLayerAt(layer: LayerInterface, atIndex: Int) + fun insertLayerAbove(layer: LayerInterface, above: LayerInterface) + fun insertLayerBelow(layer: LayerInterface, below: LayerInterface) + + fun removeLayer(layer: LayerInterface) + + fun setViewportSize(size: Vec2I) + fun setBackgroundColor(color: Color) + + fun is3d(): Boolean + + fun invalidate() + fun resetIsInvalidated() + fun prepare() + fun getNeedsCompute(): Boolean + + fun drawOffscreenFrame(target: RenderTargetInterface) + fun drawFrame() + fun compute() + fun resume() + fun pause() + fun destroy() + + fun drawReadyFrame(bounds: RectCoord, paddingPc: Float, timeout: Float, callbacks: MapReadyCallbackInterface) + fun forceReload() } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt index 8f8188186..cffea54d8 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt @@ -1,3 +1,3 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect open class MapRasterLayer constructor(nativeHandle: Any? = null) +expect open class MapRasterLayer constructor(nativeHandle: Any? = null) : LayerInterface diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt index f6f778579..3e7c8e09d 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt @@ -1,19 +1,27 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -data class MapTiled2dMapZoomInfo( - val zoomLevelScaleFactor: Double, - val numDrawPreviousLayers: Int, - val numDrawPreviousOrLaterTLayers: Int, - val adaptScaleToScreen: Boolean, - val maskTile: Boolean, - val underzoom: Boolean, - val overzoom: Boolean, -) +expect class Tiled2dMapZoomInfo( + zoomLevelScaleFactor: Float, + numDrawPreviousLayers: Int, + numDrawPreviousOrLaterTLayers: Int, + adaptScaleToScreen: Boolean, + maskTile: Boolean, + underzoom: Boolean, + overzoom: Boolean, +) { + val zoomLevelScaleFactor: Float + val numDrawPreviousLayers: Int + val numDrawPreviousOrLaterTLayers: Int + val adaptScaleToScreen: Boolean + val maskTile: Boolean + val underzoom: Boolean + val overzoom: Boolean +} data class MapTiled2dMapLayerConfig( val layerName: String, val urlFormat: String, - val zoomInfo: MapTiled2dMapZoomInfo, + val zoomInfo: Tiled2dMapZoomInfo, val minZoomLevel: Int, val maxZoomLevel: Int, val coordinateSystemIdentifier: Int, diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt index 50f7930f9..ec991ba2e 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt @@ -1,6 +1,6 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect abstract class MapVectorLayer constructor(nativeHandle: Any? = null) { - abstract fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) - abstract fun setGlobalState(state: Map) +expect class MapVectorLayer constructor(nativeHandle: Any? = null) : LayerInterface { + fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) + fun setGlobalState(state: Map) } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt index 180822d32..8b3d44d6a 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt @@ -2,11 +2,15 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop data class MapVectorLayerFeatureInfo( val identifier: String, - val layerIdentifier: String, - val properties: Map, + val properties: HashMap, ) data class MapVectorLayerFeatureInfoValue( val stringVal: String? = null, - val listStringVal: List? = null, + val doubleVal: Double? = null, + val intVal: Long? = null, + val boolVal: Boolean? = null, + val colorVal: Color? = null, + val listFloatVal: ArrayList? = null, + val listStringVal: ArrayList? = null, ) diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt index 50a144fc4..f2b3913c1 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt @@ -1,9 +1,13 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop interface MapVectorLayerSelectionCallback { - fun _didSelectFeature(featureInfo: MapVectorLayerFeatureInfo, coord: Coord): Boolean - fun _didMultiSelectLayerFeatures(layerIdentifier: String, coord: Coord): Boolean - fun _didClickBackgroundConfirmed(coord: Coord): Boolean + fun didSelectFeature(featureInfo: MapVectorLayerFeatureInfo, layerIdentifier: String, coord: Coord): Boolean + fun didMultiSelectLayerFeatures( + featureInfos: List, + layerIdentifier: String, + coord: Coord, + ): Boolean + fun didClickBackgroundConfirmed(coord: Coord): Boolean } expect class MapVectorLayerSelectionCallbackProxy(handler: MapVectorLayerSelectionCallback) { diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt new file mode 100644 index 000000000..40871bda3 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt @@ -0,0 +1,13 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class RectI( + x: Int, + y: Int, + width: Int, + height: Int, +) { + val x: Int + val y: Int + val width: Int + val height: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt new file mode 100644 index 000000000..2434db0c7 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -0,0 +1,19 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class Tiled2dMapVectorLayerInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + companion object { + fun createExplicitly( + layerName: String, + styleJson: String?, + localStyleJson: Boolean?, + loaders: List, + fontLoader: FontLoaderInterface?, + localDataProvider: Tiled2dMapVectorLayerLocalDataProviderInterface?, + customZoomInfo: Tiled2dMapZoomInfo?, + symbolDelegate: Tiled2dMapVectorLayerSymbolDelegateInterface?, + sourceUrlParams: Map?, + ): Tiled2dMapVectorLayerInterface? + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt new file mode 100644 index 000000000..15ae7e092 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt @@ -0,0 +1,17 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect open class LoaderInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class FontLoaderInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class Tiled2dMapVectorLayerLocalDataProviderInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} + +expect open class Tiled2dMapVectorLayerSymbolDelegateInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt new file mode 100644 index 000000000..f2fe14ccb --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt @@ -0,0 +1,9 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class Vec2F( + x: Float, + y: Float, +) { + val x: Float + val y: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt new file mode 100644 index 000000000..b27537d90 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt @@ -0,0 +1,9 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class Vec2I( + x: Int, + y: Int, +) { + val x: Int + val y: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt new file mode 100644 index 000000000..7eab76974 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt @@ -0,0 +1,11 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect class Vec3D( + x: Double, + y: Double, + z: Double, +) { + val x: Double + val y: Double + val z: Double +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt new file mode 100644 index 000000000..01f937546 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCColor + +actual typealias Color = MCColor diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt new file mode 100644 index 000000000..3e6b9b350 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt @@ -0,0 +1,16 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCIndexedLayerInterfaceProtocol + +actual open class IndexedLayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val indexedLayer = nativeHandle as? MCIndexedLayerInterfaceProtocol + + actual fun getLayerInterface(): LayerInterface = + LayerInterface(indexedLayer?.getLayerInterface()) + + actual fun getIndex(): Int = indexedLayer?.getIndex() ?: 0 +} + +internal fun IndexedLayerInterface.asMapCore(): MCIndexedLayerInterfaceProtocol? = + nativeHandle as? MCIndexedLayerInterfaceProtocol diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt new file mode 100644 index 000000000..7ec9394ed --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt @@ -0,0 +1,91 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCLayerInterfaceProtocol +import MapCoreSharedModule.MCLayerReadyState +import MapCoreSharedModule.MCLayerReadyStateERROR +import MapCoreSharedModule.MCLayerReadyStateNOT_READY +import MapCoreSharedModule.MCLayerReadyStateREADY +import MapCoreSharedModule.MCLayerReadyStateTIMEOUT_ERROR + +actual open class LayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val layer = nativeHandle as? MCLayerInterfaceProtocol + + actual fun setMaskingObject(maskingObject: MaskingObjectInterface?) { + layer?.setMaskingObject(maskingObject?.asMapCore()) + } + + actual fun update() { + layer?.update() + } + + actual fun buildRenderPasses(): List = + layer?.buildRenderPasses()?.map { RenderPassInterface(it) } ?: emptyList() + + actual fun buildComputePasses(): List = + layer?.buildComputePasses()?.map { ComputePassInterface(it) } ?: emptyList() + + actual fun onAdded(mapInterface: MapInterface, layerIndex: Int) { + layer?.onAdded(mapInterface.asMapCore(), layerIndex) + } + + actual fun onRemoved() { + layer?.onRemoved() + } + + actual fun pause() { + layer?.pause() + } + + actual fun resume() { + layer?.resume() + } + + actual fun hide() { + layer?.hide() + } + + actual fun show() { + layer?.show() + } + + actual fun setAlpha(alpha: Float) { + layer?.setAlpha(alpha) + } + + actual fun getAlpha(): Float = layer?.getAlpha() ?: 0f + + actual fun setScissorRect(scissorRect: RectI?) { + layer?.setScissorRect(scissorRect) + } + + actual fun isReadyToRenderOffscreen(): LayerReadyState = + layer?.isReadyToRenderOffscreen().asShared() + + actual fun enableAnimations(enabled: Boolean) { + layer?.enableAnimations(enabled) + } + + actual fun setErrorManager(errorManager: ErrorManager) { + layer?.setErrorManager(errorManager.asMapCore()) + } + + actual fun forceReload() { + layer?.forceReload() + } + + actual fun setPrimaryRenderTarget(target: RenderTargetInterface?) { + layer?.setPrimaryRenderTarget(target?.asMapCore()) + } +} + +internal fun LayerInterface.asMapCore(): MCLayerInterfaceProtocol? = + nativeHandle as? MCLayerInterfaceProtocol + +private fun MCLayerReadyState?.asShared(): LayerReadyState = when (this) { + MCLayerReadyStateREADY -> LayerReadyState.READY + MCLayerReadyStateNOT_READY -> LayerReadyState.NOT_READY + MCLayerReadyStateERROR -> LayerReadyState.ERROR + MCLayerReadyStateTIMEOUT_ERROR -> LayerReadyState.TIMEOUT_ERROR + null -> LayerReadyState.NOT_READY +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt new file mode 100644 index 000000000..1d500762c --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt @@ -0,0 +1,245 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCMapCamera3dInterface +import MapCoreSharedModule.MCMapCameraInterface +import MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol +import platform.Foundation.NSArray +import platform.Foundation.NSNumber +import platform.darwin.NSObject + +actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val camera = nativeHandle as? MCMapCameraInterface + + actual companion object { + actual fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface { + val created = MCMapCameraInterface.create(mapInterface.asMapCore(), screenDensityPpi, is3d) + return MapCameraInterface(created) + } + } + + actual fun freeze(freeze: Boolean) { + camera?.freeze(freeze) + } + + actual fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { + camera?.moveToCenterPositionZoom(centerPosition, zoom, animated) + } + + actual fun moveToCenterPosition(centerPosition: Coord, animated: Boolean) { + camera?.moveToCenterPosition(centerPosition, animated) + } + + actual fun moveToBoundingBox(boundingBox: RectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) { + val minZoomNumber = minZoom?.let { NSNumber(double = it) } + val maxZoomNumber = maxZoom?.let { NSNumber(double = it) } + camera?.moveToBoundingBox(boundingBox, paddingPc, animated, minZoomNumber, maxZoomNumber) + } + + actual fun getCenterPosition(): Coord = requireNotNull(camera?.getCenterPosition()) + + actual fun setZoom(zoom: Double, animated: Boolean) { + camera?.setZoom(zoom, animated) + } + + actual fun getZoom(): Double = requireNotNull(camera?.getZoom()) + + actual fun setRotation(angle: Float, animated: Boolean) { + camera?.setRotation(angle, animated) + } + + actual fun getRotation(): Float = requireNotNull(camera?.getRotation()) + + actual fun setMinZoom(minZoom: Double) { + camera?.setMinZoom(minZoom) + } + + actual fun setMaxZoom(maxZoom: Double) { + camera?.setMaxZoom(maxZoom) + } + + actual fun getMinZoom(): Double = requireNotNull(camera?.getMinZoom()) + + actual fun getMaxZoom(): Double = requireNotNull(camera?.getMaxZoom()) + + actual fun setBounds(bounds: RectCoord) { + camera?.setBounds(bounds) + } + + actual fun getBounds(): RectCoord = requireNotNull(camera?.getBounds()) + + actual fun isInBounds(coords: Coord): Boolean = camera?.isInBounds(coords) ?: false + + actual fun setPaddingLeft(padding: Float) { + camera?.setPaddingLeft(padding) + } + + actual fun setPaddingRight(padding: Float) { + camera?.setPaddingRight(padding) + } + + actual fun setPaddingTop(padding: Float) { + camera?.setPaddingTop(padding) + } + + actual fun setPaddingBottom(padding: Float) { + camera?.setPaddingBottom(padding) + } + + actual fun getVisibleRect(): RectCoord = requireNotNull(camera?.getVisibleRect()) + + actual fun getPaddingAdjustedVisibleRect(): RectCoord = requireNotNull(camera?.getPaddingAdjustedVisibleRect()) + + actual fun getScreenDensityPpi(): Float = requireNotNull(camera?.getScreenDensityPpi()) + + actual fun update() { + camera?.update() + } + + actual fun getInvariantModelMatrix(coordinate: Coord, scaleInvariant: Boolean, rotationInvariant: Boolean): List { + val list = camera?.getInvariantModelMatrix(coordinate, scaleInvariant, rotationInvariant) ?: return emptyList() + return list.mapNotNull { (it as? NSNumber)?.floatValue } + } + + actual fun addListener(listener: MapCameraListenerInterface) { + camera?.addListener(MapCameraListenerProxy(listener)) + } + + actual fun removeListener(listener: MapCameraListenerInterface) { + camera?.removeListener(MapCameraListenerProxy(listener)) + } + + actual fun notifyListenerBoundsChange() { + camera?.notifyListenerBoundsChange() + } + + actual fun coordFromScreenPosition(posScreen: Vec2F): Coord = requireNotNull(camera?.coordFromScreenPosition(posScreen)) + + actual fun coordFromScreenPositionZoom(posScreen: Vec2F, zoom: Float): Coord = + requireNotNull(camera?.coordFromScreenPositionZoom(posScreen, zoom)) + + actual fun screenPosFromCoord(coord: Coord): Vec2F = requireNotNull(camera?.screenPosFromCoord(coord)) + + actual fun screenPosFromCoordZoom(coord: Coord, zoom: Float): Vec2F = + requireNotNull(camera?.screenPosFromCoordZoom(coord, zoom)) + + actual fun mapUnitsFromPixels(distancePx: Double): Double = requireNotNull(camera?.mapUnitsFromPixels(distancePx)) + + actual fun getScalingFactor(): Double = requireNotNull(camera?.getScalingFactor()) + + actual fun coordIsVisibleOnScreen(coord: Coord, paddingPc: Float): Boolean = + camera?.coordIsVisibleOnScreen(coord, paddingPc) ?: false + + actual fun setRotationEnabled(enabled: Boolean) { + camera?.setRotationEnabled(enabled) + } + + actual fun setSnapToNorthEnabled(enabled: Boolean) { + camera?.setSnapToNorthEnabled(enabled) + } + + actual fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + camera?.setBoundsRestrictWholeVisibleRect(enabled) + } + + actual fun asCameraInterface(): CameraInterface = CameraInterface(requireNotNull(camera?.asCameraInterface())) + + actual fun getLastVpMatrixD(): List? = + camera?.getLastVpMatrixD()?.mapNotNull { (it as? NSNumber)?.doubleValue } + + actual fun getLastVpMatrix(): List? = + camera?.getLastVpMatrix()?.mapNotNull { (it as? NSNumber)?.floatValue } + + actual fun getLastInverseVpMatrix(): List? = + camera?.getLastInverseVpMatrix()?.mapNotNull { (it as? NSNumber)?.floatValue } + + actual fun getLastVpMatrixViewBounds(): RectCoord? = camera?.getLastVpMatrixViewBounds() + + actual fun getLastVpMatrixRotation(): Float? = camera?.getLastVpMatrixRotation()?.floatValue + + actual fun getLastVpMatrixZoom(): Float? = camera?.getLastVpMatrixZoom()?.floatValue + + actual fun getLastCameraPosition(): Vec3D? = camera?.getLastCameraPosition() + + actual fun asMapCamera3d(): MapCamera3dInterface? = camera?.asMapCamera3d()?.let { MapCamera3dInterface(it) } +} + +internal fun MapCameraInterface.asMapCore(): MCMapCameraInterface? = + nativeHandle as? MCMapCameraInterface + +private class MapCameraListenerProxy( + private val handler: MapCameraListenerInterface, +) : NSObject(), MCMapCameraListenerInterfaceProtocol { + override fun onVisibleBoundsChanged(visibleBounds: RectCoord, zoom: Double) { + handler.onVisibleBoundsChanged(visibleBounds, zoom) + } + + override fun onRotationChanged(angle: Float) { + handler.onRotationChanged(angle) + } + + override fun onMapInteraction() { + handler.onMapInteraction() + } + + override fun onCameraChange( + viewMatrix: NSArray, + projectionMatrix: NSArray, + origin: Vec3D, + verticalFov: Float, + horizontalFov: Float, + width: Float, + height: Float, + focusPointAltitude: Float, + focusPointPosition: Coord, + zoom: Float, + ) { + val view = viewMatrix.mapNotNull { (it as? NSNumber)?.floatValue } + val projection = projectionMatrix.mapNotNull { (it as? NSNumber)?.floatValue } + handler.onCameraChange( + viewMatrix = view, + projectionMatrix = projection, + origin = origin, + verticalFov = verticalFov, + horizontalFov = horizontalFov, + width = width, + height = height, + focusPointAltitude = focusPointAltitude, + focusPointPosition = focusPointPosition, + zoom = zoom, + ) + } +} + +actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val camera3d = nativeHandle as? MCMapCamera3dInterface + + actual fun getCameraConfig(): Camera3dConfig = requireNotNull(camera3d?.getCameraConfig()) + + actual fun setCameraConfig( + config: Camera3dConfig, + durationSeconds: Float?, + targetZoom: Float?, + targetCoordinate: Coord?, + ) { + camera3d?.setCameraConfig( + config, + durationSeconds?.let { NSNumber(float = it) }, + targetZoom?.let { NSNumber(float = it) }, + targetCoordinate, + ) + } +} + +actual class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + + actual companion object { + actual fun getBasicConfig(): Camera3dConfig = + MapCoreSharedModule.MCCamera3dConfigFactory.getBasicConfig() + + actual fun getRestorConfig(): Camera3dConfig = + MapCoreSharedModule.MCCamera3dConfigFactory.getRestorConfig() + } +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt new file mode 100644 index 000000000..51564bee8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt @@ -0,0 +1,106 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCCameraInterfaceProtocol +import MapCoreSharedModule.MCComputePassInterfaceProtocol +import MapCoreSharedModule.MCErrorManager +import MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol +import MapCoreSharedModule.MCMaskingObjectInterfaceProtocol +import MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol +import MapCoreSharedModule.MCRenderPassInterfaceProtocol +import MapCoreSharedModule.MCRenderTargetInterfaceProtocol +import MapCoreSharedModule.MCRenderingContextInterfaceProtocol +import MapCoreSharedModule.MCSchedulerInterfaceProtocol +import MapCoreSharedModule.MCShaderFactoryInterfaceProtocol +import MapCoreSharedModule.MCTouchHandlerInterfaceProtocol +import MapCoreSharedModule.MCCoordinateConversionHelperInterfaceProtocol + +actual open class GraphicsObjectFactoryInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class ShaderFactoryInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class RenderingContextInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class SchedulerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class TouchHandlerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class PerformanceLoggerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class CoordinateConversionHelperInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class RenderTargetInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class RenderPassInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class ComputePassInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class MaskingObjectInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class ErrorManager actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class CameraInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +internal fun GraphicsObjectFactoryInterface.asMapCore(): MCGraphicsObjectFactoryInterfaceProtocol? = + nativeHandle as? MCGraphicsObjectFactoryInterfaceProtocol + +internal fun ShaderFactoryInterface.asMapCore(): MCShaderFactoryInterfaceProtocol? = + nativeHandle as? MCShaderFactoryInterfaceProtocol + +internal fun RenderingContextInterface.asMapCore(): MCRenderingContextInterfaceProtocol? = + nativeHandle as? MCRenderingContextInterfaceProtocol + +internal fun SchedulerInterface.asMapCore(): MCSchedulerInterfaceProtocol? = + nativeHandle as? MCSchedulerInterfaceProtocol + +internal fun TouchHandlerInterface.asMapCore(): MCTouchHandlerInterfaceProtocol? = + nativeHandle as? MCTouchHandlerInterfaceProtocol + +internal fun PerformanceLoggerInterface.asMapCore(): MCPerformanceLoggerInterfaceProtocol? = + nativeHandle as? MCPerformanceLoggerInterfaceProtocol + +internal fun CoordinateConversionHelperInterface.asMapCore(): MCCoordinateConversionHelperInterfaceProtocol? = + nativeHandle as? MCCoordinateConversionHelperInterfaceProtocol + +internal fun RenderTargetInterface.asMapCore(): MCRenderTargetInterfaceProtocol? = + nativeHandle as? MCRenderTargetInterfaceProtocol + +internal fun RenderPassInterface.asMapCore(): MCRenderPassInterfaceProtocol? = + nativeHandle as? MCRenderPassInterfaceProtocol + +internal fun ComputePassInterface.asMapCore(): MCComputePassInterfaceProtocol? = + nativeHandle as? MCComputePassInterfaceProtocol + +internal fun MaskingObjectInterface.asMapCore(): MCMaskingObjectInterfaceProtocol? = + nativeHandle as? MCMaskingObjectInterfaceProtocol + +internal fun ErrorManager.asMapCore(): MCErrorManager? = + nativeHandle as? MCErrorManager + +internal fun CameraInterface.asMapCore(): MCCameraInterfaceProtocol? = + nativeHandle as? MCCameraInterfaceProtocol diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index d612ed07e..288aa6ce7 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -92,7 +92,7 @@ private class MapFactoryImpl( symbolDelegate = null, sourceUrlParams = null, ) - return layer?.let { MapVectorLayerImpl(it) } + return layer?.let { MapVectorLayer(it) } } override fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt index e7e9d60a0..be46633d5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -1,8 +1,5 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - import LayerGpsSharedModule.MCGpsLayerCallbackInterfaceProtocol import LayerGpsSharedModule.MCGpsLayerInterface import LayerGpsSharedModule.MCGpsMode @@ -15,7 +12,6 @@ import LayerGpsSharedModule.MCColor import LayerGpsSharedModule.MCTextureHolderInterfaceProtocol as GpsTextureHolderInterfaceProtocol import MapCoreObjC.MCMapCoreObjCFactory import MapCoreSharedModule.MCCoordinateSystemIdentifiers -import MapCoreSharedModule.MCLayerInterfaceProtocol as MapCoreLayerInterfaceProtocol import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode import kotlinx.cinterop.useContents import platform.CoreLocation.CLHeading @@ -26,11 +22,9 @@ import platform.darwin.NSObject import platform.UIKit.UIImage import platform.UIKit.UIImagePNGRepresentation -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapGpsLayer", exact = true) -actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - +actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : LayerInterface( + (nativeHandle as? MCGpsLayerInterface)?.asLayerInterface(), +) { actual abstract fun setMode(mode: GpsMode) actual abstract fun getMode(): GpsMode actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) @@ -72,9 +66,6 @@ class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { override fun lastLocation(): Coord? = lastKnownLocation - internal fun layerInterface(): MapCoreLayerInterfaceProtocol? = - gpsLayer.asLayerInterface() as? MapCoreLayerInterfaceProtocol - internal fun updateLocation(location: CLLocation) { val coord = location.coordinate.useContents { GpsCoord( diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt index 6dbf49aa7..e9057e5fd 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt @@ -1,60 +1,210 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - +import MapCoreSharedModule.MCMapCallbackInterfaceProtocol import MapCoreSharedModule.MCMapInterface +import MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol +import MapCoreSharedModule.MCLayerReadyState +import MapCoreSharedModule.MCLayerReadyStateERROR +import MapCoreSharedModule.MCLayerReadyStateNOT_READY +import MapCoreSharedModule.MCLayerReadyStateREADY +import MapCoreSharedModule.MCLayerReadyStateTIMEOUT_ERROR +import platform.darwin.NSObject -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapInterface", exact = true) -actual abstract class MapInterface actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - actual abstract fun addVectorLayer(layer: MapVectorLayer?) - actual abstract fun removeVectorLayer(layer: MapVectorLayer?) - actual abstract fun addRasterLayer(layer: MapRasterLayer?) - actual abstract fun removeRasterLayer(layer: MapRasterLayer?) - actual abstract fun addGpsLayer(layer: MapGpsLayer?) - actual abstract fun removeGpsLayer(layer: MapGpsLayer?) - actual abstract fun getCamera(): MapCameraInterface? +actual open class MapInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + private val map = nativeHandle as? MCMapInterface actual companion object { - actual fun create(nativeHandle: Any?): MapInterface = MapInterfaceImpl(nativeHandle) + actual fun create( + graphicsFactory: GraphicsObjectFactoryInterface, + shaderFactory: ShaderFactoryInterface, + renderingContext: RenderingContextInterface, + mapConfig: MapConfig, + scheduler: SchedulerInterface, + pixelDensity: Float, + is3d: Boolean, + ): MapInterface { + val created = MCMapInterface.create( + graphicsFactory.asMapCore(), + shaderFactory.asMapCore(), + renderingContext.asMapCore(), + mapConfig, + scheduler.asMapCore(), + pixelDensity, + is3d, + ) + return MapInterface(created) + } + + actual fun createWithOpenGl( + mapConfig: MapConfig, + scheduler: SchedulerInterface, + pixelDensity: Float, + is3d: Boolean, + ): MapInterface { + val created = MCMapInterface.createWithOpenGl( + mapConfig, + scheduler.asMapCore(), + pixelDensity, + is3d, + ) + return MapInterface(created) + } + } + + actual fun setCallbackHandler(callbackInterface: MapCallbackInterface?) { + val proxy = callbackInterface?.let { MapCallbackInterfaceProxy(it) } + map?.setCallbackHandler(proxy) + } + + actual fun getGraphicsObjectFactory(): GraphicsObjectFactoryInterface = + GraphicsObjectFactoryInterface(map?.getGraphicsObjectFactory()) + + actual fun getShaderFactory(): ShaderFactoryInterface = + ShaderFactoryInterface(map?.getShaderFactory()) + + actual fun getScheduler(): SchedulerInterface = + SchedulerInterface(map?.getScheduler()) + + actual fun getRenderingContext(): RenderingContextInterface = + RenderingContextInterface(map?.getRenderingContext()) + + actual fun getMapConfig(): MapConfig = requireNotNull(map?.getMapConfig()) + + actual fun getCoordinateConverterHelper(): CoordinateConversionHelperInterface = + CoordinateConversionHelperInterface(map?.getCoordinateConverterHelper()) + + actual fun setCamera(camera: MapCameraInterface) { + map?.setCamera(camera.asMapCore()) + } + + actual fun getCamera(): MapCameraInterface = MapCameraInterface(map?.getCamera()) + + actual fun setTouchHandler(touchHandler: TouchHandlerInterface) { + map?.setTouchHandler(touchHandler.asMapCore()) + } + + actual fun getTouchHandler(): TouchHandlerInterface = + TouchHandlerInterface(map?.getTouchHandler()) + + actual fun setPerformanceLoggers(performanceLoggers: List) { + map?.setPerformanceLoggers(performanceLoggers.mapNotNull { it.asMapCore() }) + } + + actual fun getPerformanceLoggers(): List = + map?.getPerformanceLoggers()?.map { PerformanceLoggerInterface(it) } ?: emptyList() + + actual fun getLayers(): List = + map?.getLayers()?.map { LayerInterface(it) } ?: emptyList() + + actual fun getLayersIndexed(): List = + map?.getLayersIndexed()?.map { IndexedLayerInterface(it) } ?: emptyList() + + actual fun addLayer(layer: LayerInterface) { + map?.addLayer(layer.asMapCore()) + } + + actual fun insertLayerAt(layer: LayerInterface, atIndex: Int) { + map?.insertLayerAt(layer.asMapCore(), atIndex) + } + + actual fun insertLayerAbove(layer: LayerInterface, above: LayerInterface) { + map?.insertLayerAbove(layer.asMapCore(), above.asMapCore()) } -} -private class MapInterfaceImpl(nativeHandle: Any?) : MapInterface(nativeHandle) { - private val nativeMapInterface = nativeHandle as? MCMapInterface + actual fun insertLayerBelow(layer: LayerInterface, below: LayerInterface) { + map?.insertLayerBelow(layer.asMapCore(), below.asMapCore()) + } + + actual fun removeLayer(layer: LayerInterface) { + map?.removeLayer(layer.asMapCore()) + } + + actual fun setViewportSize(size: Vec2I) { + map?.setViewportSize(size) + } + + actual fun setBackgroundColor(color: Color) { + map?.setBackgroundColor(color) + } + + actual fun is3d(): Boolean = map?.is3d() ?: false + + actual fun invalidate() { + map?.invalidate() + } + + actual fun resetIsInvalidated() { + map?.resetIsInvalidated() + } + + actual fun prepare() { + map?.prepare() + } + + actual fun getNeedsCompute(): Boolean = map?.getNeedsCompute() ?: false - override fun addVectorLayer(layer: MapVectorLayer?) { - val handle = layer as? MapVectorLayerImpl ?: return - handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } + actual fun drawOffscreenFrame(target: RenderTargetInterface) { + map?.drawOffscreenFrame(target.asMapCore()) } - override fun removeVectorLayer(layer: MapVectorLayer?) { - val handle = layer as? MapVectorLayerImpl ?: return - handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } + actual fun drawFrame() { + map?.drawFrame() } - override fun addRasterLayer(layer: MapRasterLayer?) { - val handle = layer ?: return - handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } + actual fun compute() { + map?.compute() } - override fun removeRasterLayer(layer: MapRasterLayer?) { - val handle = layer ?: return - handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } + actual fun resume() { + map?.resume() } - override fun addGpsLayer(layer: MapGpsLayer?) { - val handle = layer as? MapGpsLayerImpl ?: return - handle.layerInterface()?.let { nativeMapInterface?.addLayer(it) } + actual fun pause() { + map?.pause() } - override fun removeGpsLayer(layer: MapGpsLayer?) { - val handle = layer as? MapGpsLayerImpl ?: return - handle.layerInterface()?.let { nativeMapInterface?.removeLayer(it) } + actual fun destroy() { + map?.destroy() } - override fun getCamera(): MapCameraInterface? = nativeMapInterface?.getCamera() + actual fun drawReadyFrame(bounds: RectCoord, paddingPc: Float, timeout: Float, callbacks: MapReadyCallbackInterface) { + val proxy = MapReadyCallbackInterfaceProxy(callbacks) + map?.drawReadyFrame(bounds, paddingPc, timeout, proxy) + } + + actual fun forceReload() { + map?.forceReload() + } +} + +internal fun MapInterface.asMapCore(): MCMapInterface? = + nativeHandle as? MCMapInterface + +private class MapCallbackInterfaceProxy( + private val handler: MapCallbackInterface, +) : NSObject(), MCMapCallbackInterfaceProtocol { + override fun invalidate() { + handler.invalidate() + } + + override fun onMapResumed() { + handler.onMapResumed() + } +} + +private class MapReadyCallbackInterfaceProxy( + private val handler: MapReadyCallbackInterface, +) : NSObject(), MCMapReadyCallbackInterfaceProtocol { + override fun stateDidUpdate(state: MCLayerReadyState) { + handler.stateDidUpdate(state.asShared()) + } +} + +private fun MCLayerReadyState.asShared(): LayerReadyState = when (this) { + MCLayerReadyStateREADY -> LayerReadyState.READY + MCLayerReadyStateNOT_READY -> LayerReadyState.NOT_READY + MCLayerReadyStateERROR -> LayerReadyState.ERROR + MCLayerReadyStateTIMEOUT_ERROR -> LayerReadyState.TIMEOUT_ERROR + else -> LayerReadyState.NOT_READY } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt index 566061987..2436aee91 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt @@ -1,18 +1,13 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface -import MapCoreSharedModule.MCLayerInterfaceProtocol -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapRasterLayer", exact = true) actual open class MapRasterLayer actual constructor( nativeHandle: Any?, +) : LayerInterface( + (nativeHandle as? MCTiled2dMapRasterLayerInterface)?.asLayerInterface(), ) { private val layer = nativeHandle as? MCTiled2dMapRasterLayerInterface - internal fun layerInterface(): MCLayerInterfaceProtocol? = - layer?.asLayerInterface() + internal fun rasterLayerInterface(): MCTiled2dMapRasterLayerInterface? = layer } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt index e866007a6..a2425474c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt @@ -74,16 +74,7 @@ class MapTiled2dMapLayerConfigImplementation( } override fun getZoomInfo(): MCTiled2dMapZoomInfo { - val info = config.zoomInfo - return MCTiled2dMapZoomInfo( - zoomLevelScaleFactor = info.zoomLevelScaleFactor.toFloat(), - numDrawPreviousLayers = info.numDrawPreviousLayers, - numDrawPreviousOrLaterTLayers = info.numDrawPreviousOrLaterTLayers, - adaptScaleToScreen = info.adaptScaleToScreen, - maskTile = info.maskTile, - underzoom = info.underzoom, - overzoom = info.overzoom, - ) + return config.zoomInfo } override fun getLayerName(): String = config.layerName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt index d07760f8f..6fc12e221 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -1,28 +1,20 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface import MapCoreSharedModule.MCVectorLayerFeatureInfoValue +import platform.Foundation.NSNumber -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapVectorLayer", exact = true) -actual abstract class MapVectorLayer actual constructor(nativeHandle: Any?) { - protected val nativeHandle: Any? = nativeHandle - - actual abstract fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) - actual abstract fun setGlobalState(state: Map) -} - -class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { +actual class MapVectorLayer actual constructor(nativeHandle: Any?) : LayerInterface( + (nativeHandle as? MCTiled2dMapVectorLayerInterface)?.asLayerInterface(), +) { private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface - override fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallbackProxy?) { - layer?.setSelectionDelegate(delegate) + actual fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) { + val proxy = delegate?.let { MapVectorLayerSelectionCallbackProxy(it) } + layer?.setSelectionDelegate(proxy) } - override fun setGlobalState(state: Map) { + actual fun setGlobalState(state: Map) { val mapped = mutableMapOf() state.forEach { (key, value) -> mapped[key] = value.asMapCore() @@ -30,16 +22,19 @@ class MapVectorLayerImpl(nativeHandle: Any?) : MapVectorLayer(nativeHandle) { layer?.setGlobalState(mapped) } - internal fun layerInterface() = layer?.asLayerInterface() + internal fun vectorLayerInterface(): MCTiled2dMapVectorLayerInterface? = layer } -private fun MapVectorLayerFeatureInfoValue.asMapCore() = - MCVectorLayerFeatureInfoValue( - stringVal = stringVal, - doubleVal = null, - intVal = null, - boolVal = null, - colorVal = null, - listFloatVal = null, - listStringVal = listStringVal, - ) +private fun MapVectorLayerFeatureInfoValue.asMapCore(): MCVectorLayerFeatureInfoValue { + val floatList = listFloatVal?.map { NSNumber(float = it) } + val stringList = listStringVal?.map { it as String } + return MCVectorLayerFeatureInfoValue( + stringVal = stringVal, + doubleVal = doubleVal?.let { NSNumber(double = it) }, + intVal = intVal?.let { NSNumber(longLong = it) }, + boolVal = boolVal?.let { NSNumber(bool = it) }, + colorVal = colorVal, + listFloatVal = floatList, + listStringVal = stringList, + ) +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt index 575fbba02..fcba8bdba 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt @@ -6,6 +6,7 @@ import kotlin.native.ObjCName import MapCoreSharedModule.MCVectorLayerFeatureInfo import MapCoreSharedModule.MCVectorLayerFeatureInfoValue import MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol +import platform.Foundation.NSNumber import platform.darwin.NSObject @OptIn(ExperimentalObjCName::class) @@ -15,8 +16,8 @@ actual class MapVectorLayerSelectionCallbackProxy actual constructor( ) : NSObject(), MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol { actual val handler: MapVectorLayerSelectionCallback = handler override fun didSelectFeature(featureInfo: MCVectorLayerFeatureInfo, layerIdentifier: String, coord: Coord): Boolean { - val sharedFeatureInfo = featureInfo.asShared(layerIdentifier) - return handler._didSelectFeature(featureInfo = sharedFeatureInfo, coord = coord) + val sharedFeatureInfo = featureInfo.asShared() + return handler.didSelectFeature(featureInfo = sharedFeatureInfo, layerIdentifier = layerIdentifier, coord = coord) } override fun didMultiSelectLayerFeatures( @@ -24,16 +25,22 @@ actual class MapVectorLayerSelectionCallbackProxy actual constructor( layerIdentifier: String, coord: Coord, ): Boolean { - return handler._didMultiSelectLayerFeatures(layerIdentifier = layerIdentifier, coord = coord) + val sharedFeatureInfos = featureInfos.mapNotNull { it as? MCVectorLayerFeatureInfo } + .map { it.asShared() } + return handler.didMultiSelectLayerFeatures( + featureInfos = sharedFeatureInfos, + layerIdentifier = layerIdentifier, + coord = coord, + ) } override fun didClickBackgroundConfirmed(coord: Coord): Boolean { - return handler._didClickBackgroundConfirmed(coord = coord) + return handler.didClickBackgroundConfirmed(coord = coord) } } -private fun MCVectorLayerFeatureInfo.asShared(layerIdentifier: String): MapVectorLayerFeatureInfo { - val props = mutableMapOf() +private fun MCVectorLayerFeatureInfo.asShared(): MapVectorLayerFeatureInfo { + val props = HashMap() for (entry in properties.entries) { val key = entry.key as? String ?: continue val value = entry.value as? MCVectorLayerFeatureInfoValue ?: continue @@ -41,16 +48,24 @@ private fun MCVectorLayerFeatureInfo.asShared(layerIdentifier: String): MapVecto } return MapVectorLayerFeatureInfo( identifier = identifier, - layerIdentifier = layerIdentifier, properties = props, ) } private fun MCVectorLayerFeatureInfoValue.asShared(): MapVectorLayerFeatureInfoValue { - val stringValue = stringVal - ?: intVal?.stringValue - ?: doubleVal?.stringValue - ?: boolVal?.stringValue - val list = listStringVal?.mapNotNull { it as? String } - return MapVectorLayerFeatureInfoValue(stringVal = stringValue, listStringVal = list) + val floatList = listFloatVal + ?.mapNotNull { (it as? NSNumber)?.floatValue } + ?.let { ArrayList(it) } + val stringList = listStringVal + ?.mapNotNull { it as? String } + ?.let { ArrayList(it) } + return MapVectorLayerFeatureInfoValue( + stringVal = stringVal, + doubleVal = doubleVal?.doubleValue, + intVal = intVal?.longLongValue, + boolVal = boolVal?.boolValue, + colorVal = colorVal, + listFloatVal = floatList, + listStringVal = stringList, + ) } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt index a2b34c227..d8016501c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt @@ -14,7 +14,7 @@ actual typealias PlatformMapView = UIView actual class MapViewWrapper actual constructor() { private val mapView = MCMapViewObjC() @Suppress("CAST_NEVER_SUCCEEDS") - private val mapInterfaceImplementation = MapInterface.create(mapView.mapInterface as MCMapInterface) + private val mapInterfaceImplementation = MapInterface(mapView.mapInterface as MCMapInterface) actual val view: UIView = mapView actual val mapInterface: MapInterface = mapInterfaceImplementation diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt new file mode 100644 index 000000000..f5b42b248 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt @@ -0,0 +1,23 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCMapConfig as MapCoreMapConfig +import MapCoreSharedModule.MCMapCoordinateSystem as MapCoreMapCoordinateSystem +import MapCoreSharedModule.MCVec2F as MapCoreVec2F +import MapCoreSharedModule.MCVec2I as MapCoreVec2I +import MapCoreSharedModule.MCVec3D as MapCoreVec3D +import MapCoreSharedModule.MCRectI as MapCoreRectI +import MapCoreSharedModule.MCCameraInterpolation as MapCoreCameraInterpolation +import MapCoreSharedModule.MCCameraInterpolationValue as MapCoreCameraInterpolationValue +import MapCoreSharedModule.MCCamera3dConfig as MapCoreCamera3dConfig +import MapCoreSharedModule.MCTiled2dMapZoomInfo as MapCoreTiled2dMapZoomInfo + +actual typealias Vec2F = MapCoreVec2F +actual typealias Vec2I = MapCoreVec2I +actual typealias Vec3D = MapCoreVec3D +actual typealias RectI = MapCoreRectI +actual typealias MapConfig = MapCoreMapConfig +actual typealias MapCoordinateSystem = MapCoreMapCoordinateSystem +actual typealias CameraInterpolation = MapCoreCameraInterpolation +actual typealias CameraInterpolationValue = MapCoreCameraInterpolationValue +actual typealias Camera3dConfig = MapCoreCamera3dConfig +actual typealias Tiled2dMapZoomInfo = MapCoreTiled2dMapZoomInfo diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt new file mode 100644 index 000000000..fd63b0184 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -0,0 +1,46 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface +import platform.Foundation.NSNumber + +actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + + actual companion object { + actual fun createExplicitly( + layerName: String, + styleJson: String?, + localStyleJson: Boolean?, + loaders: List, + fontLoader: FontLoaderInterface?, + localDataProvider: Tiled2dMapVectorLayerLocalDataProviderInterface?, + customZoomInfo: Tiled2dMapZoomInfo?, + symbolDelegate: Tiled2dMapVectorLayerSymbolDelegateInterface?, + sourceUrlParams: Map?, + ): Tiled2dMapVectorLayerInterface? { + val typedLoaders = loaders.map { requireNotNull(it.asMapCore()) } + val typedFontLoader = fontLoader?.asMapCore() + val typedLocalDataProvider = localDataProvider?.asMapCore() + val typedZoomInfo = customZoomInfo + val typedSymbolDelegate = symbolDelegate?.asMapCore() + val localStyleJsonNumber = localStyleJson?.let { NSNumber(bool = it) } + @Suppress("UNCHECKED_CAST") + val typedSourceUrlParams = sourceUrlParams?.let { it as Map } + val layer = MCTiled2dMapVectorLayerInterface.createExplicitly( + layerName = layerName, + styleJson = styleJson, + localStyleJson = localStyleJsonNumber, + loaders = typedLoaders, + fontLoader = typedFontLoader, + localDataProvider = typedLocalDataProvider, + customZoomInfo = typedZoomInfo, + symbolDelegate = typedSymbolDelegate, + sourceUrlParams = typedSourceUrlParams, + ) + return layer?.let { Tiled2dMapVectorLayerInterface(it) } + } + } +} + +internal fun Tiled2dMapVectorLayerInterface.asMapCore(): MCTiled2dMapVectorLayerInterface? = + nativeHandle as? MCTiled2dMapVectorLayerInterface diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt new file mode 100644 index 000000000..3e374cda7 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt @@ -0,0 +1,34 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCFontLoaderInterfaceProtocol +import MapCoreSharedModule.MCLoaderInterfaceProtocol +import MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol +import MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol + +actual open class LoaderInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class FontLoaderInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class Tiled2dMapVectorLayerLocalDataProviderInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +actual open class Tiled2dMapVectorLayerSymbolDelegateInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle +} + +internal fun LoaderInterface.asMapCore(): MCLoaderInterfaceProtocol? = + nativeHandle as? MCLoaderInterfaceProtocol + +internal fun FontLoaderInterface.asMapCore(): MCFontLoaderInterfaceProtocol? = + nativeHandle as? MCFontLoaderInterfaceProtocol + +internal fun Tiled2dMapVectorLayerLocalDataProviderInterface.asMapCore(): MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol? = + nativeHandle as? MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol + +internal fun Tiled2dMapVectorLayerSymbolDelegateInterface.asMapCore(): MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol? = + nativeHandle as? MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt new file mode 100644 index 000000000..db4e3bed1 --- /dev/null +++ b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCMapInterface + +actual class MyMapInterface: MCMapInterface() \ No newline at end of file diff --git a/src/swift/MapCoreKmp/StartYourBridgeHere.swift b/src/swift/MapCoreKmp/StartYourBridgeHere.swift new file mode 100644 index 000000000..057ec9525 --- /dev/null +++ b/src/swift/MapCoreKmp/StartYourBridgeHere.swift @@ -0,0 +1,15 @@ +import Foundation +/** +This is a starting class to set up your bridge. +Ensure that your class is public and has the @objcMembers / @objc annotation. +This file has been created because the folder is empty. +Ignore this file if you don't need it. +**/ + +/** +@objcMembers public class StartHere: NSObject { + public override init() { + super.init() + } +} +**/ From dbe294f8191086c9e456e8bedff150f823591a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 17:25:05 +0100 Subject: [PATCH 31/63] fix: kmp ios nativeHandle access --- .../interop/Tiled2dMapVectorLayerInterface.kt | 6 ++--- .../Tiled2dMapVectorLayerTypesAndroid.kt | 24 +++++++++---------- .../interop/Tiled2dMapVectorLayerInterface.kt | 6 ++--- .../interop/Tiled2dMapVectorLayerTypesIos.kt | 24 +++++++++---------- .../feature/map/interop/MapInterface.ios.kt | 5 ---- 5 files changed, 30 insertions(+), 35 deletions(-) delete mode 100644 src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt index aa198e69e..4633a6593 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -6,6 +6,9 @@ import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreL actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + internal fun asMapscore(): MapscoreVectorLayerInterface? = + nativeHandle as? MapscoreVectorLayerInterface + actual companion object { actual fun createExplicitly( layerName: String, @@ -41,6 +44,3 @@ actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any } } } - -internal fun Tiled2dMapVectorLayerInterface.asMapscore(): MapscoreVectorLayerInterface? = - nativeHandle as? MapscoreVectorLayerInterface diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt index fa2080d37..edf3d8804 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt @@ -7,28 +7,28 @@ import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreL actual open class LoaderInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreLoader? = + nativeHandle as? MapscoreLoader } actual open class FontLoaderInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreFontLoader? = + nativeHandle as? MapscoreFontLoader } actual open class Tiled2dMapVectorLayerLocalDataProviderInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreLocalDataProvider? = + nativeHandle as? MapscoreLocalDataProvider } actual open class Tiled2dMapVectorLayerSymbolDelegateInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle -} -internal fun LoaderInterface.asMapscore(): MapscoreLoader? = - nativeHandle as? MapscoreLoader - -internal fun FontLoaderInterface.asMapscore(): MapscoreFontLoader? = - nativeHandle as? MapscoreFontLoader - -internal fun Tiled2dMapVectorLayerLocalDataProviderInterface.asMapscore(): MapscoreLocalDataProvider? = - nativeHandle as? MapscoreLocalDataProvider - -internal fun Tiled2dMapVectorLayerSymbolDelegateInterface.asMapscore(): MapscoreSymbolDelegate? = - nativeHandle as? MapscoreSymbolDelegate + internal fun asMapscore(): MapscoreSymbolDelegate? = + nativeHandle as? MapscoreSymbolDelegate +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt index fd63b0184..133996cc5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -6,6 +6,9 @@ import platform.Foundation.NSNumber actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + internal fun asMapCore(): MCTiled2dMapVectorLayerInterface? = + nativeHandle as? MCTiled2dMapVectorLayerInterface + actual companion object { actual fun createExplicitly( layerName: String, @@ -41,6 +44,3 @@ actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any } } } - -internal fun Tiled2dMapVectorLayerInterface.asMapCore(): MCTiled2dMapVectorLayerInterface? = - nativeHandle as? MCTiled2dMapVectorLayerInterface diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt index 3e374cda7..0aa64844e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt @@ -7,28 +7,28 @@ import MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtoco actual open class LoaderInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCLoaderInterfaceProtocol? = + nativeHandle as? MCLoaderInterfaceProtocol } actual open class FontLoaderInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCFontLoaderInterfaceProtocol? = + nativeHandle as? MCFontLoaderInterfaceProtocol } actual open class Tiled2dMapVectorLayerLocalDataProviderInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol? = + nativeHandle as? MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol } actual open class Tiled2dMapVectorLayerSymbolDelegateInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle -} -internal fun LoaderInterface.asMapCore(): MCLoaderInterfaceProtocol? = - nativeHandle as? MCLoaderInterfaceProtocol - -internal fun FontLoaderInterface.asMapCore(): MCFontLoaderInterfaceProtocol? = - nativeHandle as? MCFontLoaderInterfaceProtocol - -internal fun Tiled2dMapVectorLayerLocalDataProviderInterface.asMapCore(): MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol? = - nativeHandle as? MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol - -internal fun Tiled2dMapVectorLayerSymbolDelegateInterface.asMapCore(): MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol? = - nativeHandle as? MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol + internal fun asMapCore(): MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol? = + nativeHandle as? MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol +} diff --git a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt b/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt deleted file mode 100644 index db4e3bed1..000000000 --- a/src/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.ios.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCMapInterface - -actual class MyMapInterface: MCMapInterface() \ No newline at end of file From a1c7a0922e8beb1394b124027211cfb8effe4bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 17:36:30 +0100 Subject: [PATCH 32/63] fix: kmp ios wrappers and camera config --- .../IndexedLayerInterfaceImplementation.kt | 6 +- .../interop/LayerInterfaceImplementation.kt | 6 +- .../MapCameraInterfaceImplementation.kt | 8 +- .../map/interop/MapCoreTypesAndroid.kt | 78 +++++++++---------- .../map/interop/MapInterfaceImplementation.kt | 6 +- .../interop/Tiled2dMapVectorLayerInterface.kt | 2 +- .../feature/map/interop/Camera3dConfig.kt | 2 +- .../interop/Tiled2dMapVectorLayerInterface.kt | 2 +- .../feature/map/interop/Camera3dConfigIos.kt | 76 ++++++++++++++++++ .../IndexedLayerInterfaceImplementation.kt | 6 +- .../interop/LayerInterfaceImplementation.kt | 7 +- .../feature/map/interop/MapCameraInterface.kt | 5 -- .../MapCameraInterfaceImplementation.kt | 17 ++-- .../feature/map/interop/MapCoreTypesIos.kt | 78 +++++++++---------- .../map/interop/MapInterfaceImplementation.kt | 6 +- .../feature/map/interop/RecordTypealiases.kt | 6 -- .../interop/Tiled2dMapVectorLayerInterface.kt | 2 +- 17 files changed, 190 insertions(+), 123 deletions(-) create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt index 7a62fa82a..1b014b3e4 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt @@ -6,11 +6,11 @@ actual open class IndexedLayerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val indexedLayer = nativeHandle as? MapscoreIndexedLayerInterface + internal fun asMapscore(): MapscoreIndexedLayerInterface? = + nativeHandle as? MapscoreIndexedLayerInterface + actual fun getLayerInterface(): LayerInterface = LayerInterface(indexedLayer?.getLayerInterface()) actual fun getIndex(): Int = indexedLayer?.getIndex() ?: 0 } - -internal fun IndexedLayerInterface.asMapscore(): MapscoreIndexedLayerInterface? = - nativeHandle as? MapscoreIndexedLayerInterface diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt index c6507117f..c2a0f082b 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt @@ -8,6 +8,9 @@ actual open class LayerInterface actual constructor(nativeHandle: Any?) { private val layer = nativeHandle as? MapscoreLayerInterface + internal fun asMapscore(): MapscoreLayerInterface? = + nativeHandle as? MapscoreLayerInterface + actual fun setMaskingObject(maskingObject: MaskingObjectInterface?) { layer?.setMaskingObject(maskingObject?.asMapscore()) } @@ -78,9 +81,6 @@ actual open class LayerInterface actual constructor(nativeHandle: Any?) { } } -internal fun LayerInterface.asMapscore(): MapscoreLayerInterface? = - nativeHandle as? MapscoreLayerInterface - internal fun MapscoreLayerReadyState?.asShared(): LayerReadyState = when (this) { MapscoreLayerReadyState.READY -> LayerReadyState.READY MapscoreLayerReadyState.NOT_READY -> LayerReadyState.NOT_READY diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt index 8830fb6bb..f8e62f469 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt @@ -8,6 +8,9 @@ actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val camera = nativeHandle as? MapscoreMapCameraInterface + internal fun asMapscore(): MapscoreMapCameraInterface? = + nativeHandle as? MapscoreMapCameraInterface + actual companion object { actual fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface { val created = MapscoreMapCameraInterface.create(requireNotNull(mapInterface.asMapscore()), screenDensityPpi, is3d) @@ -156,9 +159,6 @@ actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { actual fun asMapCamera3d(): MapCamera3dInterface? = camera?.asMapCamera3d()?.let { MapCamera3dInterface(it) } } -internal fun MapCameraInterface.asMapscore(): MapscoreMapCameraInterface? = - nativeHandle as? MapscoreMapCameraInterface - private class MapCameraListenerProxy( private val handler: MapCameraListenerInterface, ) : MapscoreMapCameraListenerInterface() { @@ -217,7 +217,7 @@ actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { } } -actual class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { +actual open class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle actual companion object { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt index f16d17c3d..cb525a0f0 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt @@ -16,91 +16,91 @@ import io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface as Ma actual open class GraphicsObjectFactoryInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreGraphicsObjectFactoryInterface? = + nativeHandle as? MapscoreGraphicsObjectFactoryInterface } actual open class ShaderFactoryInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreShaderFactoryInterface? = + nativeHandle as? MapscoreShaderFactoryInterface } actual open class RenderingContextInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreRenderingContextInterface? = + nativeHandle as? MapscoreRenderingContextInterface } actual open class SchedulerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreSchedulerInterface? = + nativeHandle as? MapscoreSchedulerInterface } actual open class TouchHandlerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreTouchHandlerInterface? = + nativeHandle as? MapscoreTouchHandlerInterface } actual open class PerformanceLoggerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscorePerformanceLoggerInterface? = + nativeHandle as? MapscorePerformanceLoggerInterface } actual open class CoordinateConversionHelperInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreCoordinateConversionHelperInterface? = + nativeHandle as? MapscoreCoordinateConversionHelperInterface } actual open class RenderTargetInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreRenderTargetInterface? = + nativeHandle as? MapscoreRenderTargetInterface } actual open class RenderPassInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreRenderPassInterface? = + nativeHandle as? MapscoreRenderPassInterface } actual open class ComputePassInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreComputePassInterface? = + nativeHandle as? MapscoreComputePassInterface } actual open class MaskingObjectInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreMaskingObjectInterface? = + nativeHandle as? MapscoreMaskingObjectInterface } actual open class ErrorManager actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreErrorManager? = + nativeHandle as? MapscoreErrorManager } actual open class CameraInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle -} -internal fun GraphicsObjectFactoryInterface.asMapscore(): MapscoreGraphicsObjectFactoryInterface? = - nativeHandle as? MapscoreGraphicsObjectFactoryInterface - -internal fun ShaderFactoryInterface.asMapscore(): MapscoreShaderFactoryInterface? = - nativeHandle as? MapscoreShaderFactoryInterface - -internal fun RenderingContextInterface.asMapscore(): MapscoreRenderingContextInterface? = - nativeHandle as? MapscoreRenderingContextInterface - -internal fun SchedulerInterface.asMapscore(): MapscoreSchedulerInterface? = - nativeHandle as? MapscoreSchedulerInterface - -internal fun TouchHandlerInterface.asMapscore(): MapscoreTouchHandlerInterface? = - nativeHandle as? MapscoreTouchHandlerInterface - -internal fun PerformanceLoggerInterface.asMapscore(): MapscorePerformanceLoggerInterface? = - nativeHandle as? MapscorePerformanceLoggerInterface - -internal fun CoordinateConversionHelperInterface.asMapscore(): MapscoreCoordinateConversionHelperInterface? = - nativeHandle as? MapscoreCoordinateConversionHelperInterface - -internal fun RenderTargetInterface.asMapscore(): MapscoreRenderTargetInterface? = - nativeHandle as? MapscoreRenderTargetInterface - -internal fun RenderPassInterface.asMapscore(): MapscoreRenderPassInterface? = - nativeHandle as? MapscoreRenderPassInterface - -internal fun ComputePassInterface.asMapscore(): MapscoreComputePassInterface? = - nativeHandle as? MapscoreComputePassInterface - -internal fun MaskingObjectInterface.asMapscore(): MapscoreMaskingObjectInterface? = - nativeHandle as? MapscoreMaskingObjectInterface - -internal fun ErrorManager.asMapscore(): MapscoreErrorManager? = - nativeHandle as? MapscoreErrorManager - -internal fun CameraInterface.asMapscore(): MapscoreCameraInterface? = - nativeHandle as? MapscoreCameraInterface + internal fun asMapscore(): MapscoreCameraInterface? = + nativeHandle as? MapscoreCameraInterface +} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt index 1cbe29e38..44ab8cdcb 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt @@ -8,6 +8,9 @@ actual open class MapInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val map = nativeHandle as? MapscoreMapInterface + internal fun asMapscore(): MapscoreMapInterface? = + nativeHandle as? MapscoreMapInterface + actual companion object { actual fun create( graphicsFactory: GraphicsObjectFactoryInterface, @@ -173,9 +176,6 @@ actual open class MapInterface actual constructor(nativeHandle: Any?) { } } -internal fun MapInterface.asMapscore(): MapscoreMapInterface? = - nativeHandle as? MapscoreMapInterface - private class MapCallbackInterfaceProxy( private val handler: MapCallbackInterface, ) : MapscoreMapCallbackInterface() { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt index 4633a6593..691594a6a 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -3,7 +3,7 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayerInterface import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreLoaderInterface -actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { +actual open class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle internal fun asMapscore(): MapscoreVectorLayerInterface? = diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt index c5a2363d6..20575874f 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt @@ -34,7 +34,7 @@ expect class Camera3dConfig( val verticalDisplacementInterpolationValues: CameraInterpolation } -expect class Camera3dConfigFactory constructor(nativeHandle: Any? = null) { +expect open class Camera3dConfigFactory constructor(nativeHandle: Any? = null) { protected val nativeHandle: Any? companion object { diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt index 2434db0c7..92ecaf0e3 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -1,6 +1,6 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect class Tiled2dMapVectorLayerInterface constructor(nativeHandle: Any? = null) { +expect open class Tiled2dMapVectorLayerInterface constructor(nativeHandle: Any? = null) { protected val nativeHandle: Any? companion object { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt new file mode 100644 index 000000000..d5ecb37c8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt @@ -0,0 +1,76 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCCamera3dConfig +import MapCoreSharedModule.MCCameraInterpolation +import MapCoreSharedModule.MCCameraInterpolationValue +import platform.Foundation.NSNumber + +actual class CameraInterpolationValue actual constructor( + stop: Float, + value: Float, +) { + actual val stop: Float = stop + actual val value: Float = value +} + +actual class CameraInterpolation actual constructor( + stops: List, +) { + actual val stops: List = stops +} + +actual class Camera3dConfig actual constructor( + key: String, + allowUserInteraction: Boolean, + rotationSpeed: Float?, + animationDurationMs: Int, + minZoom: Float, + maxZoom: Float, + pitchInterpolationValues: CameraInterpolation, + verticalDisplacementInterpolationValues: CameraInterpolation, +) { + actual val key: String = key + actual val allowUserInteraction: Boolean = allowUserInteraction + actual val rotationSpeed: Float? = rotationSpeed + actual val animationDurationMs: Int = animationDurationMs + actual val minZoom: Float = minZoom + actual val maxZoom: Float = maxZoom + actual val pitchInterpolationValues: CameraInterpolation = pitchInterpolationValues + actual val verticalDisplacementInterpolationValues: CameraInterpolation = verticalDisplacementInterpolationValues +} + +internal fun CameraInterpolationValue.asMapCore(): MCCameraInterpolationValue = + MCCameraInterpolationValue.cameraInterpolationValueWithStop(stop = stop, value = value) + +internal fun CameraInterpolation.asMapCore(): MCCameraInterpolation = + MCCameraInterpolation.cameraInterpolationWithStops(stops.map { it.asMapCore() }) + +internal fun CameraInterpolationValueFromMapCore(value: MCCameraInterpolationValue): CameraInterpolationValue = + CameraInterpolationValue(stop = value.stop, value = value.value) + +internal fun CameraInterpolationFromMapCore(value: MCCameraInterpolation): CameraInterpolation = + CameraInterpolation(stops = value.stops.map { CameraInterpolationValueFromMapCore(it) }) + +internal fun Camera3dConfig.asMapCore(): MCCamera3dConfig = + MCCamera3dConfig.camera3dConfigWithKey( + key = key, + allowUserInteraction = allowUserInteraction, + rotationSpeed = rotationSpeed?.let { NSNumber(float = it) }, + animationDurationMs = animationDurationMs, + minZoom = minZoom, + maxZoom = maxZoom, + pitchInterpolationValues = pitchInterpolationValues.asMapCore(), + verticalDisplacementInterpolationValues = verticalDisplacementInterpolationValues.asMapCore(), + ) + +internal fun Camera3dConfigFromMapCore(value: MCCamera3dConfig): Camera3dConfig = + Camera3dConfig( + key = value.key, + allowUserInteraction = value.allowUserInteraction, + rotationSpeed = value.rotationSpeed?.floatValue, + animationDurationMs = value.animationDurationMs.toInt(), + minZoom = value.minZoom, + maxZoom = value.maxZoom, + pitchInterpolationValues = CameraInterpolationFromMapCore(value.pitchInterpolationValues), + verticalDisplacementInterpolationValues = CameraInterpolationFromMapCore(value.verticalDisplacementInterpolationValues), + ) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt index 3e6b9b350..0b826f7ad 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt @@ -6,11 +6,11 @@ actual open class IndexedLayerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val indexedLayer = nativeHandle as? MCIndexedLayerInterfaceProtocol + internal fun asMapCore(): MCIndexedLayerInterfaceProtocol? = + nativeHandle as? MCIndexedLayerInterfaceProtocol + actual fun getLayerInterface(): LayerInterface = LayerInterface(indexedLayer?.getLayerInterface()) actual fun getIndex(): Int = indexedLayer?.getIndex() ?: 0 } - -internal fun IndexedLayerInterface.asMapCore(): MCIndexedLayerInterfaceProtocol? = - nativeHandle as? MCIndexedLayerInterfaceProtocol diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt index 7ec9394ed..2dae9f7d7 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt @@ -11,6 +11,9 @@ actual open class LayerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val layer = nativeHandle as? MCLayerInterfaceProtocol + internal fun asMapCore(): MCLayerInterfaceProtocol? = + nativeHandle as? MCLayerInterfaceProtocol + actual fun setMaskingObject(maskingObject: MaskingObjectInterface?) { layer?.setMaskingObject(maskingObject?.asMapCore()) } @@ -79,13 +82,11 @@ actual open class LayerInterface actual constructor(nativeHandle: Any?) { } } -internal fun LayerInterface.asMapCore(): MCLayerInterfaceProtocol? = - nativeHandle as? MCLayerInterfaceProtocol - private fun MCLayerReadyState?.asShared(): LayerReadyState = when (this) { MCLayerReadyStateREADY -> LayerReadyState.READY MCLayerReadyStateNOT_READY -> LayerReadyState.NOT_READY MCLayerReadyStateERROR -> LayerReadyState.ERROR MCLayerReadyStateTIMEOUT_ERROR -> LayerReadyState.TIMEOUT_ERROR null -> LayerReadyState.NOT_READY + else -> LayerReadyState.NOT_READY } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt deleted file mode 100644 index e4d20d588..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCMapCameraInterface - -actual typealias MapCameraInterface = MCMapCameraInterface diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt index 1d500762c..8223711dc 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt @@ -11,6 +11,9 @@ actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val camera = nativeHandle as? MCMapCameraInterface + internal fun asMapCore(): MCMapCameraInterface? = + nativeHandle as? MCMapCameraInterface + actual companion object { actual fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface { val created = MCMapCameraInterface.create(mapInterface.asMapCore(), screenDensityPpi, is3d) @@ -164,9 +167,6 @@ actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { actual fun asMapCamera3d(): MapCamera3dInterface? = camera?.asMapCamera3d()?.let { MapCamera3dInterface(it) } } -internal fun MapCameraInterface.asMapCore(): MCMapCameraInterface? = - nativeHandle as? MCMapCameraInterface - private class MapCameraListenerProxy( private val handler: MapCameraListenerInterface, ) : NSObject(), MCMapCameraListenerInterfaceProtocol { @@ -215,7 +215,8 @@ actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val camera3d = nativeHandle as? MCMapCamera3dInterface - actual fun getCameraConfig(): Camera3dConfig = requireNotNull(camera3d?.getCameraConfig()) + actual fun getCameraConfig(): Camera3dConfig = + Camera3dConfigFromMapCore(requireNotNull(camera3d?.getCameraConfig())) actual fun setCameraConfig( config: Camera3dConfig, @@ -224,7 +225,7 @@ actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { targetCoordinate: Coord?, ) { camera3d?.setCameraConfig( - config, + config.asMapCore(), durationSeconds?.let { NSNumber(float = it) }, targetZoom?.let { NSNumber(float = it) }, targetCoordinate, @@ -232,14 +233,14 @@ actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { } } -actual class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { +actual open class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle actual companion object { actual fun getBasicConfig(): Camera3dConfig = - MapCoreSharedModule.MCCamera3dConfigFactory.getBasicConfig() + Camera3dConfigFromMapCore(MapCoreSharedModule.MCCamera3dConfigFactory.getBasicConfig()) actual fun getRestorConfig(): Camera3dConfig = - MapCoreSharedModule.MCCamera3dConfigFactory.getRestorConfig() + Camera3dConfigFromMapCore(MapCoreSharedModule.MCCamera3dConfigFactory.getRestorConfig()) } } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt index 51564bee8..f51172706 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt @@ -16,91 +16,91 @@ import MapCoreSharedModule.MCCoordinateConversionHelperInterfaceProtocol actual open class GraphicsObjectFactoryInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCGraphicsObjectFactoryInterfaceProtocol? = + nativeHandle as? MCGraphicsObjectFactoryInterfaceProtocol } actual open class ShaderFactoryInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCShaderFactoryInterfaceProtocol? = + nativeHandle as? MCShaderFactoryInterfaceProtocol } actual open class RenderingContextInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCRenderingContextInterfaceProtocol? = + nativeHandle as? MCRenderingContextInterfaceProtocol } actual open class SchedulerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCSchedulerInterfaceProtocol? = + nativeHandle as? MCSchedulerInterfaceProtocol } actual open class TouchHandlerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCTouchHandlerInterfaceProtocol? = + nativeHandle as? MCTouchHandlerInterfaceProtocol } actual open class PerformanceLoggerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCPerformanceLoggerInterfaceProtocol? = + nativeHandle as? MCPerformanceLoggerInterfaceProtocol } actual open class CoordinateConversionHelperInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCCoordinateConversionHelperInterfaceProtocol? = + nativeHandle as? MCCoordinateConversionHelperInterfaceProtocol } actual open class RenderTargetInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCRenderTargetInterfaceProtocol? = + nativeHandle as? MCRenderTargetInterfaceProtocol } actual open class RenderPassInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCRenderPassInterfaceProtocol? = + nativeHandle as? MCRenderPassInterfaceProtocol } actual open class ComputePassInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCComputePassInterfaceProtocol? = + nativeHandle as? MCComputePassInterfaceProtocol } actual open class MaskingObjectInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCMaskingObjectInterfaceProtocol? = + nativeHandle as? MCMaskingObjectInterfaceProtocol } actual open class ErrorManager actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCErrorManager? = + nativeHandle as? MCErrorManager } actual open class CameraInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle -} -internal fun GraphicsObjectFactoryInterface.asMapCore(): MCGraphicsObjectFactoryInterfaceProtocol? = - nativeHandle as? MCGraphicsObjectFactoryInterfaceProtocol - -internal fun ShaderFactoryInterface.asMapCore(): MCShaderFactoryInterfaceProtocol? = - nativeHandle as? MCShaderFactoryInterfaceProtocol - -internal fun RenderingContextInterface.asMapCore(): MCRenderingContextInterfaceProtocol? = - nativeHandle as? MCRenderingContextInterfaceProtocol - -internal fun SchedulerInterface.asMapCore(): MCSchedulerInterfaceProtocol? = - nativeHandle as? MCSchedulerInterfaceProtocol - -internal fun TouchHandlerInterface.asMapCore(): MCTouchHandlerInterfaceProtocol? = - nativeHandle as? MCTouchHandlerInterfaceProtocol - -internal fun PerformanceLoggerInterface.asMapCore(): MCPerformanceLoggerInterfaceProtocol? = - nativeHandle as? MCPerformanceLoggerInterfaceProtocol - -internal fun CoordinateConversionHelperInterface.asMapCore(): MCCoordinateConversionHelperInterfaceProtocol? = - nativeHandle as? MCCoordinateConversionHelperInterfaceProtocol - -internal fun RenderTargetInterface.asMapCore(): MCRenderTargetInterfaceProtocol? = - nativeHandle as? MCRenderTargetInterfaceProtocol - -internal fun RenderPassInterface.asMapCore(): MCRenderPassInterfaceProtocol? = - nativeHandle as? MCRenderPassInterfaceProtocol - -internal fun ComputePassInterface.asMapCore(): MCComputePassInterfaceProtocol? = - nativeHandle as? MCComputePassInterfaceProtocol - -internal fun MaskingObjectInterface.asMapCore(): MCMaskingObjectInterfaceProtocol? = - nativeHandle as? MCMaskingObjectInterfaceProtocol - -internal fun ErrorManager.asMapCore(): MCErrorManager? = - nativeHandle as? MCErrorManager - -internal fun CameraInterface.asMapCore(): MCCameraInterfaceProtocol? = - nativeHandle as? MCCameraInterfaceProtocol + internal fun asMapCore(): MCCameraInterfaceProtocol? = + nativeHandle as? MCCameraInterfaceProtocol +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt index e9057e5fd..4a92d8a4c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt @@ -14,6 +14,9 @@ actual open class MapInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val map = nativeHandle as? MCMapInterface + internal fun asMapCore(): MCMapInterface? = + nativeHandle as? MCMapInterface + actual companion object { actual fun create( graphicsFactory: GraphicsObjectFactoryInterface, @@ -178,9 +181,6 @@ actual open class MapInterface actual constructor(nativeHandle: Any?) { } } -internal fun MapInterface.asMapCore(): MCMapInterface? = - nativeHandle as? MCMapInterface - private class MapCallbackInterfaceProxy( private val handler: MapCallbackInterface, ) : NSObject(), MCMapCallbackInterfaceProtocol { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt index f5b42b248..18243138a 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt @@ -6,9 +6,6 @@ import MapCoreSharedModule.MCVec2F as MapCoreVec2F import MapCoreSharedModule.MCVec2I as MapCoreVec2I import MapCoreSharedModule.MCVec3D as MapCoreVec3D import MapCoreSharedModule.MCRectI as MapCoreRectI -import MapCoreSharedModule.MCCameraInterpolation as MapCoreCameraInterpolation -import MapCoreSharedModule.MCCameraInterpolationValue as MapCoreCameraInterpolationValue -import MapCoreSharedModule.MCCamera3dConfig as MapCoreCamera3dConfig import MapCoreSharedModule.MCTiled2dMapZoomInfo as MapCoreTiled2dMapZoomInfo actual typealias Vec2F = MapCoreVec2F @@ -17,7 +14,4 @@ actual typealias Vec3D = MapCoreVec3D actual typealias RectI = MapCoreRectI actual typealias MapConfig = MapCoreMapConfig actual typealias MapCoordinateSystem = MapCoreMapCoordinateSystem -actual typealias CameraInterpolation = MapCoreCameraInterpolation -actual typealias CameraInterpolationValue = MapCoreCameraInterpolationValue -actual typealias Camera3dConfig = MapCoreCamera3dConfig actual typealias Tiled2dMapZoomInfo = MapCoreTiled2dMapZoomInfo diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt index 133996cc5..ba93843da 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -3,7 +3,7 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface import platform.Foundation.NSNumber -actual class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { +actual open class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle internal fun asMapCore(): MCTiled2dMapVectorLayerInterface? = From 149107a95ae55724506be0008ee7f38f3c6ff8e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 17:40:45 +0100 Subject: [PATCH 33/63] fix: kmp ios camera listener signatures --- .../kmp/core/feature/map/interop/Camera3dConfigIos.kt | 6 +++++- .../map/interop/MapCameraInterfaceImplementation.kt | 9 ++++----- .../kmp/core/feature/map/interop/MapCoreTypesIos.kt | 6 +++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt index d5ecb37c8..f1e66819d 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt @@ -49,7 +49,11 @@ internal fun CameraInterpolationValueFromMapCore(value: MCCameraInterpolationVal CameraInterpolationValue(stop = value.stop, value = value.value) internal fun CameraInterpolationFromMapCore(value: MCCameraInterpolation): CameraInterpolation = - CameraInterpolation(stops = value.stops.map { CameraInterpolationValueFromMapCore(it) }) + CameraInterpolation( + stops = value.stops + .mapNotNull { it as? MCCameraInterpolationValue } + .map { CameraInterpolationValueFromMapCore(it) }, + ) internal fun Camera3dConfig.asMapCore(): MCCamera3dConfig = MCCamera3dConfig.camera3dConfigWithKey( diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt index 8223711dc..15026a78e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt @@ -3,7 +3,6 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import MapCoreSharedModule.MCMapCamera3dInterface import MapCoreSharedModule.MCMapCameraInterface import MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol -import platform.Foundation.NSArray import platform.Foundation.NSNumber import platform.darwin.NSObject @@ -183,15 +182,15 @@ private class MapCameraListenerProxy( } override fun onCameraChange( - viewMatrix: NSArray, - projectionMatrix: NSArray, - origin: Vec3D, + viewMatrix: List<*>, + projectionMatrix: List<*>, + origin: MapCoreSharedModule.MCVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, - focusPointPosition: Coord, + focusPointPosition: MapCoreSharedModule.MCCoord, zoom: Float, ) { val view = viewMatrix.mapNotNull { (it as? NSNumber)?.floatValue } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt index f51172706..1620f9875 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt @@ -12,7 +12,7 @@ import MapCoreSharedModule.MCRenderingContextInterfaceProtocol import MapCoreSharedModule.MCSchedulerInterfaceProtocol import MapCoreSharedModule.MCShaderFactoryInterfaceProtocol import MapCoreSharedModule.MCTouchHandlerInterfaceProtocol -import MapCoreSharedModule.MCCoordinateConversionHelperInterfaceProtocol +import MapCoreSharedModule.MCCoordinateConversionHelperInterface actual open class GraphicsObjectFactoryInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle @@ -59,8 +59,8 @@ actual open class PerformanceLoggerInterface actual constructor(nativeHandle: An actual open class CoordinateConversionHelperInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle - internal fun asMapCore(): MCCoordinateConversionHelperInterfaceProtocol? = - nativeHandle as? MCCoordinateConversionHelperInterfaceProtocol + internal fun asMapCore(): MCCoordinateConversionHelperInterface? = + nativeHandle as? MCCoordinateConversionHelperInterface } actual open class RenderTargetInterface actual constructor(nativeHandle: Any?) { From 1a747dc90ed53510290c5ad4aa584abf14b76cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 17:45:11 +0100 Subject: [PATCH 34/63] chore: clean ios warnings --- .../mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt | 2 +- .../core/feature/map/interop/MapVectorLayerImplementation.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt index f1e66819d..a5f30a5bb 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt @@ -72,7 +72,7 @@ internal fun Camera3dConfigFromMapCore(value: MCCamera3dConfig): Camera3dConfig key = value.key, allowUserInteraction = value.allowUserInteraction, rotationSpeed = value.rotationSpeed?.floatValue, - animationDurationMs = value.animationDurationMs.toInt(), + animationDurationMs = value.animationDurationMs, minZoom = value.minZoom, maxZoom = value.maxZoom, pitchInterpolationValues = CameraInterpolationFromMapCore(value.pitchInterpolationValues), diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt index 6fc12e221..38ab557ae 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -27,7 +27,7 @@ actual class MapVectorLayer actual constructor(nativeHandle: Any?) : LayerInterf private fun MapVectorLayerFeatureInfoValue.asMapCore(): MCVectorLayerFeatureInfoValue { val floatList = listFloatVal?.map { NSNumber(float = it) } - val stringList = listStringVal?.map { it as String } + val stringList = listStringVal?.map { it } return MCVectorLayerFeatureInfoValue( stringVal = stringVal, doubleVal = doubleVal?.let { NSNumber(double = it) }, From 88623d05db295c9ca919804d6bba661ff49448b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 17:55:02 +0100 Subject: [PATCH 35/63] fix: publish android variants for kmp --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index 21e705874..1d257d5da 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -51,6 +51,7 @@ kotlin { compilerOptions { jvmTarget.set(JvmTarget.JVM_17) } + publishLibraryVariants("debug", "release") namespace = "io.openmobilemaps.mapscore.kmp" compileSdk = 36 minSdk = 28 From f713d7e966039d46fc133de5eef0b4351a499cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 17:56:29 +0100 Subject: [PATCH 36/63] fix: publish android variants with androidTarget --- build.gradle.kts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1d257d5da..29dd5c575 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,14 +47,11 @@ kotlin { applyDefaultHierarchyTemplate() - android { + androidTarget { compilerOptions { jvmTarget.set(JvmTarget.JVM_17) } publishLibraryVariants("debug", "release") - namespace = "io.openmobilemaps.mapscore.kmp" - compileSdk = 36 - minSdk = 28 } val mapCoreCinteropName = "MapCoreKmp" @@ -101,6 +98,12 @@ kotlin { } } +android { + namespace = "io.openmobilemaps.mapscore.kmp" + compileSdk = 36 + minSdk = 28 +} + swiftPackageConfig { create("MapCoreKmp") { minIos = "14.0" From 9caebb2906749f5ac4daa2ebdd1e9ca8f73fac89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 18:04:06 +0100 Subject: [PATCH 37/63] fix: use com.android.library for kmp android --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 29dd5c575..36bc15fff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,7 +35,7 @@ val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARG plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" - id("com.android.kotlin.multiplatform.library") version "8.13.2" + id("com.android.library") version "8.13.2" id("io.github.frankois944.spmForKmp") version "1.4.6" } From 0c35b88c33a04f77b7d94c9fa27ae28b2335bfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 18:06:26 +0100 Subject: [PATCH 38/63] fix: suppress androidTarget deprecation and set minSdk --- build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 36bc15fff..f4baac6b7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + import org.gradle.api.DefaultTask import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.DirectoryProperty @@ -101,7 +103,9 @@ kotlin { android { namespace = "io.openmobilemaps.mapscore.kmp" compileSdk = 36 - minSdk = 28 + defaultConfig { + minSdk = 28 + } } swiftPackageConfig { From 9938df1b24833c029ce1bf9946243d27be339d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 18:31:49 +0100 Subject: [PATCH 39/63] chore: apply maven-publish for kmp --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index f4baac6b7..e4adb2ced 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -38,6 +38,7 @@ val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARG plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" id("com.android.library") version "8.13.2" + id("maven-publish") id("io.github.frankois944.spmForKmp") version "1.4.6" } From 8236e78127f8438be1ac8c01dc4a0d271de68094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 18:50:46 +0100 Subject: [PATCH 40/63] chore: align agp to 8.12.0 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index e4adb2ced..891aee6ac 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,7 +37,7 @@ val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARG plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" - id("com.android.library") version "8.13.2" + id("com.android.library") version "8.12.0" id("maven-publish") id("io.github.frankois944.spmForKmp") version "1.4.6" } From e7dedf924acd8d24b3bcbc0ba1fa48c1a513fc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 19:43:33 +0100 Subject: [PATCH 41/63] fix: android camera config wrappers --- .../map/interop/Camera3dConfigAndroid.kt | 75 +++++++++++++++++++ .../interop/LayerInterfaceImplementation.kt | 6 +- .../MapCameraInterfaceImplementation.kt | 13 +++- .../map/interop/MapCoreTypesAndroid.kt | 2 +- .../feature/map/interop/RecordTypealiases.kt | 6 -- .../interop/Tiled2dMapVectorLayerInterface.kt | 2 +- 6 files changed, 90 insertions(+), 14 deletions(-) create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt new file mode 100644 index 000000000..4c9ca077b --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt @@ -0,0 +1,75 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.Camera3dConfig as MapscoreCamera3dConfig +import io.openmobilemaps.mapscore.shared.map.CameraInterpolation as MapscoreCameraInterpolation +import io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue as MapscoreCameraInterpolationValue + +actual class CameraInterpolationValue actual constructor( + stop: Float, + value: Float, +) { + actual val stop: Float = stop + actual val value: Float = value +} + +actual class CameraInterpolation actual constructor( + stops: List, +) { + actual val stops: List = stops +} + +actual class Camera3dConfig actual constructor( + key: String, + allowUserInteraction: Boolean, + rotationSpeed: Float?, + animationDurationMs: Int, + minZoom: Float, + maxZoom: Float, + pitchInterpolationValues: CameraInterpolation, + verticalDisplacementInterpolationValues: CameraInterpolation, +) { + actual val key: String = key + actual val allowUserInteraction: Boolean = allowUserInteraction + actual val rotationSpeed: Float? = rotationSpeed + actual val animationDurationMs: Int = animationDurationMs + actual val minZoom: Float = minZoom + actual val maxZoom: Float = maxZoom + actual val pitchInterpolationValues: CameraInterpolation = pitchInterpolationValues + actual val verticalDisplacementInterpolationValues: CameraInterpolation = verticalDisplacementInterpolationValues +} + +internal fun CameraInterpolationValue.asMapscore(): MapscoreCameraInterpolationValue = + MapscoreCameraInterpolationValue(stop = stop, value = value) + +internal fun CameraInterpolation.asMapscore(): MapscoreCameraInterpolation = + MapscoreCameraInterpolation(ArrayList(stops.map { it.asMapscore() })) + +internal fun CameraInterpolationValueFromMapscore(value: MapscoreCameraInterpolationValue): CameraInterpolationValue = + CameraInterpolationValue(stop = value.stop, value = value.value) + +internal fun CameraInterpolationFromMapscore(value: MapscoreCameraInterpolation): CameraInterpolation = + CameraInterpolation(stops = value.stops.map { CameraInterpolationValueFromMapscore(it) }) + +internal fun Camera3dConfig.asMapscore(): MapscoreCamera3dConfig = + MapscoreCamera3dConfig( + key = key, + allowUserInteraction = allowUserInteraction, + rotationSpeed = rotationSpeed, + animationDurationMs = animationDurationMs, + minZoom = minZoom, + maxZoom = maxZoom, + pitchInterpolationValues = pitchInterpolationValues.asMapscore(), + verticalDisplacementInterpolationValues = verticalDisplacementInterpolationValues.asMapscore(), + ) + +internal fun Camera3dConfigFromMapscore(value: MapscoreCamera3dConfig): Camera3dConfig = + Camera3dConfig( + key = value.key, + allowUserInteraction = value.allowUserInteraction, + rotationSpeed = value.rotationSpeed, + animationDurationMs = value.animationDurationMs, + minZoom = value.minZoom, + maxZoom = value.maxZoom, + pitchInterpolationValues = CameraInterpolationFromMapscore(value.pitchInterpolationValues), + verticalDisplacementInterpolationValues = CameraInterpolationFromMapscore(value.verticalDisplacementInterpolationValues), + ) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt index c2a0f082b..fb2d8cba5 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt @@ -28,7 +28,8 @@ actual open class LayerInterface actual constructor(nativeHandle: Any?) { } actual fun onAdded(mapInterface: MapInterface, layerIndex: Int) { - layer?.onAdded(mapInterface.asMapscore(), layerIndex) + val typedMap = requireNotNull(mapInterface.asMapscore()) + layer?.onAdded(typedMap, layerIndex) } actual fun onRemoved() { @@ -69,7 +70,8 @@ actual open class LayerInterface actual constructor(nativeHandle: Any?) { } actual fun setErrorManager(errorManager: ErrorManager) { - layer?.setErrorManager(errorManager.asMapscore()) + val typedErrorManager = requireNotNull(errorManager.asMapscore()) + layer?.setErrorManager(typedErrorManager) } actual fun forceReload() { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt index f8e62f469..41770e6f9 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt @@ -205,7 +205,8 @@ actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { protected actual val nativeHandle: Any? = nativeHandle private val camera3d = nativeHandle as? MapscoreMapCamera3dInterface - actual fun getCameraConfig(): Camera3dConfig = requireNotNull(camera3d?.getCameraConfig()) + actual fun getCameraConfig(): Camera3dConfig = + Camera3dConfigFromMapscore(requireNotNull(camera3d?.getCameraConfig())) actual fun setCameraConfig( config: Camera3dConfig, @@ -213,7 +214,7 @@ actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { targetZoom: Float?, targetCoordinate: Coord?, ) { - camera3d?.setCameraConfig(config, durationSeconds, targetZoom, targetCoordinate) + camera3d?.setCameraConfig(config.asMapscore(), durationSeconds, targetZoom, targetCoordinate) } } @@ -222,9 +223,13 @@ actual open class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { actual companion object { actual fun getBasicConfig(): Camera3dConfig = - io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getBasicConfig() + Camera3dConfigFromMapscore( + io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getBasicConfig(), + ) actual fun getRestorConfig(): Camera3dConfig = - io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getRestorConfig() + Camera3dConfigFromMapscore( + io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getRestorConfig(), + ) } } diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt index cb525a0f0..68afef11c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt @@ -2,7 +2,7 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import io.openmobilemaps.mapscore.shared.graphics.CameraInterface as MapscoreCameraInterface import io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface as MapscoreComputePassInterface -import io.openmobilemaps.mapscore.shared.graphics.MaskingObjectInterface as MapscoreMaskingObjectInterface +import io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface as MapscoreMaskingObjectInterface import io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface as MapscoreRenderPassInterface import io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface as MapscoreRenderTargetInterface import io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface as MapscoreRenderingContextInterface diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt index c100da149..ae437a9be 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt @@ -6,9 +6,6 @@ import io.openmobilemaps.mapscore.shared.graphics.common.Vec3D as MapscoreVec3D import io.openmobilemaps.mapscore.shared.graphics.common.RectI as MapscoreRectI import io.openmobilemaps.mapscore.shared.map.MapConfig as MapscoreMapConfig import io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem as MapscoreMapCoordinateSystem -import io.openmobilemaps.mapscore.shared.map.CameraInterpolation as MapscoreCameraInterpolation -import io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue as MapscoreCameraInterpolationValue -import io.openmobilemaps.mapscore.shared.map.Camera3dConfig as MapscoreCamera3dConfig import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo as MapscoreTiled2dMapZoomInfo actual typealias Vec2F = MapscoreVec2F @@ -17,7 +14,4 @@ actual typealias Vec3D = MapscoreVec3D actual typealias RectI = MapscoreRectI actual typealias MapConfig = MapscoreMapConfig actual typealias MapCoordinateSystem = MapscoreMapCoordinateSystem -actual typealias CameraInterpolation = MapscoreCameraInterpolation -actual typealias CameraInterpolationValue = MapscoreCameraInterpolationValue -actual typealias Camera3dConfig = MapscoreCamera3dConfig actual typealias Tiled2dMapZoomInfo = MapscoreTiled2dMapZoomInfo diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt index 691594a6a..505230593 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -24,7 +24,7 @@ actual open class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle val typedLoaders = ArrayList(loaders.size).apply { loaders.forEach { add(requireNotNull(it.asMapscore())) } } - val typedFontLoader = fontLoader?.asMapscore() + val typedFontLoader = fontLoader?.asMapscore() ?: return null val typedLocalDataProvider = localDataProvider?.asMapscore() val typedZoomInfo = customZoomInfo val typedSymbolDelegate = symbolDelegate?.asMapscore() From 1bf04fdc868cb4bddb1a4599af9da120338552e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Sat, 31 Jan 2026 19:45:58 +0100 Subject: [PATCH 42/63] fix: expose gps layer impl and clean warning --- .../kmp/core/feature/map/interop/MapGpsLayerImplementation.kt | 2 +- .../core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt index f1b83afe6..d311cd4ab 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -17,7 +17,7 @@ actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : Layer actual abstract fun lastLocation(): Coord? } -internal class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { +class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { private val handle = gpsHandle private val gpsLayer = handle?.layer private val locationProvider = handle?.locationProvider diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt index 505230593..3872a20e1 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt @@ -40,7 +40,7 @@ actual open class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle symbolDelegate = typedSymbolDelegate, sourceUrlParams = typedSourceUrlParams, ) - return layer?.let { Tiled2dMapVectorLayerInterface(it) } + return Tiled2dMapVectorLayerInterface(layer) } } } From c3fdd241dfd089713b92a31eb4705eb462c0cb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Mon, 2 Feb 2026 22:25:05 +0100 Subject: [PATCH 43/63] better kmp setup --- Package.swift | 1 + build.gradle.kts | 151 +++++-- ios/graphics/Helpers/ViewportState.swift | 1 + ios/objc/MCMapViewObjC.m | 2 - .../interop/MapVectorLayerImplementation.kt | 2 + .../MapVectorLayerLocalDataProviderFactory.kt | 20 + .../feature/map/interop/MapVectorLayer.kt | 1 + .../MapVectorLayerLocalDataProviderFactory.kt | 10 + .../map/interop/MapFactoryImplementation.kt | 2 +- .../map/interop/MapGpsLayerImplementation.kt | 13 +- .../interop/MapVectorLayerImplementation.kt | 2 + .../MapVectorLayerLocalDataProviderFactory.kt | 14 + .../frankois944/spmForKmp/SpmForKmpPlugin.kt | 190 +++++++++ .../PackageRootDefinitionExtension.kt | 374 ++++++++++++++++++ .../CompileSwiftPackageTask.kt | 222 +++++++++++ .../compileSwiftPackage/ConfigureTask.kt | 52 +++ 16 files changed, 1019 insertions(+), 38 deletions(-) create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt create mode 100644 src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt create mode 100644 src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt create mode 100644 src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt create mode 100644 src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt diff --git a/Package.swift b/Package.swift index 9a8e3729d..05aea6963 100644 --- a/Package.swift +++ b/Package.swift @@ -147,6 +147,7 @@ let package = Package( cxxSettings: [ .headerSearchPath("public"), .headerSearchPath("src"), + .headerSearchPath("../external/djinni/support-lib/objc"), .headerSearchPath("src/external/pugixml"), .headerSearchPath("src/external/gpc"), .headerSearchPath("src/logger"), diff --git a/build.gradle.kts b/build.gradle.kts index 891aee6ac..7e38a381b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,8 @@ @file:Suppress("DEPRECATION") +@file:OptIn(ExperimentalSpmForKmpFeature::class) +import io.github.frankois944.spmForKmp.swiftPackageConfig +import io.github.frankois944.spmForKmp.utils.ExperimentalSpmForKmpFeature import org.gradle.api.DefaultTask import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.DirectoryProperty @@ -17,6 +20,8 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinAndroidTarget import org.jetbrains.kotlin.gradle.tasks.CInteropProcess import java.net.URI +import java.nio.file.FileSystems +import java.nio.file.Files import javax.inject.Inject group = "io.openmobilemaps.mapscore" @@ -34,6 +39,10 @@ val mapCoreMetalTargetSimulator = providers.environmentVariable("MAPCORE_METAL_T val mapCoreMetalTargetDevice = providers.environmentVariable("MAPCORE_METAL_TARGET_DEVICE") .orElse(providers.gradleProperty("mapCoreMetalTargetDevice")) .orElse("air64-apple-ios26.0") +val mapCoreSpmBuildType = (project.findProperty("KOTLIN_FRAMEWORK_BUILD_TYPE") as? String) + ?.lowercase() + ?.takeIf { it == "debug" || it == "release" } + ?: "release" plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" @@ -64,11 +73,39 @@ kotlin { ) iosTargets.forEach { iosTarget -> + iosTarget.binaries.framework { + isStatic = true + } iosTarget.compilations { val main by getting { cinterops.create(mapCoreCinteropName) } } + iosTarget.swiftPackageConfig(cinteropName = mapCoreCinteropName) { + minIos = "14.0" + debug = mapCoreSpmBuildType == "debug" + bridgeSettings { + cSetting { + headerSearchPath = listOf("Sources/djinni-objc") + } + } + dependency { + localPackage( + mapCoreCheckoutPath, + "maps-core" + ) { + add("MapCoreObjC", exportToKotlin = true) + add("MapCoreSharedModule", exportToKotlin = true) + } + remotePackageVersion( + url = URI("https://github.com/openmobilemaps/layer-gps"), + packageName = "layer-gps", + version = "3.6.0", + ) { + add("LayerGpsSharedModule", exportToKotlin = true) + } + } + } } sourceSets { @@ -109,32 +146,7 @@ android { } } -swiftPackageConfig { - create("MapCoreKmp") { - minIos = "14.0" - bridgeSettings { - cSetting { - headerSearchPath = listOf("Sources/djinni-objc") - } - } - dependency { - localPackage( - mapCoreCheckoutPath, - "maps-core" - ) { - add("MapCoreObjC", exportToKotlin = true) - add("MapCoreSharedModule", exportToKotlin = true) - } - remotePackageVersion( - url = URI("https://github.com/openmobilemaps/layer-gps"), - packageName = "layer-gps", - version = "3.6.0", - ) { - add("LayerGpsSharedModule", exportToKotlin = true) - } - } - } -} + // Avoid overlapping Package.resolved outputs between per-target SwiftPM compile tasks. tasks @@ -168,20 +180,95 @@ tasks } tasks.withType().configureEach { - if (name.contains("MapCoreKmp")) { + if (name.contains("MapCore") || name.contains("LayerGpsSharedModule")) { settings.compilerOpts("-I$mapCoreCheckoutPath/external/djinni/support-lib/objc") settings.compilerOpts("-I$mapCoreCheckoutPath/bridging/ios") } } +fun stripStaticLibrariesFromText(file: File) { + val lines = file.readLines() + val filtered = lines.filterNot { it.startsWith("staticLibraries=") } + if (filtered != lines) { + file.writeText(filtered.joinToString("\n") + "\n") + } +} + +fun stripStaticLibrariesFromKlib(klibFile: File) { + if (!klibFile.exists()) return + val uri = URI.create("jar:${klibFile.toURI()}") + FileSystems.newFileSystem(uri, mapOf("create" to "false")).use { fs -> + val manifestPath = fs.getPath("default/manifest") + if (!Files.exists(manifestPath)) return@use + val lines = Files.readAllLines(manifestPath) + val filtered = lines.filterNot { it.startsWith("staticLibraries=") } + if (filtered != lines) { + Files.write(manifestPath, filtered) + } + } +} + +val stripMapCoreLinkerOpts = tasks.register("stripMapCoreLinkerOpts") { + doLast { + val defRoot = layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/defFiles").get().asFile + if (!defRoot.exists()) return@doLast + defRoot + .walkTopDown() + .filter { it.isFile } + .filter { + it.name == "MapCoreObjC.def" || + it.name == "MapCoreSharedModule.def" || + it.name == "MapCoreKmp_bridge.def" + } + .forEach { defFile -> + val lines = defFile.readLines() + val filtered = lines.filterNot { + it.startsWith("linkerOpts") || it.startsWith("staticLibraries") + } + if (filtered != lines) { + defFile.writeText(filtered.joinToString("\n") + "\n") + } + } + } +} + +tasks.withType().configureEach { + if (name.contains("MapCoreObjC") || name.contains("MapCoreSharedModule") || name.contains("MapCoreKmp")) { + dependsOn(stripMapCoreLinkerOpts) + } +} + +tasks.withType().configureEach { + if (!name.contains("MapCoreKmp")) return@configureEach + doLast { + val buildDirFile = project.layout.buildDirectory.asFile.get() + buildDirFile + .walkTopDown() + .filter { it.isFile && it.name.endsWith("MapCoreKmpMain.klib") } + .forEach { stripStaticLibrariesFromKlib(it) } + + buildDirFile + .walkTopDown() + .filter { it.isFile && it.name == "manifest.properties" } + .filter { it.readText().contains("staticLibraries=libMapCoreKmp.a") } + .forEach { stripStaticLibrariesFromText(it) } + } +} + +tasks.matching { + it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateCInteropDefinition") +}.configureEach { + finalizedBy(stripMapCoreLinkerOpts) +} + val mapCoreSpmBuiltDir = - project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64 x86_64-apple-ios-simulator/release").get().asFile + project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64 x86_64-apple-ios-simulator/$mapCoreSpmBuildType").get().asFile mapCoreSpmBuiltDir.mkdirs() val mapCoreSpmDeviceDir = - project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios/release") + project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios/$mapCoreSpmBuildType") val mapCoreSpmSimulatorDir = - project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios-simulator/release") + project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios-simulator/$mapCoreSpmBuildType") afterEvaluate { val deviceTaskName = "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64" @@ -313,7 +400,7 @@ val compileMapCoreMetallibIosSimulator = tasks.register( targetTriple.set(mapCoreMetalTargetDevice) bundleDir.set( project.layout.buildDirectory - .dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios/release/MapCore_MapCore.bundle"), + .dir("spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios/$mapCoreSpmBuildType/MapCore_MapCore.bundle"), ) outputDir.set(project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/metal/iphoneos")) metalSources.from(bundleDir.map { it.asFileTree.matching { include("**/*.metal") } }) diff --git a/ios/graphics/Helpers/ViewportState.swift b/ios/graphics/Helpers/ViewportState.swift index e07a4eae9..e87212781 100644 --- a/ios/graphics/Helpers/ViewportState.swift +++ b/ios/graphics/Helpers/ViewportState.swift @@ -11,6 +11,7 @@ import Atomics final class ViewportState { + private let packedViewport = ManagedAtomic(0) // MARK: - Writing diff --git a/ios/objc/MCMapViewObjC.m b/ios/objc/MCMapViewObjC.m index f45e5d5c2..7f1f456f9 100644 --- a/ios/objc/MCMapViewObjC.m +++ b/ios/objc/MCMapViewObjC.m @@ -3,8 +3,6 @@ @import MapCore; @import MapCoreSharedModule; -#import "MapCore-Swift.h" - @interface MCMapViewObjC () @property (nonatomic, strong) MCMapView *mapViewInternal; @end diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt index d4eadd8ec..9d7e562a9 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -11,6 +11,8 @@ actual class MapVectorLayer actual constructor(nativeHandle: Any?) : LayerInterf ) { private val layer = nativeHandle as? MapscoreVectorLayer + actual constructor(layerInterface: Tiled2dMapVectorLayerInterface) : this(layerInterface.asMapscore()) + actual fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) { val proxy = delegate?.let { MapVectorLayerSelectionCallbackProxy(it) } layer?.setSelectionDelegate(proxy) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt new file mode 100644 index 000000000..c4e0c2410 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt @@ -0,0 +1,20 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlinx.coroutines.CoroutineScope + +actual object MapVectorLayerLocalDataProviderFactory { + actual fun create( + dataProvider: MapDataProviderProtocol, + coroutineScope: CoroutineScope?, + ): Tiled2dMapVectorLayerLocalDataProviderInterface { + val scope = requireNotNull(coroutineScope) { + "CoroutineScope required for Android vector layer data provider" + } + return Tiled2dMapVectorLayerLocalDataProviderInterface( + MapDataProviderLocalDataProviderImplementation( + dataProvider = dataProvider, + coroutineScope = scope, + ), + ) + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt index ec991ba2e..de5af5934 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt @@ -1,6 +1,7 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop expect class MapVectorLayer constructor(nativeHandle: Any? = null) : LayerInterface { + constructor(layerInterface: Tiled2dMapVectorLayerInterface) fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) fun setGlobalState(state: Map) } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt new file mode 100644 index 000000000..9243c4b3b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt @@ -0,0 +1,10 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlinx.coroutines.CoroutineScope + +expect object MapVectorLayerLocalDataProviderFactory { + fun create( + dataProvider: MapDataProviderProtocol, + coroutineScope: CoroutineScope? = null, + ): Tiled2dMapVectorLayerLocalDataProviderInterface +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index 288aa6ce7..62a4d9752 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -110,7 +110,7 @@ private class MapFactoryImpl( } override fun createGpsLayer(): MapGpsLayer? { - return MapGpsLayerImpl(null) + return MapGpsLayerImpl.create() } } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt index be46633d5..66910505d 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -32,9 +32,9 @@ actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : Layer actual abstract fun lastLocation(): Coord? } -class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { - private val gpsLayer: MCGpsLayerInterface = - requireNotNull(MCGpsLayerInterface.create(styleInfo = defaultStyle())) +class MapGpsLayerImpl private constructor( + private val gpsLayer: MCGpsLayerInterface, +) : MapGpsLayer(gpsLayer) { private val locationManager = CLLocationManager() private val locationDelegate = GpsLocationDelegate(this) private val callbackHandler = GpsLayerCallbackHandler(this) @@ -95,6 +95,13 @@ class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { } private fun shouldDrawHeading(): Boolean = true + + companion object { + fun create(): MapGpsLayerImpl? { + val layer = MCGpsLayerInterface.create(styleInfo = defaultStyle()) ?: return null + return MapGpsLayerImpl(layer) + } + } } private class GpsLayerCallbackHandler( diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt index 38ab557ae..d0aa79ae3 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt @@ -9,6 +9,8 @@ actual class MapVectorLayer actual constructor(nativeHandle: Any?) : LayerInterf ) { private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface + actual constructor(layerInterface: Tiled2dMapVectorLayerInterface) : this(layerInterface.asMapCore()) + actual fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) { val proxy = delegate?.let { MapVectorLayerSelectionCallbackProxy(it) } layer?.setSelectionDelegate(proxy) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt new file mode 100644 index 000000000..b9ac7bff2 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt @@ -0,0 +1,14 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import kotlinx.coroutines.CoroutineScope + +actual object MapVectorLayerLocalDataProviderFactory { + actual fun create( + dataProvider: MapDataProviderProtocol, + coroutineScope: CoroutineScope?, + ): Tiled2dMapVectorLayerLocalDataProviderInterface { + return Tiled2dMapVectorLayerLocalDataProviderInterface( + MapDataProviderLocalDataProviderImplementation(dataProvider), + ) + } +} diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt new file mode 100644 index 000000000..9793d0c3b --- /dev/null +++ b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt @@ -0,0 +1,190 @@ +@file:OptIn(ExperimentalStdlibApi::class) + +package io.github.frankois944.spmForKmp + +import io.github.frankois944.spmForKmp.config.AppleCompileTarget +import io.github.frankois944.spmForKmp.config.PackageDirectoriesConfig +import io.github.frankois944.spmForKmp.definition.PackageRootDefinitionExtension +import io.github.frankois944.spmForKmp.tasks.checkExistCInteropTask +import io.github.frankois944.spmForKmp.tasks.configAppleTargets +import io.github.frankois944.spmForKmp.tasks.createCInteropTask +import io.github.frankois944.spmForKmp.utils.StartingFile +import io.github.frankois944.spmForKmp.utils.getAndCreateFakeDefinitionFile +import org.gradle.api.GradleException +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.Task +import org.gradle.api.reflect.TypeOf +import org.gradle.internal.extensions.stdlib.capitalized +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget +import org.jetbrains.kotlin.gradle.tasks.CInteropProcess +import org.jetbrains.kotlin.konan.target.HostManager +import java.io.File +import kotlin.reflect.javaType +import kotlin.reflect.typeOf + +internal const val PLUGIN_NAME: String = "swiftPackageConfig" +internal const val SWIFT_PACKAGE_NAME = "Package.swift" +internal const val SWIFT_PACKAGE_RESOLVE_NAME = "Package.resolved" +internal const val TASK_GENERATE_MANIFEST: String = "generateSwiftPackage" +internal const val TASK_COMPILE_PACKAGE: String = "compileSwiftPackage" +internal const val TASK_GENERATE_CINTEROP_DEF: String = "generateCInteropDefinition" +internal const val TASK_GENERATE_EXPORTABLE_PACKAGE: String = "generateExportableSwiftPackage" +internal const val TASK_GENERATE_REGISTRY_FILE: String = "generateRegistryFilePackage" +internal const val TASK_COPY_PACKAGE_RESOURCES: String = "CopyPackageResources" +internal const val SPM_TRACE_NAME: String = "spmForKmpTrace" + +@Suppress("UnnecessaryAbstractClass") +public abstract class SpmForKmpPlugin : Plugin { + @Suppress("LongMethod") + override fun apply(target: Project): Unit = + with(target) { + val swiftPackageEntries: NamedDomainObjectContainer = + objects.domainObjectContainer(PackageRootDefinitionExtension::class.java) { name -> + objects.newInstance(PackageRootDefinitionExtension::class.java, name) + } + + val type = + TypeOf.typeOf>( + typeOf>().javaType, + ) + + extensions.add(type, PLUGIN_NAME, swiftPackageEntries) + + afterEvaluate { + // Contains the group of task (with their dependency) by target + val taskGroup = mutableMapOf() + // Contains the cinterop .def file linked with the task name + val cInteropTaskNamesWithDefFile = mutableMapOf() + val entries = swiftPackageEntries + project.swiftContainer() + createMissingCinteropTask(entries) + mergeEntries(entries).forEach { swiftPackageEntry -> + val spmWorkingDir = + resolveAndCreateDir( + File(swiftPackageEntry.spmWorkingPath), + "spmKmpPlugin", + swiftPackageEntry.internalName, + ) + + val packageScratchDir = resolveAndCreateDir(spmWorkingDir, "scratch") + val sharedCacheDir = swiftPackageEntry.sharedCachePath?.let { resolveAndCreateDir(File(it)) } + val sharedConfigDir = swiftPackageEntry.sharedConfigPath?.let { resolveAndCreateDir(File(it)) } + val sharedSecurityDir = swiftPackageEntry.sharedSecurityPath?.let { resolveAndCreateDir(File(it)) } + val bridgeSourceDir = + resolveAndCreateDir( + File(swiftPackageEntry.customPackageSourcePath), + swiftPackageEntry.internalName, + ) + + StartingFile.createStartingFileIfNeeded(bridgeSourceDir) + + tasks + .withType(CInteropProcess::class.java) + .forEach { + logger.debug("CInteropProcess task found: {}", it) + } + + configAppleTargets( + taskGroup = taskGroup, + cInteropTaskNamesWithDefFile = cInteropTaskNamesWithDefFile, + swiftPackageEntry = swiftPackageEntry, + packageDirectoriesConfig = + PackageDirectoriesConfig( + spmWorkingDir = spmWorkingDir, + packageScratchDir = packageScratchDir, + sharedCacheDir = sharedCacheDir, + sharedConfigDir = sharedConfigDir, + sharedSecurityDir = sharedSecurityDir, + bridgeSourceDir = bridgeSourceDir, + ), + ) + } + + // link the main definition File + tasks.withType(CInteropProcess::class.java).configureEach { cinterop -> + if (HostManager.hostIsMac) { + val cinteropTarget = + AppleCompileTarget.fromKonanTarget(cinterop.konanTarget) + ?: return@configureEach + taskGroup[cinteropTarget]?.let { + cinterop.dependsOn(taskGroup[cinteropTarget]) + cinterop.mustRunAfter(taskGroup[cinteropTarget]) + } ?: run { + // If there is no task, there is something really wrong somewhere. + // the user must make an issue with its configuration + throw GradleException( + """ + spmForKmp failed : + No task found for target ${cinteropTarget.name} + make an issue with your plugin configuration + """.trimIndent(), + ) + } + val definitionFile = cInteropTaskNamesWithDefFile[cinterop.name] + // Note: the definitionFile doesn't exist yet, but we know where it will be. + cinterop.settings.definitionFile.set(definitionFile) + } else { + cinterop.settings.definitionFile.set(getAndCreateFakeDefinitionFile()) + } + } + } + } + + private fun Project.resolvePath(destination: File): File = + if (destination.isAbsolute) { + destination + } else { + layout.projectDirectory.asFile + .resolve(destination) + } + + private fun Project.resolveAndCreateDir( + base: File, + vararg nestedPath: String = emptyArray(), + ): File { + var resolved = resolvePath(base) + nestedPath.forEach { resolved = resolved.resolve(it) } + resolved.mkdirs() + return resolved + } + + private fun Project.createMissingCinteropTask(swiftPackageEntry: Set) { + swiftPackageEntry.forEach { entry -> + if (!entry.useExtension) { + return + } + entry.targetName?.let { targetName -> + val ktTarget = + extensions + .getByType(KotlinMultiplatformExtension::class.java) + .targets + .findByName(targetName) as KotlinNativeTarget + val mainCompilationTarget = ktTarget.compilations.getByName("main") + if (!checkExistCInteropTask(mainCompilationTarget, entry.internalName.capitalized())) { + createCInteropTask( + mainCompilationTarget, + cinteropName = entry.internalName.capitalized(), + file = getAndCreateFakeDefinitionFile(), + ) + } + } + } + } + + private fun mergeEntries(entries: Set): Set { + val mergedEntries = mutableSetOf() + entries.forEach { entry -> + val foundEntry = + mergedEntries + .firstOrNull { mergedEntry -> + mergedEntry.internalName == entry.internalName + } + if (foundEntry == null) { + mergedEntries.add(entry) + } + } + return mergedEntries + } +} diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt new file mode 100644 index 000000000..6add654e9 --- /dev/null +++ b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt @@ -0,0 +1,374 @@ +@file:OptIn(ExperimentalStdlibApi::class) + +package io.github.frankois944.spmForKmp.definition + +import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_IOS_VERSION +import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_MAC_OS_VERSION +import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_TV_OS_VERSION +import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_WATCH_OS_VERSION +import io.github.frankois944.spmForKmp.config.DEFAULT_TOOL_VERSION +import io.github.frankois944.spmForKmp.definition.dependency.Dependency +import io.github.frankois944.spmForKmp.definition.dependency.DependencyConfig +import io.github.frankois944.spmForKmp.definition.exported.ExportedPackage +import io.github.frankois944.spmForKmp.definition.exported.ExportedPackageConfig +import io.github.frankois944.spmForKmp.definition.packageRegistry.auth.PackageRegistryAuth +import io.github.frankois944.spmForKmp.definition.packageSetting.BridgeSettings +import io.github.frankois944.spmForKmp.definition.packageSetting.BridgeSettingsConfig +import org.gradle.api.Project +import java.io.File +import java.net.URI +import javax.inject.Inject +import kotlin.io.path.Path +import kotlin.io.path.pathString + +/** + * Represents a definition extension for a Swift package root within a Kotlin Multiplatform project. + * + * This abstract class provides configuration properties and methods to define a Swift package root during + * project setup. It allows setting up package parameters such as minimum platform versions, toolchains, + * and handling dependencies for Swift packages. + * + * @constructor Initializes the package root definition extension with a name and associated project. + * @param name The name of the package root definition. + * @param project The Gradle project instance associated with this configuration. + */ +@Suppress("UnnecessaryAbstractClass") +public abstract class PackageRootDefinitionExtension + @Inject + constructor( + public val name: String, + project: Project, + ) { + internal var useExtension: Boolean = false + internal var targetName: String? = null + internal var internalName: String = this.name + + /** + * Specifies the custom source path for the Swift package in the Kotlin Multiplatform project. + * + * By default, this path is set to the `src/swift` directory within the project's root directory. + * This property allows defining a different directory for the Swift package source files, + * enabling customized project structure organization. + */ + public var customPackageSourcePath: String = + Path(project.projectDir.path, "src", "swift").pathString + + /** + * Specifies the minimum iOS platform version required for the Swift package integration. + * + * This property determines the deployment target for the iOS platform when building the Swift package + * within the Kotlin Multiplatform project. Modifying this value adjusts the generated build configuration + * and compatibility of the resulting package with iOS devices and emulators. + * + * Default value: [DEFAULT_MIN_IOS_VERSION] + * + * If `null`, the platform is skipped inside the Package manifest. + */ + public var minIos: String? = DEFAULT_MIN_IOS_VERSION + + /** + * Specifies the minimum supported macOS version for the Swift Package Manager (SPM) integration. + * + * This property defines the macOS version targeted by the Swift package and its dependencies. + * Used during the generation of SPM manifests and the compilation of Swift packages to ensure compatibility + * with the specified macOS version. + * + * Default value: [DEFAULT_MIN_MAC_OS_VERSION] + * + * If `null`, the platform is skipped inside the Package manifest. + */ + public var minMacos: String? = DEFAULT_MIN_MAC_OS_VERSION + + /** + * Specifies the minimum required version of tvOS for the Swift package definition. + * + * This property is used to configure the minimum tvOS version that the Swift package + * dependencies and targets must support. + * + * Default value: [DEFAULT_MIN_TV_OS_VERSION] + * + * If `null`, the platform is skipped inside the Package manifest. + */ + public var minTvos: String? = DEFAULT_MIN_TV_OS_VERSION + + /** + * Minimum watchOS version required for the Swift package. + * + * This variable is used to specify the minimum version of watchOS that a Swift package targets + * when building or running tasks involving watchOS-specific code. It ensures compatibility + * with the defined platform version during build processes or runtime configurations. + * + * Default value: [DEFAULT_MIN_WATCH_OS_VERSION] + * + * If `null`, the platform is skipped inside the Package manifest. + */ + public var minWatchos: String? = DEFAULT_MIN_WATCH_OS_VERSION + + /** + * Specifies the version of Swift tools that will be used. + * This version determines the compatibility and features available for the Swift Package Manager. + * + * The `toolsVersion` value impacts the structure of the `Package.swift` manifest file and + * the behavior of the Swift package dependencies during resolution and compilation. + * + * Default value: [DEFAULT_TOOL_VERSION] + */ + public var toolsVersion: String = DEFAULT_TOOL_VERSION + + /** + * Indicates whether the Swift package is built in debug mode. + * + * If set to `true`, the package is being built with debug configuration. This can be useful for + * testing or development purposes where debug symbols and additional information are required. + * + * Note: release build is faster + * + * Default value: `false` + */ + public var debug: Boolean = false + + /** + * Represents a prefix used for resolving conflicts or distinguishing between multiple + * package dependencies within a Kotlin Multiplatform project. + * This variable can be used to customize or uniquely identify package names or references when required. + * + * It is nullable and, when set, the prefix will be applied to all dependencies. + */ + public var packageDependencyPrefix: String? = null + + /** + * Add a custom linker flag when exporting the product to kotlin + */ + public var linkerOpts: List = emptyList() + + /** + * Add a custom compiler flag when exporting the product to kotlin + */ + public var compilerOpts: List = emptyList() + + internal val packageDependenciesConfig: Dependency = Dependency() + + /** + * Adds one or more Swift dependencies to the dependency list. + * + * @param dependencies + * This can include local or remote dependencies in the form of + * Swift packages or binary `xcframework` bundles. + * It supports different dependency models such as local, versioned + * remote, branch-based remote, or commit-based remote dependencies. + */ + public fun dependency(dependencies: DependencyConfig.() -> Unit) { + packageDependenciesConfig.apply(dependencies) + } + + /** + * Represents the file path to the shared cache directory used by the package. + * This path is used for caching purposes to optimize dependency management, + * reducing redundant network calls or disk operations during the build process. + * The cache directory can store downloaded Swift package artifacts or other + * reusable build-related data. + * + * If set to `null`, the default cache location will be used, determined + * by the underlying build tool configuration or environment settings. + */ + public var sharedCachePath: String? = null + + /** + * Represents the file path to the shared configuration directory. + * + * It is optional and can be set to null if no such shared directory is required or uses the default one. + * + */ + public var sharedConfigPath: String? = null + + /** + * Specifies the shared directory path for security-related resources or configurations. + * + * It is optional and can be set to null if no such shared directory is required or uses the default one. + */ + public var sharedSecurityPath: String? = null + + /** + * The path of the directory where working SPM file(s) will be written. + * + * Default : `{buildDirectory}/spmKmpPlugin/` + */ + public var spmWorkingPath: String = + project.layout.buildDirectory.asFile + .get() + .path + + internal var bridgeSettings: BridgeSettingsConfig = BridgeSettings() + + /** + * Configures bridge-level settings by applying the specified configuration options. + * + * This method allows customization of the bridge's build settings by providing + * a configuration block where settings can be defined for compilers (C, C++, Swift) + * and linker options. These settings adjust the behavior of the bridge during the build process. + * + * @param setting A configuration block of type `PackageSettingConfig`. The block allows + * specifying various compiler and linker settings needed for the bridge build. + */ + public fun bridgeSettings(setting: BridgeSettingsConfig.() -> Unit) { + bridgeSettings.apply(setting) + } + + /** + * The path of the Swift command line used to build the bridge + * You can change the version of swift used for building the bridge by setting another binary + * + * Default: uses the command `xcrun --sdk macosx swift` to find the Swift binary + */ + public var swiftBinPath: String? = null + + internal var exportedPackageSettings: ExportedPackage = ExportedPackage() + + /** + * Exported package settings + * + * @param setting + * @receiver + */ + public fun exportedPackageSettings(setting: ExportedPackageConfig.() -> Unit) { + exportedPackageSettings.apply(setting) + } + + /** + * A list of enums that should be generated as Kotlin enums. + * + * Default: emptyList() + * + * [configure-enums-generation](https://kotlinlang.org/docs/native-definition-file.html#configure-enums-generation) + */ + public var strictEnums: List = emptyList() + + /** + * A list of enums that should be generated as integral values. Strict enums + * + * Default: emptyList() + * + * [configure-enums-generation](https://kotlinlang.org/docs/native-definition-file.html#configure-enums-generation) + */ + public var nonStrictEnums: List = emptyList() + + /** + * Wraps exceptions from Objective-C code into Kotlin exceptions with the ForeignException type + * + * Default: null + * + * [handle-objective-c-exceptions](https://kotlinlang.org/docs/native-definition-file.html#handle-objective-c-exceptions) + */ + public var foreignExceptionMode: String? = null + + /** + * Disables the compiler check that doesn't allow calling a non-designated Objective-C initializer as a super() constructor + * + * Default: null + * + * [allow-calling-a-non-designated-initializer](https://kotlinlang.org/docs/native-definition-file.html#allow-calling-a-non-designated-initializer) + */ + @Suppress("MaxLineLength") + public var disableDesignatedInitializerChecks: Boolean? = null + + /** + * Adds a custom message, for example, to help users resolve linker errors + * + * Default : null + * + * [help-resolve-linker-errors](https://kotlinlang.org/docs/native-definition-file.html#help-resolve-linker-errors) + */ + public var userSetupHint: String? = null + + internal val packageRegistryConfigs: MutableList = mutableListOf() + + /** + * Configures a package registry using the specified URL. + * This method adds a new registry configuration to the list of package registry settings. + * + * @param url The URL of the package registry to be added. + */ + public fun registry(url: URI) { + packageRegistryConfigs + .add( + PackageRegistryAuth( + url = url, + ), + ) + } + + /** + * Configures authentication settings for a package registry by associating + * a URL with a username and password. These settings are used to authenticate + * access to the package registry during operations involving Swift package dependencies. + * + * @param url The URL of the package registry. + * @param username The username for authenticating with the registry. + * @param password The password for authenticating with the registry. + */ + public fun registry( + url: URI, + username: String, + password: String, + ) { + require(url.scheme == "https") { + "Package registry URL must use HTTPS scheme when using username/password credential" + } + packageRegistryConfigs + .add( + PackageRegistryAuth( + url = url, + username = username, + password = password, + ), + ) + } + + /** + * Configures authentication settings for a package registry by associating + * a URL with a token. These settings are used to authenticate access + * to the package registry during operations involving Swift package dependencies. + * + * @param url The URL of the package registry. + * @param token The token used for authenticating with the registry. + */ + public fun registry( + url: URI, + token: String, + ) { + require(url.scheme == "https") { + "Package registry URL must use HTTPS scheme when using token authentication" + } + packageRegistryConfigs + .add( + PackageRegistryAuth( + url = url, + token = token, + ), + ) + } + + /** + * Configures authentication settings for a package registry by associating + * a URL with a token file. These settings are used to authenticate access + * to the package registry during operations involving Swift package dependencies. + * + * @param url The URL of the package registry. + * @param tokenFile The file containing the token for authenticating with the registry. + */ + public fun registry( + url: URI, + tokenFile: File, + ) { + require(url.scheme == "https") { + "Package registry URL must use HTTPS scheme when using token file authentication" + } + packageRegistryConfigs + .add( + PackageRegistryAuth( + url = url, + tokenFile = tokenFile, + ), + ) + } + } diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt new file mode 100644 index 000000000..9441f4360 --- /dev/null +++ b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt @@ -0,0 +1,222 @@ +package io.github.frankois944.spmForKmp.tasks.apple.compileSwiftPackage + +import io.github.frankois944.spmForKmp.config.AppleCompileTarget +import io.github.frankois944.spmForKmp.operations.getSDKPath +import io.github.frankois944.spmForKmp.operations.printExecLogs +import io.github.frankois944.spmForKmp.tasks.utils.TaskTracer +import org.gradle.api.DefaultTask +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.Property +import org.gradle.api.tasks.CacheableTask +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.InputDirectory +import org.gradle.api.tasks.InputFile +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional +import org.gradle.api.tasks.OutputDirectories +import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity +import org.gradle.api.tasks.TaskAction +import org.gradle.process.ExecOperations +import org.jetbrains.kotlin.konan.target.HostManager +import java.io.ByteArrayOutputStream +import java.io.File +import java.nio.file.Files +import javax.inject.Inject +import kotlin.io.path.deleteIfExists +import kotlin.io.path.exists + +@CacheableTask +internal abstract class CompileSwiftPackageTask : DefaultTask() { + @get:Internal + abstract val workingDir: Property + + @get:OutputFile + abstract val packageResolveFile: RegularFileProperty + + @get:Input + abstract val cinteropTarget: Property + + @get:InputFile + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val packageSwift: RegularFileProperty + + @get:Input + abstract val debugMode: Property + + @get:Input + abstract val packageScratchDir: Property + + @get:OutputDirectories + abstract val generatedDirs: ListProperty + + @get:Input + @get:Optional + abstract val osVersion: Property + + @get:Input + @get:Optional + abstract val sharedCacheDir: Property + + @get:Input + @get:Optional + abstract val sharedConfigDir: Property + + @get:Input + @get:Optional + abstract val sharedSecurityDir: Property + + @get:Input + @get:Optional + abstract val swiftBinPath: Property + + @get:InputDirectory + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val bridgeSourceDir: DirectoryProperty + + @get:Internal + abstract val bridgeSourceBuiltDir: DirectoryProperty + + @get:Input + abstract val traceEnabled: Property + + @get:Internal + abstract val storedTraceFile: RegularFileProperty + + @get:Inject + abstract val execOps: ExecOperations + + init { + description = "Compile the Swift Package manifest" + group = "io.github.frankois944.spmForKmp.tasks" + onlyIf { + HostManager.hostIsMac + } + } + + @Suppress("LongMethod") + @TaskAction + fun compilePackage() { + val tracer = + TaskTracer( + "CompileSwiftPackageTask-${cinteropTarget.get()}", + traceEnabled.get(), + outputFile = + storedTraceFile + .get() + .asFile, + ) + tracer.trace("CompileSwiftPackageTask") { + tracer.trace("prepareWorkingDir") { + prepareWorkingDir() + } + + val args = + buildList { + if (swiftBinPath.orNull == null) { + add("--sdk") + add("macosx") + add("swift") + } + add("build") + add("-q") + add("--sdk") + tracer.trace("getSDKPath") { + add(execOps.getSDKPath(cinteropTarget.get(), logger)) + } + add("--triple") + add(cinteropTarget.get().triple(osVersion.orNull.orEmpty())) + add("--scratch-path") + add(packageScratchDir.get()) + add("--disable-sandbox") + add("-c") + add(if (debugMode.get()) "debug" else "release") + add("--jobs") + add(Runtime.getRuntime().availableProcessors().toString()) + sharedCacheDir.orNull?.let { + add("--cache-path") + add(it) + } + sharedConfigDir.orNull?.let { + add("--config-path") + add(it) + } + sharedSecurityDir.orNull?.let { + add("--security-path") + add(it) + } + add("--disable-index-store") + add("-debug-info-format") + add("none") + } + + val standardOutput = ByteArrayOutputStream() + val errorOutput = ByteArrayOutputStream() + tracer.trace("build") { + execOps + .exec { + it.executable = swiftBinPath.orNull ?: "xcrun" + it.workingDir = File(workingDir.get()) + it.args = args + it.standardOutput = standardOutput + it.errorOutput = errorOutput + it.isIgnoreExitValue = true + }.also { + logger.printExecLogs( + "buildPackage", + args, + it.exitValue != 0, + standardOutput, + errorOutput, + ) + } + } + } + tracer.writeHtmlReport() + } + + private fun prepareWorkingDir() { + if (Files.isSymbolicLink(bridgeSourceBuiltDir.get().asFile.toPath())) { + bridgeSourceBuiltDir + .get() + .asFile + .toPath() + .deleteIfExists() + } + if (bridgeSourceDir.get().asFileTree.isEmpty) { + val dummyFile = bridgeSourceBuiltDir.get().asFile.resolve("DummySPMFile.swift") + if (!dummyFile.exists()) { + logger.debug("Copy Dummy swift file to directory {}", bridgeSourceBuiltDir) + bridgeSourceBuiltDir.get().asFile.mkdirs() + dummyFile.writeText("import Foundation") + } + } else { + if (bridgeSourceBuiltDir + .get() + .asFile + .toPath() + .exists() + ) { + logger.debug("bridgeSourceBuiltDir exist") + if (!Files.isSymbolicLink(bridgeSourceBuiltDir.get().asFile.toPath())) { + logger.debug("bridgeSourceBuiltDir is not a symbolic link") + logger.debug("it must be deleted and be a symbolic link") + bridgeSourceBuiltDir.get().asFile.deleteRecursively() + Files.createSymbolicLink( + bridgeSourceBuiltDir.get().asFile.toPath(), + bridgeSourceDir.get().asFile.toPath(), + ) + } + } else { + logger.debug("bridgeSourceBuiltDir doesn't exist, create a symbolic Link") + Files.createSymbolicLink( + bridgeSourceBuiltDir.get().asFile.toPath(), + bridgeSourceDir.get().asFile.toPath(), + ) + } + } + } +} diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt new file mode 100644 index 000000000..08cc1c3b6 --- /dev/null +++ b/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt @@ -0,0 +1,52 @@ +package io.github.frankois944.spmForKmp.tasks.apple.compileSwiftPackage + +import io.github.frankois944.spmForKmp.SPM_TRACE_NAME +import io.github.frankois944.spmForKmp.SWIFT_PACKAGE_NAME +import io.github.frankois944.spmForKmp.SWIFT_PACKAGE_RESOLVE_NAME +import io.github.frankois944.spmForKmp.config.AppleCompileTarget +import io.github.frankois944.spmForKmp.config.PackageDirectoriesConfig +import io.github.frankois944.spmForKmp.definition.PackageRootDefinitionExtension +import io.github.frankois944.spmForKmp.tasks.utils.computeOsVersion +import io.github.frankois944.spmForKmp.tasks.utils.isTraceEnabled +import java.io.File + +internal fun CompileSwiftPackageTask.configureTask( + cinteropTarget: AppleCompileTarget, + swiftPackageEntry: PackageRootDefinitionExtension, + packageDirectoriesConfig: PackageDirectoriesConfig, + targetBuildDir: File, + isFirstTarget: Boolean, +) { + this.cinteropTarget.set(cinteropTarget) + this.debugMode.set(swiftPackageEntry.debug) + this.packageSwift.set(packageDirectoriesConfig.spmWorkingDir.resolve(SWIFT_PACKAGE_NAME)) + this.workingDir.set(packageDirectoriesConfig.spmWorkingDir.absolutePath) + this.packageScratchDir.set(packageDirectoriesConfig.packageScratchDir.absolutePath) + this.bridgeSourceDir.set(packageDirectoriesConfig.bridgeSourceDir) + this.osVersion.set(computeOsVersion(cinteropTarget, swiftPackageEntry)) + this.sharedCacheDir.set(packageDirectoriesConfig.sharedCacheDir?.absolutePath) + this.sharedConfigDir.set(packageDirectoriesConfig.sharedConfigDir?.absolutePath) + this.sharedSecurityDir.set(packageDirectoriesConfig.sharedSecurityDir?.absolutePath) + this.swiftBinPath.set(swiftPackageEntry.swiftBinPath) + this.bridgeSourceBuiltDir.set(packageDirectoriesConfig.spmWorkingDir.resolve("Sources")) + this.traceEnabled.set(project.isTraceEnabled) + this.storedTraceFile.set( + project.projectDir + .resolve(SPM_TRACE_NAME) + .resolve(packageDirectoriesConfig.spmWorkingDir.name) + .resolve(cinteropTarget.toString()) + .resolve("CompileSwiftPackageTask.html"), + ) + this.packageResolveFile.set(packageDirectoriesConfig.spmWorkingDir.resolve(SWIFT_PACKAGE_RESOLVE_NAME)) + this.generatedDirs.set( + buildList { + if (isFirstTarget) { + add(packageDirectoriesConfig.packageScratchDir.resolve("artifacts")) + add(packageDirectoriesConfig.packageScratchDir.resolve("plugins")) + add(packageDirectoriesConfig.packageScratchDir.resolve("registry")) + add(packageDirectoriesConfig.packageScratchDir.resolve("checkouts")) + } + add(targetBuildDir) + }, + ) +} From 8e0356cc914967e4ff7b9b979851f0320d368809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Tue, 3 Feb 2026 08:21:55 +0100 Subject: [PATCH 44/63] simplify kmp setup --- Package.swift | 13 ----- build.gradle.kts | 11 +++-- ios/objc/MCMapCoreObjCFactory.m | 25 ---------- ios/objc/MCMapViewObjC.m | 47 ------------------- ios/objc/include/MCMapCoreObjCFactory.h | 16 ------- ios/objc/include/MCMapViewObjC.h | 16 ------- .../map/interop/MapFactoryImplementation.kt | 9 ++-- .../map/interop/MapGpsLayerImplementation.kt | 21 +++++++++ .../feature/map/interop/MapRasterLayer.kt | 10 ++-- .../interop/Tiled2dMapRasterLayerInterface.kt | 27 +++++++++++ .../core/feature/map/interop/MapGpsLayer.kt | 4 ++ .../feature/map/interop/MapRasterLayer.kt | 4 +- .../interop/Tiled2dMapRasterLayerInterface.kt | 12 +++++ ...ProviderLocalDataProviderImplementation.kt | 4 +- .../map/interop/MapFactoryImplementation.kt | 38 +++++++-------- .../map/interop/MapGpsLayerImplementation.kt | 10 +++- .../interop/MapRasterLayerImplementation.kt | 2 + .../feature/map/interop/MapViewWrapper.kt | 1 - .../interop/Tiled2dMapRasterLayerInterface.kt | 24 ++++++++++ src/swift/MapCoreKmp/MapCoreKmpBridge.swift | 26 ++++++++++ 20 files changed, 163 insertions(+), 157 deletions(-) delete mode 100644 ios/objc/MCMapCoreObjCFactory.m delete mode 100644 ios/objc/MCMapViewObjC.m delete mode 100644 ios/objc/include/MCMapCoreObjCFactory.h delete mode 100644 ios/objc/include/MCMapViewObjC.h create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt create mode 100644 src/swift/MapCoreKmp/MapCoreKmpBridge.swift diff --git a/Package.swift b/Package.swift index 05aea6963..67c0154db 100644 --- a/Package.swift +++ b/Package.swift @@ -21,10 +21,6 @@ let package = Package( name: "MapCoreSharedModuleCpp", targets: ["MapCoreSharedModuleCpp"] ), - .library( - name: "MapCoreObjC", - targets: ["MapCoreObjC"] - ), ], dependencies: [ .package(url: "https://github.com/UbiqueInnovation/djinni.git", .upToNextMinor(from: "1.0.9")), @@ -194,15 +190,6 @@ let package = Package( // .disableWarning("reorder"), ] ), - .target( - name: "MapCoreObjC", - dependencies: [ - "MapCore", - "MapCoreSharedModule", - ], - path: "ios/objc", - publicHeadersPath: "include" - ), ], cxxLanguageStandard: .cxx17 ) diff --git a/build.gradle.kts b/build.gradle.kts index 7e38a381b..cc64ccc45 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,6 +11,8 @@ import org.gradle.api.provider.Property import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputDirectory import org.gradle.api.tasks.InputFiles +import org.gradle.api.tasks.Internal +import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.TaskAction @@ -94,7 +96,7 @@ kotlin { mapCoreCheckoutPath, "maps-core" ) { - add("MapCoreObjC", exportToKotlin = true) + add("MapCore") add("MapCoreSharedModule", exportToKotlin = true) } remotePackageVersion( @@ -216,8 +218,7 @@ val stripMapCoreLinkerOpts = tasks.register("stripMapCoreLinkerOpts") { .walkTopDown() .filter { it.isFile } .filter { - it.name == "MapCoreObjC.def" || - it.name == "MapCoreSharedModule.def" || + it.name == "MapCoreSharedModule.def" || it.name == "MapCoreKmp_bridge.def" } .forEach { defFile -> @@ -233,7 +234,7 @@ val stripMapCoreLinkerOpts = tasks.register("stripMapCoreLinkerOpts") { } tasks.withType().configureEach { - if (name.contains("MapCoreObjC") || name.contains("MapCoreSharedModule") || name.contains("MapCoreKmp")) { + if (name.contains("MapCoreSharedModule") || name.contains("MapCoreKmp")) { dependsOn(stripMapCoreLinkerOpts) } } @@ -311,7 +312,7 @@ abstract class CompileMapCoreMetallibTask : DefaultTask() { @get:Input abstract val targetTriple: Property - @get:InputDirectory + @get:Internal abstract val bundleDir: DirectoryProperty @get:InputFiles diff --git a/ios/objc/MCMapCoreObjCFactory.m b/ios/objc/MCMapCoreObjCFactory.m deleted file mode 100644 index 6d2cb256e..000000000 --- a/ios/objc/MCMapCoreObjCFactory.m +++ /dev/null @@ -1,25 +0,0 @@ -#import "MCMapCoreObjCFactory.h" - -@import MapCore; -@import MapCoreSharedModule; - -@implementation MCMapCoreObjCFactory - -+ (id)createTextureLoader { - return [[MCTextureLoader alloc] initWithUrlSession:nil]; -} - -+ (id)createFontLoaderWithBundle:(NSBundle *)bundle { - return [[MCFontLoader alloc] initWithBundle:bundle preload:@[]]; -} - -+ (id)createFontLoaderWithBundle:(NSBundle *)bundle - resourcePath:(NSString *)resourcePath { - return [[MCFontLoader alloc] initWithBundle:bundle resourcePath:resourcePath preload:@[]]; -} - -+ (id)createTextureHolderWithData:(NSData *)data { - return [[TextureHolder alloc] initWithData:data]; -} - -@end diff --git a/ios/objc/MCMapViewObjC.m b/ios/objc/MCMapViewObjC.m deleted file mode 100644 index 7f1f456f9..000000000 --- a/ios/objc/MCMapViewObjC.m +++ /dev/null @@ -1,47 +0,0 @@ -#import "MCMapViewObjC.h" - -@import MapCore; -@import MapCoreSharedModule; - -@interface MCMapViewObjC () -@property (nonatomic, strong) MCMapView *mapViewInternal; -@end - -@implementation MCMapViewObjC - -- (instancetype)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - [self commonInit]; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)coder { - if (self = [super initWithCoder:coder]) { - [self commonInit]; - } - return self; -} - -- (UIView *)mapView { - return self.mapViewInternal; -} - -- (MCMapInterface *)mapInterface { - return self.mapViewInternal.mapInterface; -} - -- (void)layoutSubviews { - [super layoutSubviews]; - self.mapViewInternal.frame = self.bounds; -} - -- (void)commonInit { - MCMapConfig *config = [[MCMapConfig alloc] initWithMapCoordinateSystem:[MCCoordinateSystemFactory getEpsg3857System]]; - self.mapViewInternal = [[MCMapView alloc] initWithMapConfig:config pixelsPerInch:nil is3D:NO]; - self.mapViewInternal.frame = self.bounds; - self.mapViewInternal.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - [self addSubview:self.mapViewInternal]; -} - -@end diff --git a/ios/objc/include/MCMapCoreObjCFactory.h b/ios/objc/include/MCMapCoreObjCFactory.h deleted file mode 100644 index 50cd58531..000000000 --- a/ios/objc/include/MCMapCoreObjCFactory.h +++ /dev/null @@ -1,16 +0,0 @@ -#import -@import MapCoreSharedModule; - -NS_ASSUME_NONNULL_BEGIN - -@interface MCMapCoreObjCFactory : NSObject - -+ (id)createTextureLoader; -+ (id)createFontLoaderWithBundle:(NSBundle *)bundle; -+ (id)createFontLoaderWithBundle:(NSBundle *)bundle - resourcePath:(nullable NSString *)resourcePath; -+ (id)createTextureHolderWithData:(NSData *)data; - -@end - -NS_ASSUME_NONNULL_END diff --git a/ios/objc/include/MCMapViewObjC.h b/ios/objc/include/MCMapViewObjC.h deleted file mode 100644 index 3b62a0110..000000000 --- a/ios/objc/include/MCMapViewObjC.h +++ /dev/null @@ -1,16 +0,0 @@ -#import -@import MapCoreSharedModule; - -NS_ASSUME_NONNULL_BEGIN - -@interface MCMapViewObjC : UIView - -- (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER; -- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; - -@property (nonatomic, readonly) UIView *mapView; -@property (nonatomic, readonly) MCMapInterface *mapInterface; - -@end - -NS_ASSUME_NONNULL_END diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index b052f0bec..ee88b18ae 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -5,7 +5,6 @@ import androidx.lifecycle.Lifecycle import io.openmobilemaps.gps.GpsLayer import io.openmobilemaps.gps.GpsProviderType import io.openmobilemaps.gps.style.GpsStyleInfoFactory -import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer import io.openmobilemaps.mapscore.map.loader.DataLoader import io.openmobilemaps.mapscore.map.loader.FontLoader import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer @@ -72,9 +71,11 @@ private class MapFactoryImpl( val context = requireNotNull(context) { "MapFactory requires an Android Context" } val cacheDir = File(context.cacheDir, "raster").apply { mkdirs() } val loader = DataLoader(context, cacheDir, 25L * 1024 * 1024) - return MapRasterLayer( - TiledRasterLayer(MapTiled2dMapLayerConfigImplementation(config), arrayListOf(loader)), - ) + val layer = Tiled2dMapRasterLayerInterface.create( + layerConfig = config, + loaders = listOf(LoaderInterface(loader)), + ) ?: return null + return MapRasterLayer(layer) } override fun createGpsLayer(): MapGpsLayer? { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt index d311cd4ab..3101f8260 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -1,8 +1,12 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop +import android.content.Context +import androidx.lifecycle.Lifecycle import io.openmobilemaps.gps.GpsLayer +import io.openmobilemaps.gps.GpsProviderType import io.openmobilemaps.gps.providers.LocationProviderInterface import io.openmobilemaps.gps.shared.gps.GpsMode as MapscoreGpsMode +import io.openmobilemaps.gps.style.GpsStyleInfoFactory import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : LayerInterface( @@ -15,6 +19,23 @@ actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : Layer actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) actual abstract fun notifyPermissionGranted() actual abstract fun lastLocation(): Coord? + + actual companion object { + actual fun create(platformContext: Any?, lifecycle: Any?): MapGpsLayer? { + val context = platformContext as? Context ?: return null + val locationProvider = GpsProviderType.GOOGLE_FUSED.getProvider(context) + val gpsLayer = GpsLayer( + context = context, + style = GpsStyleInfoFactory.createDefaultStyle(context), + initialLocationProvider = locationProvider, + ).apply { + setHeadingEnabled(false) + setFollowInitializeZoom(25_000f) + (lifecycle as? Lifecycle)?.let { registerLifecycle(it) } + } + return MapGpsLayerImpl(GpsLayerHandle(gpsLayer, locationProvider)) + } + } } class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt index c5472707b..576386fa1 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt @@ -1,11 +1,13 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -import io.openmobilemaps.mapscore.map.layers.TiledRasterLayer +import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface as MapscoreRasterLayerInterface actual open class MapRasterLayer actual constructor(nativeHandle: Any?) : LayerInterface( - (nativeHandle as? TiledRasterLayer)?.layerInterface(), + (nativeHandle as? MapscoreRasterLayerInterface)?.asLayerInterface(), ) { - private val rasterLayer = nativeHandle as? TiledRasterLayer + private val rasterLayer = nativeHandle as? MapscoreRasterLayerInterface - internal fun rasterLayerInterface(): TiledRasterLayer? = rasterLayer + actual constructor(layerInterface: Tiled2dMapRasterLayerInterface) : this(layerInterface.asMapscore()) + + internal fun rasterLayerInterface(): MapscoreRasterLayerInterface? = rasterLayer } diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt new file mode 100644 index 000000000..dc454e97c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt @@ -0,0 +1,27 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface as MapscoreRasterLayerInterface +import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreLoaderInterface + +actual open class Tiled2dMapRasterLayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapscore(): MapscoreRasterLayerInterface? = + nativeHandle as? MapscoreRasterLayerInterface + + actual companion object { + actual fun create( + layerConfig: MapTiled2dMapLayerConfig, + loaders: List, + ): Tiled2dMapRasterLayerInterface? { + val typedLoaders = ArrayList(loaders.size).apply { + loaders.forEach { add(requireNotNull(it.asMapscore())) } + } + val layer = MapscoreRasterLayerInterface.create( + MapTiled2dMapLayerConfigImplementation(layerConfig), + typedLoaders, + ) + return layer?.let { Tiled2dMapRasterLayerInterface(it) } + } + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt index baf7fb58b..631c618ec 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt @@ -8,4 +8,8 @@ expect abstract class MapGpsLayer constructor(nativeHandle: Any? = null) : Layer abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) abstract fun notifyPermissionGranted() abstract fun lastLocation(): Coord? + + companion object { + fun create(platformContext: Any? = null, lifecycle: Any? = null): MapGpsLayer? + } } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt index cffea54d8..2a7c7e59c 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt @@ -1,3 +1,5 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -expect open class MapRasterLayer constructor(nativeHandle: Any? = null) : LayerInterface +expect open class MapRasterLayer constructor(nativeHandle: Any? = null) : LayerInterface { + constructor(layerInterface: Tiled2dMapRasterLayerInterface) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt new file mode 100644 index 000000000..f77668962 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt @@ -0,0 +1,12 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +expect open class Tiled2dMapRasterLayerInterface constructor(nativeHandle: Any? = null) { + protected val nativeHandle: Any? + + companion object { + fun create( + layerConfig: MapTiled2dMapLayerConfig, + loaders: List, + ): Tiled2dMapRasterLayerInterface? + } +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt index 46ff95756..c35b5f699 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt @@ -1,6 +1,5 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop -import MapCoreObjC.MCMapCoreObjCFactory import MapCoreSharedModule.MCDataLoaderResult import MapCoreSharedModule.DJFuture import MapCoreSharedModule.DJPromise @@ -8,6 +7,7 @@ import MapCoreSharedModule.MCLoaderStatusOK import MapCoreSharedModule.MCTextureLoaderResult import MapCoreSharedModule.MCTextureHolderInterfaceProtocol import MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol +import MapCoreKmp.MapCoreKmpBridge import kotlinx.cinterop.addressOf import kotlinx.cinterop.usePinned import kotlinx.coroutines.CoroutineScope @@ -40,7 +40,7 @@ internal class MapDataProviderLocalDataProviderImplementation( scope.launch { val result = runCatching { dataProvider.loadSpriteAsync(spriteId, url, scale) }.getOrNull() val holder = result?.toNSData() - ?.let { MCMapCoreObjCFactory.createTextureHolderWithData(it) as? MCTextureHolderInterfaceProtocol } + ?.let { MapCoreKmpBridge.createTextureHolderWithData(it) as? MCTextureHolderInterfaceProtocol } promise.setValue(MCTextureLoaderResult(data = holder, etag = null, status = MCLoaderStatusOK, errorCode = null)) } return promise.getFuture() diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt index 62a4d9752..391a90938 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt @@ -3,14 +3,11 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import kotlin.experimental.ExperimentalObjCName import kotlin.native.ObjCName -import MapCoreObjC.MCMapCoreObjCFactory +import MapCoreKmp.MapCoreKmpBridge import MapCoreSharedModule.MCFontLoaderInterfaceProtocol import MapCoreSharedModule.MCLoaderInterfaceProtocol -import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface -import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface import platform.Foundation.NSBundle import platform.Foundation.NSLog -import platform.Foundation.NSNumber @OptIn(ExperimentalObjCName::class) @ObjCName("MapFactory", exact = true) @@ -69,44 +66,43 @@ private class MapFactoryImpl( logMissing("bundle for MapFonts") return null } - val fontLoader = MCMapCoreObjCFactory.createFontLoaderWithBundle(bundle) as? MCFontLoaderInterfaceProtocol + val fontLoader = MapCoreKmpBridge.createFontLoaderWithBundle(bundle) as? MCFontLoaderInterfaceProtocol ?: run { logMissing("font loader") return null } - val loader = MCMapCoreObjCFactory.createTextureLoader() as? MCLoaderInterfaceProtocol + val loader = MapCoreKmpBridge.createTextureLoader() as? MCLoaderInterfaceProtocol ?: run { logMissing("texture loader") return null } val loaders = listOf(loader) val provider = MapDataProviderLocalDataProviderImplementation(dataProvider) - val layer = MCTiled2dMapVectorLayerInterface.createExplicitly( - layerName, + val layer = Tiled2dMapVectorLayerInterface.createExplicitly( + layerName = layerName, styleJson = styleJson, - localStyleJson = NSNumber(bool = true), - loaders = loaders, - fontLoader = fontLoader, - localDataProvider = provider, + localStyleJson = true, + loaders = loaders.map { LoaderInterface(it) }, + fontLoader = FontLoaderInterface(fontLoader), + localDataProvider = Tiled2dMapVectorLayerLocalDataProviderInterface(provider), customZoomInfo = null, symbolDelegate = null, sourceUrlParams = null, - ) - return layer?.let { MapVectorLayer(it) } + ) ?: return null + return MapVectorLayer(layer) } override fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { - val loader = MCMapCoreObjCFactory.createTextureLoader() as? MCLoaderInterfaceProtocol + val loader = MapCoreKmpBridge.createTextureLoader() as? MCLoaderInterfaceProtocol ?: run { logMissing("texture loader") return null } - val loaders = listOf(loader) - val layer = MCTiled2dMapRasterLayerInterface.create( - MapTiled2dMapLayerConfigImplementation(config), - loaders = loaders, - ) - return layer?.let { MapRasterLayer(it) } + val layer = Tiled2dMapRasterLayerInterface.create( + layerConfig = config, + loaders = listOf(LoaderInterface(loader)), + ) ?: return null + return MapRasterLayer(layer) } override fun createGpsLayer(): MapGpsLayer? { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt index 66910505d..1f834a1e3 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt @@ -10,7 +10,7 @@ import LayerGpsSharedModule.MCGpsModeSTANDARD import LayerGpsSharedModule.MCGpsStyleInfoInterface import LayerGpsSharedModule.MCColor import LayerGpsSharedModule.MCTextureHolderInterfaceProtocol as GpsTextureHolderInterfaceProtocol -import MapCoreObjC.MCMapCoreObjCFactory +import MapCoreKmp.MapCoreKmpBridge import MapCoreSharedModule.MCCoordinateSystemIdentifiers import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode import kotlinx.cinterop.useContents @@ -30,6 +30,12 @@ actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : Layer actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) actual abstract fun notifyPermissionGranted() actual abstract fun lastLocation(): Coord? + + actual companion object { + actual fun create(platformContext: Any?, lifecycle: Any?): MapGpsLayer? { + return MapGpsLayerImpl.create() + } + } } class MapGpsLayerImpl private constructor( @@ -158,7 +164,7 @@ private fun loadTexture(name: String): GpsTextureHolderInterfaceProtocol? { val bundle = findBundleWithImage(name) ?: return null val image = UIImage.imageNamed(name, inBundle = bundle, compatibleWithTraitCollection = null) ?: return null val data = UIImagePNGRepresentation(image) ?: return null - return MCMapCoreObjCFactory.createTextureHolderWithData(data) as? GpsTextureHolderInterfaceProtocol + return MapCoreKmpBridge.createTextureHolderWithData(data) as? GpsTextureHolderInterfaceProtocol } private fun findBundleWithImage(name: String): platform.Foundation.NSBundle? { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt index 2436aee91..3c626bc12 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt @@ -9,5 +9,7 @@ actual open class MapRasterLayer actual constructor( ) { private val layer = nativeHandle as? MCTiled2dMapRasterLayerInterface + actual constructor(layerInterface: Tiled2dMapRasterLayerInterface) : this(layerInterface.asMapCore()) + internal fun rasterLayerInterface(): MCTiled2dMapRasterLayerInterface? = layer } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt index d8016501c..0bed9f2ea 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt @@ -3,7 +3,6 @@ package io.openmobilemaps.mapscore.kmp.feature.map.interop import kotlin.experimental.ExperimentalObjCName import kotlin.native.ObjCName -import MapCoreObjC.MCMapViewObjC import MapCoreSharedModule.MCMapInterface import platform.UIKit.UIView diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt new file mode 100644 index 000000000..a602a105c --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt @@ -0,0 +1,24 @@ +package io.openmobilemaps.mapscore.kmp.feature.map.interop + +import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface + +actual open class Tiled2dMapRasterLayerInterface actual constructor(nativeHandle: Any?) { + protected actual val nativeHandle: Any? = nativeHandle + + internal fun asMapCore(): MCTiled2dMapRasterLayerInterface? = + nativeHandle as? MCTiled2dMapRasterLayerInterface + + actual companion object { + actual fun create( + layerConfig: MapTiled2dMapLayerConfig, + loaders: List, + ): Tiled2dMapRasterLayerInterface? { + val typedLoaders = loaders.map { requireNotNull(it.asMapCore()) } + val layer = MCTiled2dMapRasterLayerInterface.create( + MapTiled2dMapLayerConfigImplementation(layerConfig), + loaders = typedLoaders, + ) + return layer?.let { Tiled2dMapRasterLayerInterface(it) } + } + } +} diff --git a/src/swift/MapCoreKmp/MapCoreKmpBridge.swift b/src/swift/MapCoreKmp/MapCoreKmpBridge.swift new file mode 100644 index 000000000..ae0af688d --- /dev/null +++ b/src/swift/MapCoreKmp/MapCoreKmpBridge.swift @@ -0,0 +1,26 @@ +import Foundation +import MapCore +import MapCoreSharedModule + +@objcMembers +public class MapCoreKmpBridge: NSObject { + @objc(createTextureLoader) + public class func createTextureLoader() -> MCLoaderInterface { + return MCTextureLoader() + } + + @objc(createFontLoaderWithBundle:resourcePath:) + public class func createFontLoader(bundle: Bundle, resourcePath: String? = nil) -> MCFontLoaderInterface { + return MCFontLoader(bundle: bundle, resourcePath: resourcePath) + } + + @objc(createFontLoaderWithBundle:) + public class func createFontLoader(bundle: Bundle) -> MCFontLoaderInterface { + return MCFontLoader(bundle: bundle, resourcePath: nil) + } + + @objc(createTextureHolderWithData:) + public class func createTextureHolder(data: Data) -> MCTextureHolderInterface? { + return TextureHolder(data: data) + } +} From 82c56e06bc07601c4eff59bb59d6f994b1805c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Wed, 4 Feb 2026 23:03:48 +0100 Subject: [PATCH 45/63] better kmp setup --- Package.swift | 12 +- build.gradle.kts | 202 ++++++----- .../io/openmobilemaps/mapscore/kmp/DataRef.kt | 6 + .../io/openmobilemaps/mapscore/kmp/Future.kt | 6 + .../mapscore/kmp/MapInterfaceBridge.kt | 5 + .../io/openmobilemaps/mapscore/kmp/DataRef.kt | 3 + .../io/openmobilemaps/mapscore/kmp/Future.kt | 3 + .../mapscore/kmp/MapInterfaceBridge.kt | 5 + .../io/openmobilemaps/mapscore/kmp/DataRef.kt | 6 + .../io/openmobilemaps/mapscore/kmp/Future.kt | 18 + .../mapscore/kmp/MapInterfaceBridge.kt | 5 + djinni/run_djinni.sh | 43 ++- external/djinni | 2 +- .../io/openmobilemaps/mapscore/kmp/DataRef.kt | 6 + .../io/openmobilemaps/mapscore/kmp/Future.kt | 6 + .../kmp/KMAlphaInstancedShaderInterface.kt | 18 + .../mapscore/kmp/KMAlphaShaderInterface.kt | 22 ++ .../openmobilemaps/mapscore/kmp/KMAnchor.kt | 9 + .../mapscore/kmp/KMBlendMode.kt | 9 + .../mapscore/kmp/KMBoundingBoxInterface.kt | 51 +++ .../mapscore/kmp/KMCamera3dConfig.kt | 9 + .../mapscore/kmp/KMCamera3dConfigFactory.kt | 27 ++ .../mapscore/kmp/KMCameraInterface.kt | 68 ++++ .../mapscore/kmp/KMCameraInterpolation.kt | 9 + .../kmp/KMCameraInterpolationValue.kt | 9 + .../openmobilemaps/mapscore/kmp/KMCircleD.kt | 9 + .../openmobilemaps/mapscore/kmp/KMCircleF.kt | 9 + .../openmobilemaps/mapscore/kmp/KMCircleI.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMColor.kt | 9 + .../kmp/KMColorCircleShaderInterface.kt | 22 ++ .../mapscore/kmp/KMColorShaderInterface.kt | 22 ++ .../mapscore/kmp/KMColorStateList.kt | 9 + .../mapscore/kmp/KMComputeObjectInterface.kt | 32 ++ .../mapscore/kmp/KMComputePassInterface.kt | 34 ++ .../io/openmobilemaps/mapscore/kmp/KMCoord.kt | 9 + .../KMCoordinateConversionHelperInterface.kt | 56 +++ .../kmp/KMCoordinateConverterInterface.kt | 58 ++++ .../mapscore/kmp/KMCoordinateSystemFactory.kt | 42 +++ .../kmp/KMCoordinateSystemIdentifiers.kt | 57 +++ .../kmp/KMCpuPerformanceLoggerInterface.kt | 32 ++ .../mapscore/kmp/KMDataLoaderResult.kt | 9 + .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 37 ++ .../kmp/KMDefaultTouchHandlerInterface.kt | 22 ++ ...KMElevationInterpolationShaderInterface.kt | 18 + .../mapscore/kmp/KMErrorManager.kt | 46 +++ .../mapscore/kmp/KMErrorManagerListener.kt | 32 ++ .../kmp/KMExceptionLoggerDelegateInterface.kt | 32 ++ .../kmp/KMExceptionLoggerInterface.kt | 21 ++ .../mapscore/kmp/KMExecutionEnvironment.kt | 9 + .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 52 +++ .../io/openmobilemaps/mapscore/kmp/KMFont.kt | 9 + .../openmobilemaps/mapscore/kmp/KMFontData.kt | 9 + .../mapscore/kmp/KMFontGlyph.kt | 9 + .../mapscore/kmp/KMFontLoaderInterface.kt | 34 ++ .../mapscore/kmp/KMFontLoaderResult.kt | 9 + .../mapscore/kmp/KMFontWrapper.kt | 9 + .../mapscore/kmp/KMFormattedStringEntry.kt | 9 + .../kmp/KMGeoJsonFeatureParserInterface.kt | 37 ++ .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 32 ++ .../mapscore/kmp/KMGeoJsonLine.kt | 9 + .../mapscore/kmp/KMGeoJsonPoint.kt | 9 + .../mapscore/kmp/KMGlyphDescription.kt | 9 + .../kmp/KMGraphicsObjectFactoryInterface.kt | 166 +++++++++ .../mapscore/kmp/KMGraphicsObjectInterface.kt | 84 +++++ .../mapscore/kmp/KMIconFactory.kt | 27 ++ .../mapscore/kmp/KMIconInfoInterface.kt | 60 ++++ .../kmp/KMIconLayerCallbackInterface.kt | 46 +++ .../mapscore/kmp/KMIconLayerInterface.kt | 84 +++++ .../mapscore/kmp/KMIconTextFit.kt | 9 + .../openmobilemaps/mapscore/kmp/KMIconType.kt | 9 + .../mapscore/kmp/KMIcosahedronInterface.kt | 44 +++ .../KMIcosahedronLayerCallbackInterface.kt | 34 ++ .../kmp/KMIcosahedronLayerInterface.kt | 27 ++ .../mapscore/kmp/KMIndexedLayerInterface.kt | 46 +++ .../mapscore/kmp/KMLayerInterface.kt | 210 +++++++++++ .../mapscore/kmp/KMLayerObjectInterface.kt | 22 ++ .../mapscore/kmp/KMLayerReadyState.kt | 9 + .../mapscore/kmp/KMLineCapType.kt | 9 + .../mapscore/kmp/KMLineFactory.kt | 22 ++ .../mapscore/kmp/KMLineGroup2dInterface.kt | 44 +++ .../kmp/KMLineGroupShaderInterface.kt | 26 ++ .../mapscore/kmp/KMLineInfoInterface.kt | 28 ++ .../mapscore/kmp/KMLineJoinType.kt | 9 + .../kmp/KMLineLayerCallbackInterface.kt | 32 ++ .../mapscore/kmp/KMLineLayerInterface.kt | 72 ++++ .../mapscore/kmp/KMLineStyle.kt | 9 + .../mapscore/kmp/KMLoaderInterface.kt | 80 +++++ .../mapscore/kmp/KMLoaderStatus.kt | 9 + .../mapscore/kmp/KMLoggerData.kt | 9 + .../mapscore/kmp/KMMapCallbackInterface.kt | 42 +++ .../mapscore/kmp/KMMapCamera3dInterface.kt | 22 ++ .../mapscore/kmp/KMMapCameraInterface.kt | 237 +++++++++++++ .../kmp/KMMapCameraListenerInterface.kt | 62 ++++ .../mapscore/kmp/KMMapConfig.kt | 9 + .../mapscore/kmp/KMMapCoordinateSystem.kt | 9 + .../mapscore/kmp/KMMapInterface.kt | 180 ++++++++++ .../kmp/KMMapReadyCallbackInterface.kt | 32 ++ .../mapscore/kmp/KMMapsCoreSharedModule.kt | 22 ++ .../mapscore/kmp/KMMaskingObjectInterface.kt | 44 +++ .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 32 ++ .../kmp/KMOpenGlRenderTargetInterface.kt | 86 +++++ .../kmp/KMOpenGlRenderingContextInterface.kt | 122 +++++++ .../kmp/KMPerformanceLoggerInterface.kt | 98 ++++++ .../mapscore/kmp/KMPolygon2dInterface.kt | 56 +++ .../mapscore/kmp/KMPolygonCoord.kt | 9 + .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 44 +++ .../kmp/KMPolygonGroupShaderInterface.kt | 22 ++ .../mapscore/kmp/KMPolygonInfo.kt | 9 + .../kmp/KMPolygonLayerCallbackInterface.kt | 46 +++ .../mapscore/kmp/KMPolygonLayerInterface.kt | 68 ++++ .../kmp/KMPolygonMaskObjectInterface.kt | 35 ++ .../kmp/KMPolygonPatternGroup2dInterface.kt | 104 ++++++ .../KMPolygonPatternGroupShaderInterface.kt | 18 + .../mapscore/kmp/KMPolygonStyle.kt | 9 + .../openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 9 + .../kmp/KMQuad2dInstancedInterface.kt | 146 ++++++++ .../mapscore/kmp/KMQuad2dInterface.kt | 96 +++++ .../KMQuad2dStretchedInstancedInterface.kt | 146 ++++++++ .../openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 9 + .../mapscore/kmp/KMQuadCoord.kt | 9 + .../mapscore/kmp/KMRasterShaderInterface.kt | 22 ++ .../mapscore/kmp/KMRasterShaderStyle.kt | 9 + .../mapscore/kmp/KMRectCoord.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMRectD.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMRectF.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMRectI.kt | 9 + .../mapscore/kmp/KMRectanglePacker.kt | 22 ++ .../mapscore/kmp/KMRectanglePackerPage.kt | 9 + .../mapscore/kmp/KMRenderConfigInterface.kt | 23 ++ .../mapscore/kmp/KMRenderLineDescription.kt | 9 + .../mapscore/kmp/KMRenderObjectInterface.kt | 92 +++++ .../mapscore/kmp/KMRenderPassConfig.kt | 9 + .../mapscore/kmp/KMRenderPassInterface.kt | 80 +++++ .../mapscore/kmp/KMRenderTargetInterface.kt | 34 ++ .../kmp/KMRenderVerticesDescription.kt | 9 + .../mapscore/kmp/KMRendererInterface.kt | 62 ++++ .../kmp/KMRenderingContextInterface.kt | 126 +++++++ .../mapscore/kmp/KMRenderingCullMode.kt | 9 + .../kmp/KMReverseGeocoderInterface.kt | 32 ++ .../mapscore/kmp/KMSceneCallbackInterface.kt | 32 ++ .../mapscore/kmp/KMSceneInterface.kt | 80 +++++ .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 17 + .../mapscore/kmp/KMSchedulerInterface.kt | 126 +++++++ .../mapscore/kmp/KMShaderFactoryInterface.kt | 322 +++++++++++++++++ .../mapscore/kmp/KMShaderProgramInterface.kt | 35 ++ .../mapscore/kmp/KMSharedBytes.kt | 9 + .../openmobilemaps/mapscore/kmp/KMSizeType.kt | 9 + .../mapscore/kmp/KMSkySphereLayerInterface.kt | 31 ++ .../kmp/KMSkySphereShaderInterface.kt | 22 ++ .../kmp/KMSphereEffectLayerInterface.kt | 27 ++ .../kmp/KMSphereEffectShaderInterface.kt | 22 ++ .../kmp/KMStretchInstancedShaderInterface.kt | 18 + .../mapscore/kmp/KMStretchShaderInfo.kt | 9 + .../mapscore/kmp/KMStretchShaderInterface.kt | 26 ++ .../mapscore/kmp/KMSymbolAlignment.kt | 9 + .../mapscore/kmp/KMSymbolZOrder.kt | 9 + .../mapscore/kmp/KMTaskConfig.kt | 9 + .../mapscore/kmp/KMTaskInterface.kt | 44 +++ .../mapscore/kmp/KMTaskPriority.kt | 9 + .../mapscore/kmp/KMTextDescription.kt | 9 + .../mapscore/kmp/KMTextFactory.kt | 22 ++ .../mapscore/kmp/KMTextInfoInterface.kt | 106 ++++++ .../mapscore/kmp/KMTextInstancedInterface.kt | 154 ++++++++ .../kmp/KMTextInstancedShaderInterface.kt | 18 + .../mapscore/kmp/KMTextInterface.kt | 64 ++++ .../mapscore/kmp/KMTextJustify.kt | 9 + .../mapscore/kmp/KMTextLayerInterface.kt | 35 ++ .../mapscore/kmp/KMTextShaderInterface.kt | 30 ++ .../mapscore/kmp/KMTextSymbolPlacement.kt | 9 + .../mapscore/kmp/KMTextureAtlas.kt | 9 + .../mapscore/kmp/KMTextureFilterType.kt | 9 + .../mapscore/kmp/KMTextureHolderInterface.kt | 92 +++++ .../mapscore/kmp/KMTextureLoaderResult.kt | 9 + .../mapscore/kmp/KMThreadPoolScheduler.kt | 22 ++ .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 118 +++++++ ...MTiled2dMapRasterLayerCallbackInterface.kt | 46 +++ .../kmp/KMTiled2dMapRasterLayerInterface.kt | 111 ++++++ .../kmp/KMTiled2dMapReadyStateListener.kt | 32 ++ .../kmp/KMTiled2dMapSourceInterface.kt | 64 ++++ .../kmp/KMTiled2dMapVectorAssetInfo.kt | 9 + .../kmp/KMTiled2dMapVectorLayerInterface.kt | 88 +++++ ...apVectorLayerLocalDataProviderInterface.kt | 70 ++++ ...apVectorLayerSelectionCallbackInterface.kt | 58 ++++ ...2dMapVectorLayerSymbolDelegateInterface.kt | 34 ++ .../kmp/KMTiled2dMapVectorSettings.kt | 9 + .../kmp/KMTiled2dMapVectorTileOrigin.kt | 9 + .../mapscore/kmp/KMTiled2dMapZoomInfo.kt | 9 + .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 9 + .../mapscore/kmp/KMTiledLayerError.kt | 9 + .../mapscore/kmp/KMTouchAction.kt | 9 + .../mapscore/kmp/KMTouchEvent.kt | 9 + .../mapscore/kmp/KMTouchHandlerInterface.kt | 62 ++++ .../mapscore/kmp/KMTouchInterface.kt | 164 +++++++++ .../io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 9 + .../kmp/KMVectorLayerFeatureCoordInfo.kt | 9 + .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 9 + .../kmp/KMVectorLayerFeatureInfoValue.kt | 9 + .../kmp/KMWmtsCapabilitiesResource.kt | 67 ++++ .../mapscore/kmp/KMWmtsLayerDescription.kt | 9 + .../mapscore/kmp/KMWmtsLayerDimension.kt | 9 + .../mapscore/kmp/KMWmtsTileMatrix.kt | 9 + .../mapscore/kmp/KMWmtsTileMatrixSet.kt | 9 + .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 22 ++ .../mapscore/kmp/MapInterfaceBridge.kt | 5 + .../map/interop/Camera3dConfigAndroid.kt | 75 ---- .../kmp/core/feature/map/interop/Color.kt | 5 - .../kmp/core/feature/map/interop/Coord.kt | 5 - .../IndexedLayerInterfaceImplementation.kt | 16 - .../interop/LayerInterfaceImplementation.kt | 92 ----- .../MapCameraInterfaceImplementation.kt | 235 ------------- .../feature/map/interop/MapCoreInterop.kt | 7 - .../map/interop/MapCoreTypesAndroid.kt | 106 ------ ...ProviderLocalDataProviderImplementation.kt | 80 ----- .../map/interop/MapFactoryImplementation.kt | 95 ----- .../map/interop/MapGpsLayerImplementation.kt | 86 ----- .../map/interop/MapInterfaceImplementation.kt | 197 ----------- .../feature/map/interop/MapRasterLayer.kt | 13 - .../MapTiled2dMapLayerConfigImplementation.kt | 109 ------ .../interop/MapVectorLayerImplementation.kt | 64 ---- .../MapVectorLayerLocalDataProviderFactory.kt | 20 -- .../MapVectorLayerSelectionCallbackProxy.kt | 32 -- .../feature/map/interop/MapViewWrapper.kt | 22 -- .../feature/map/interop/RecordTypealiases.kt | 17 - .../kmp/core/feature/map/interop/RectCoord.kt | 5 - .../interop/Tiled2dMapRasterLayerInterface.kt | 27 -- .../interop/Tiled2dMapVectorLayerInterface.kt | 46 --- .../Tiled2dMapVectorLayerTypesAndroid.kt | 34 -- .../io/openmobilemaps/mapscore/kmp/DataRef.kt | 3 + .../io/openmobilemaps/mapscore/kmp/Future.kt | 3 + .../kmp/KMAlphaInstancedShaderInterface.kt | 9 + .../mapscore/kmp/KMAlphaShaderInterface.kt | 11 + .../openmobilemaps/mapscore/kmp/KMAnchor.kt | 16 + .../mapscore/kmp/KMBlendMode.kt | 9 + .../mapscore/kmp/KMBoundingBoxInterface.kt | 25 ++ .../mapscore/kmp/KMCamera3dConfig.kt | 24 ++ .../mapscore/kmp/KMCamera3dConfigFactory.kt | 15 + .../mapscore/kmp/KMCameraInterface.kt | 15 + .../mapscore/kmp/KMCameraInterpolation.kt | 10 + .../kmp/KMCameraInterpolationValue.kt | 12 + .../openmobilemaps/mapscore/kmp/KMCircleD.kt | 14 + .../openmobilemaps/mapscore/kmp/KMCircleF.kt | 14 + .../openmobilemaps/mapscore/kmp/KMCircleI.kt | 14 + .../io/openmobilemaps/mapscore/kmp/KMColor.kt | 16 + .../kmp/KMColorCircleShaderInterface.kt | 11 + .../mapscore/kmp/KMColorShaderInterface.kt | 11 + .../mapscore/kmp/KMColorStateList.kt | 12 + .../mapscore/kmp/KMComputeObjectInterface.kt | 9 + .../mapscore/kmp/KMComputePassInterface.kt | 9 + .../io/openmobilemaps/mapscore/kmp/KMCoord.kt | 16 + .../KMCoordinateConversionHelperInterface.kt | 27 ++ .../kmp/KMCoordinateConverterInterface.kt | 13 + .../mapscore/kmp/KMCoordinateSystemFactory.kt | 21 ++ .../kmp/KMCoordinateSystemIdentifiers.kt | 27 ++ .../kmp/KMCpuPerformanceLoggerInterface.kt | 17 + .../mapscore/kmp/KMDataLoaderResult.kt | 16 + .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 19 + .../kmp/KMDefaultTouchHandlerInterface.kt | 13 + ...KMElevationInterpolationShaderInterface.kt | 9 + .../mapscore/kmp/KMErrorManager.kt | 25 ++ .../mapscore/kmp/KMErrorManagerListener.kt | 9 + .../kmp/KMExceptionLoggerDelegateInterface.kt | 9 + .../kmp/KMExceptionLoggerInterface.kt | 13 + .../mapscore/kmp/KMExecutionEnvironment.kt | 10 + .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 25 ++ .../io/openmobilemaps/mapscore/kmp/KMFont.kt | 10 + .../openmobilemaps/mapscore/kmp/KMFontData.kt | 12 + .../mapscore/kmp/KMFontGlyph.kt | 18 + .../mapscore/kmp/KMFontLoaderInterface.kt | 9 + .../mapscore/kmp/KMFontLoaderResult.kt | 14 + .../mapscore/kmp/KMFontWrapper.kt | 20 ++ .../mapscore/kmp/KMFormattedStringEntry.kt | 12 + .../kmp/KMGeoJsonFeatureParserInterface.kt | 19 + .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 17 + .../mapscore/kmp/KMGeoJsonLine.kt | 12 + .../mapscore/kmp/KMGeoJsonPoint.kt | 12 + .../mapscore/kmp/KMGlyphDescription.kt | 12 + .../kmp/KMGraphicsObjectFactoryInterface.kt | 31 ++ .../mapscore/kmp/KMGraphicsObjectInterface.kt | 19 + .../mapscore/kmp/KMIconFactory.kt | 15 + .../mapscore/kmp/KMIconInfoInterface.kt | 27 ++ .../kmp/KMIconLayerCallbackInterface.kt | 11 + .../mapscore/kmp/KMIconLayerInterface.kt | 43 +++ .../mapscore/kmp/KMIconTextFit.kt | 11 + .../openmobilemaps/mapscore/kmp/KMIconType.kt | 11 + .../mapscore/kmp/KMIcosahedronInterface.kt | 11 + .../KMIcosahedronLayerCallbackInterface.kt | 9 + .../kmp/KMIcosahedronLayerInterface.kt | 15 + .../mapscore/kmp/KMIndexedLayerInterface.kt | 11 + .../mapscore/kmp/KMLayerInterface.kt | 43 +++ .../mapscore/kmp/KMLayerObjectInterface.kt | 11 + .../mapscore/kmp/KMLayerReadyState.kt | 11 + .../mapscore/kmp/KMLineCapType.kt | 10 + .../mapscore/kmp/KMLineFactory.kt | 13 + .../mapscore/kmp/KMLineGroup2dInterface.kt | 11 + .../kmp/KMLineGroupShaderInterface.kt | 13 + .../mapscore/kmp/KMLineInfoInterface.kt | 13 + .../mapscore/kmp/KMLineJoinType.kt | 10 + .../kmp/KMLineLayerCallbackInterface.kt | 9 + .../mapscore/kmp/KMLineLayerInterface.kt | 37 ++ .../mapscore/kmp/KMLineStyle.kt | 36 ++ .../mapscore/kmp/KMLoaderInterface.kt | 17 + .../mapscore/kmp/KMLoaderStatus.kt | 14 + .../mapscore/kmp/KMLoggerData.kt | 26 ++ .../mapscore/kmp/KMMapCallbackInterface.kt | 11 + .../mapscore/kmp/KMMapCamera3dInterface.kt | 11 + .../mapscore/kmp/KMMapCameraInterface.kt | 107 ++++++ .../kmp/KMMapCameraListenerInterface.kt | 15 + .../mapscore/kmp/KMMapConfig.kt | 10 + .../mapscore/kmp/KMMapCoordinateSystem.kt | 14 + .../mapscore/kmp/KMMapInterface.kt | 85 +++++ .../kmp/KMMapReadyCallbackInterface.kt | 9 + .../mapscore/kmp/KMMapsCoreSharedModule.kt | 13 + .../mapscore/kmp/KMMaskingObjectInterface.kt | 11 + .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 17 + .../kmp/KMOpenGlRenderTargetInterface.kt | 19 + .../kmp/KMOpenGlRenderingContextInterface.kt | 25 ++ .../kmp/KMPerformanceLoggerInterface.kt | 21 ++ .../mapscore/kmp/KMPolygon2dInterface.kt | 13 + .../mapscore/kmp/KMPolygonCoord.kt | 12 + .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 11 + .../kmp/KMPolygonGroupShaderInterface.kt | 11 + .../mapscore/kmp/KMPolygonInfo.kt | 16 + .../kmp/KMPolygonLayerCallbackInterface.kt | 11 + .../mapscore/kmp/KMPolygonLayerInterface.kt | 35 ++ .../kmp/KMPolygonMaskObjectInterface.kt | 19 + .../kmp/KMPolygonPatternGroup2dInterface.kt | 23 ++ .../KMPolygonPatternGroupShaderInterface.kt | 9 + .../mapscore/kmp/KMPolygonStyle.kt | 12 + .../openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 16 + .../kmp/KMQuad2dInstancedInterface.kt | 31 ++ .../mapscore/kmp/KMQuad2dInterface.kt | 21 ++ .../KMQuad2dStretchedInstancedInterface.kt | 31 ++ .../openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 16 + .../mapscore/kmp/KMQuadCoord.kt | 16 + .../mapscore/kmp/KMRasterShaderInterface.kt | 11 + .../mapscore/kmp/KMRasterShaderStyle.kt | 22 ++ .../mapscore/kmp/KMRectCoord.kt | 12 + .../io/openmobilemaps/mapscore/kmp/KMRectD.kt | 16 + .../io/openmobilemaps/mapscore/kmp/KMRectF.kt | 16 + .../io/openmobilemaps/mapscore/kmp/KMRectI.kt | 16 + .../mapscore/kmp/KMRectanglePacker.kt | 13 + .../mapscore/kmp/KMRectanglePackerPage.kt | 10 + .../mapscore/kmp/KMRenderConfigInterface.kt | 11 + .../mapscore/kmp/KMRenderLineDescription.kt | 12 + .../mapscore/kmp/KMRenderObjectInterface.kt | 19 + .../mapscore/kmp/KMRenderPassConfig.kt | 14 + .../mapscore/kmp/KMRenderPassInterface.kt | 17 + .../mapscore/kmp/KMRenderTargetInterface.kt | 9 + .../kmp/KMRenderVerticesDescription.kt | 12 + .../mapscore/kmp/KMRendererInterface.kt | 15 + .../kmp/KMRenderingContextInterface.kt | 27 ++ .../mapscore/kmp/KMRenderingCullMode.kt | 10 + .../kmp/KMReverseGeocoderInterface.kt | 17 + .../mapscore/kmp/KMSceneCallbackInterface.kt | 9 + .../mapscore/kmp/KMSceneInterface.kt | 39 +++ .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 9 + .../mapscore/kmp/KMSchedulerInterface.kt | 27 ++ .../mapscore/kmp/KMShaderFactoryInterface.kt | 57 +++ .../mapscore/kmp/KMShaderProgramInterface.kt | 17 + .../mapscore/kmp/KMSharedBytes.kt | 14 + .../openmobilemaps/mapscore/kmp/KMSizeType.kt | 9 + .../mapscore/kmp/KMSkySphereLayerInterface.kt | 17 + .../kmp/KMSkySphereShaderInterface.kt | 11 + .../kmp/KMSphereEffectLayerInterface.kt | 15 + .../kmp/KMSphereEffectShaderInterface.kt | 11 + .../kmp/KMStretchInstancedShaderInterface.kt | 9 + .../mapscore/kmp/KMStretchShaderInfo.kt | 30 ++ .../mapscore/kmp/KMStretchShaderInterface.kt | 13 + .../mapscore/kmp/KMSymbolAlignment.kt | 10 + .../mapscore/kmp/KMSymbolZOrder.kt | 10 + .../mapscore/kmp/KMTaskConfig.kt | 16 + .../mapscore/kmp/KMTaskInterface.kt | 11 + .../mapscore/kmp/KMTaskPriority.kt | 10 + .../mapscore/kmp/KMTextDescription.kt | 10 + .../mapscore/kmp/KMTextFactory.kt | 13 + .../mapscore/kmp/KMTextInfoInterface.kt | 21 ++ .../mapscore/kmp/KMTextInstancedInterface.kt | 33 ++ .../kmp/KMTextInstancedShaderInterface.kt | 9 + .../mapscore/kmp/KMTextInterface.kt | 15 + .../mapscore/kmp/KMTextJustify.kt | 11 + .../mapscore/kmp/KMTextLayerInterface.kt | 19 + .../mapscore/kmp/KMTextShaderInterface.kt | 15 + .../mapscore/kmp/KMTextSymbolPlacement.kt | 10 + .../mapscore/kmp/KMTextureAtlas.kt | 12 + .../mapscore/kmp/KMTextureFilterType.kt | 9 + .../mapscore/kmp/KMTextureHolderInterface.kt | 19 + .../mapscore/kmp/KMTextureLoaderResult.kt | 16 + .../mapscore/kmp/KMThreadPoolScheduler.kt | 13 + .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 23 ++ ...MTiled2dMapRasterLayerCallbackInterface.kt | 11 + .../kmp/KMTiled2dMapRasterLayerInterface.kt | 53 +++ .../kmp/KMTiled2dMapReadyStateListener.kt | 9 + .../kmp/KMTiled2dMapSourceInterface.kt | 31 ++ .../kmp/KMTiled2dMapVectorAssetInfo.kt | 12 + .../kmp/KMTiled2dMapVectorLayerInterface.kt | 43 +++ ...apVectorLayerLocalDataProviderInterface.kt | 15 + ...apVectorLayerSelectionCallbackInterface.kt | 13 + ...2dMapVectorLayerSymbolDelegateInterface.kt | 9 + .../kmp/KMTiled2dMapVectorSettings.kt | 10 + .../kmp/KMTiled2dMapVectorTileOrigin.kt | 11 + .../mapscore/kmp/KMTiled2dMapZoomInfo.kt | 22 ++ .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 22 ++ .../mapscore/kmp/KMTiledLayerError.kt | 20 ++ .../mapscore/kmp/KMTouchAction.kt | 11 + .../mapscore/kmp/KMTouchEvent.kt | 12 + .../mapscore/kmp/KMTouchHandlerInterface.kt | 15 + .../mapscore/kmp/KMTouchInterface.kt | 31 ++ .../io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 12 + .../io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 12 + .../io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 12 + .../io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 14 + .../io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 14 + .../io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 14 + .../kmp/KMVectorLayerFeatureCoordInfo.kt | 12 + .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 12 + .../kmp/KMVectorLayerFeatureInfoValue.kt | 22 ++ .../kmp/KMWmtsCapabilitiesResource.kt | 31 ++ .../mapscore/kmp/KMWmtsLayerDescription.kt | 24 ++ .../mapscore/kmp/KMWmtsLayerDimension.kt | 14 + .../mapscore/kmp/KMWmtsTileMatrix.kt | 24 ++ .../mapscore/kmp/KMWmtsTileMatrixSet.kt | 14 + .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 13 + .../mapscore/kmp/MapInterfaceBridge.kt | 5 + .../feature/map/interop/Camera3dConfig.kt | 44 --- .../kmp/core/feature/map/interop/Color.kt | 13 - .../kmp/core/feature/map/interop/Coord.kt | 13 - .../map/interop/IndexedLayerInterface.kt | 8 - .../feature/map/interop/LayerInterface.kt | 29 -- .../core/feature/map/interop/MapCallbacks.kt | 17 - .../map/interop/MapCamera3dInterface.kt | 14 - .../feature/map/interop/MapCameraInterface.kt | 77 ---- .../map/interop/MapCameraListenerInterface.kt | 19 - .../kmp/core/feature/map/interop/MapConfig.kt | 7 - .../map/interop/MapCoordinateSystem.kt | 11 - .../feature/map/interop/MapCoreInterop.kt | 5 - .../core/feature/map/interop/MapCoreTypes.kt | 53 --- .../map/interop/MapDataProviderProtocol.kt | 8 - .../core/feature/map/interop/MapFactory.kt | 24 -- .../core/feature/map/interop/MapGpsLayer.kt | 15 - .../core/feature/map/interop/MapInterface.kt | 72 ---- .../feature/map/interop/MapRasterLayer.kt | 5 - .../map/interop/MapTiled2dMapLayerConfig.kt | 34 -- .../feature/map/interop/MapVectorLayer.kt | 7 - .../map/interop/MapVectorLayerFeatureInfo.kt | 16 - .../MapVectorLayerLocalDataProviderFactory.kt | 10 - .../MapVectorLayerSelectionCallback.kt | 15 - .../feature/map/interop/MapViewWrapper.kt | 10 - .../kmp/core/feature/map/interop/RectCoord.kt | 9 - .../kmp/core/feature/map/interop/RectI.kt | 13 - .../interop/Tiled2dMapRasterLayerInterface.kt | 12 - .../interop/Tiled2dMapVectorLayerInterface.kt | 19 - .../map/interop/Tiled2dMapVectorLayerTypes.kt | 17 - .../kmp/core/feature/map/interop/Vec2F.kt | 9 - .../kmp/core/feature/map/interop/Vec2I.kt | 9 - .../kmp/core/feature/map/interop/Vec3D.kt | 11 - .../kmp/core/feature/map/model/GpsMode.kt | 7 - .../io/openmobilemaps/mapscore/kmp/DataRef.kt | 6 + .../io/openmobilemaps/mapscore/kmp/Future.kt | 18 + .../kmp/KMAlphaInstancedShaderInterface.kt | 23 ++ .../mapscore/kmp/KMAlphaShaderInterface.kt | 27 ++ .../openmobilemaps/mapscore/kmp/KMAnchor.kt | 42 +++ .../mapscore/kmp/KMBlendMode.kt | 28 ++ .../mapscore/kmp/KMBoundingBoxInterface.kt | 56 +++ .../mapscore/kmp/KMCamera3dConfig.kt | 50 +++ .../mapscore/kmp/KMCamera3dConfigFactory.kt | 32 ++ .../mapscore/kmp/KMCameraInterface.kt | 74 ++++ .../mapscore/kmp/KMCameraInterpolation.kt | 22 ++ .../kmp/KMCameraInterpolationValue.kt | 26 ++ .../openmobilemaps/mapscore/kmp/KMCircleD.kt | 30 ++ .../openmobilemaps/mapscore/kmp/KMCircleF.kt | 30 ++ .../openmobilemaps/mapscore/kmp/KMCircleI.kt | 30 ++ .../io/openmobilemaps/mapscore/kmp/KMColor.kt | 34 ++ .../kmp/KMColorCircleShaderInterface.kt | 27 ++ .../mapscore/kmp/KMColorShaderInterface.kt | 27 ++ .../mapscore/kmp/KMColorStateList.kt | 26 ++ .../mapscore/kmp/KMComputeObjectInterface.kt | 38 ++ .../mapscore/kmp/KMComputePassInterface.kt | 40 +++ .../io/openmobilemaps/mapscore/kmp/KMCoord.kt | 34 ++ .../KMCoordinateConversionHelperInterface.kt | 61 ++++ .../kmp/KMCoordinateConverterInterface.kt | 64 ++++ .../mapscore/kmp/KMCoordinateSystemFactory.kt | 47 +++ .../kmp/KMCoordinateSystemIdentifiers.kt | 62 ++++ .../kmp/KMCpuPerformanceLoggerInterface.kt | 37 ++ .../mapscore/kmp/KMDataLoaderResult.kt | 34 ++ .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 42 +++ .../kmp/KMDefaultTouchHandlerInterface.kt | 27 ++ ...KMElevationInterpolationShaderInterface.kt | 23 ++ .../mapscore/kmp/KMErrorManager.kt | 51 +++ .../mapscore/kmp/KMErrorManagerListener.kt | 38 ++ .../kmp/KMExceptionLoggerDelegateInterface.kt | 38 ++ .../kmp/KMExceptionLoggerInterface.kt | 26 ++ .../mapscore/kmp/KMExecutionEnvironment.kt | 30 ++ .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 57 +++ .../io/openmobilemaps/mapscore/kmp/KMFont.kt | 22 ++ .../openmobilemaps/mapscore/kmp/KMFontData.kt | 26 ++ .../mapscore/kmp/KMFontGlyph.kt | 38 ++ .../mapscore/kmp/KMFontLoaderInterface.kt | 40 +++ .../mapscore/kmp/KMFontLoaderResult.kt | 30 ++ .../mapscore/kmp/KMFontWrapper.kt | 42 +++ .../mapscore/kmp/KMFormattedStringEntry.kt | 26 ++ .../kmp/KMGeoJsonFeatureParserInterface.kt | 42 +++ .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 37 ++ .../mapscore/kmp/KMGeoJsonLine.kt | 26 ++ .../mapscore/kmp/KMGeoJsonPoint.kt | 26 ++ .../mapscore/kmp/KMGlyphDescription.kt | 26 ++ .../kmp/KMGraphicsObjectFactoryInterface.kt | 172 +++++++++ .../mapscore/kmp/KMGraphicsObjectInterface.kt | 90 +++++ .../mapscore/kmp/KMIconFactory.kt | 32 ++ .../mapscore/kmp/KMIconInfoInterface.kt | 65 ++++ .../kmp/KMIconLayerCallbackInterface.kt | 52 +++ .../mapscore/kmp/KMIconLayerInterface.kt | 89 +++++ .../mapscore/kmp/KMIconTextFit.kt | 32 ++ .../openmobilemaps/mapscore/kmp/KMIconType.kt | 32 ++ .../mapscore/kmp/KMIcosahedronInterface.kt | 50 +++ .../KMIcosahedronLayerCallbackInterface.kt | 40 +++ .../kmp/KMIcosahedronLayerInterface.kt | 32 ++ .../mapscore/kmp/KMIndexedLayerInterface.kt | 52 +++ .../mapscore/kmp/KMLayerInterface.kt | 216 ++++++++++++ .../mapscore/kmp/KMLayerObjectInterface.kt | 27 ++ .../mapscore/kmp/KMLayerReadyState.kt | 32 ++ .../mapscore/kmp/KMLineCapType.kt | 30 ++ .../mapscore/kmp/KMLineFactory.kt | 27 ++ .../mapscore/kmp/KMLineGroup2dInterface.kt | 50 +++ .../kmp/KMLineGroupShaderInterface.kt | 31 ++ .../mapscore/kmp/KMLineInfoInterface.kt | 33 ++ .../mapscore/kmp/KMLineJoinType.kt | 30 ++ .../kmp/KMLineLayerCallbackInterface.kt | 38 ++ .../mapscore/kmp/KMLineLayerInterface.kt | 77 ++++ .../mapscore/kmp/KMLineStyle.kt | 74 ++++ .../mapscore/kmp/KMLoaderInterface.kt | 86 +++++ .../mapscore/kmp/KMLoaderStatus.kt | 38 ++ .../mapscore/kmp/KMLoggerData.kt | 54 +++ .../mapscore/kmp/KMMapCallbackInterface.kt | 48 +++ .../mapscore/kmp/KMMapCamera3dInterface.kt | 27 ++ .../mapscore/kmp/KMMapCameraInterface.kt | 242 +++++++++++++ .../kmp/KMMapCameraListenerInterface.kt | 68 ++++ .../mapscore/kmp/KMMapConfig.kt | 22 ++ .../mapscore/kmp/KMMapCoordinateSystem.kt | 30 ++ .../mapscore/kmp/KMMapCoreFactory.kt | 20 ++ .../mapscore/kmp/KMMapInterface.kt | 185 ++++++++++ .../kmp/KMMapReadyCallbackInterface.kt | 38 ++ .../mapscore/kmp/KMMapsCoreSharedModule.kt | 27 ++ .../mapscore/kmp/KMMaskingObjectInterface.kt | 50 +++ .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 37 ++ .../kmp/KMOpenGlRenderTargetInterface.kt | 92 +++++ .../kmp/KMOpenGlRenderingContextInterface.kt | 128 +++++++ .../kmp/KMPerformanceLoggerInterface.kt | 104 ++++++ .../mapscore/kmp/KMPolygon2dInterface.kt | 62 ++++ .../mapscore/kmp/KMPolygonCoord.kt | 26 ++ .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 50 +++ .../kmp/KMPolygonGroupShaderInterface.kt | 27 ++ .../mapscore/kmp/KMPolygonInfo.kt | 34 ++ .../kmp/KMPolygonLayerCallbackInterface.kt | 52 +++ .../mapscore/kmp/KMPolygonLayerInterface.kt | 73 ++++ .../kmp/KMPolygonMaskObjectInterface.kt | 40 +++ .../kmp/KMPolygonPatternGroup2dInterface.kt | 110 ++++++ .../KMPolygonPatternGroupShaderInterface.kt | 23 ++ .../mapscore/kmp/KMPolygonStyle.kt | 26 ++ .../openmobilemaps/mapscore/kmp/KMPromise.kt | 11 + .../openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 34 ++ .../kmp/KMQuad2dInstancedInterface.kt | 152 ++++++++ .../mapscore/kmp/KMQuad2dInterface.kt | 102 ++++++ .../KMQuad2dStretchedInstancedInterface.kt | 152 ++++++++ .../openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 34 ++ .../mapscore/kmp/KMQuadCoord.kt | 34 ++ .../mapscore/kmp/KMRasterShaderInterface.kt | 27 ++ .../mapscore/kmp/KMRasterShaderStyle.kt | 46 +++ .../mapscore/kmp/KMRectCoord.kt | 26 ++ .../io/openmobilemaps/mapscore/kmp/KMRectD.kt | 34 ++ .../io/openmobilemaps/mapscore/kmp/KMRectF.kt | 34 ++ .../io/openmobilemaps/mapscore/kmp/KMRectI.kt | 34 ++ .../mapscore/kmp/KMRectanglePacker.kt | 27 ++ .../mapscore/kmp/KMRectanglePackerPage.kt | 22 ++ .../mapscore/kmp/KMRenderConfigInterface.kt | 28 ++ .../mapscore/kmp/KMRenderLineDescription.kt | 26 ++ .../mapscore/kmp/KMRenderObjectInterface.kt | 98 ++++++ .../mapscore/kmp/KMRenderPassConfig.kt | 30 ++ .../mapscore/kmp/KMRenderPassInterface.kt | 86 +++++ .../mapscore/kmp/KMRenderTargetInterface.kt | 40 +++ .../kmp/KMRenderVerticesDescription.kt | 26 ++ .../mapscore/kmp/KMRendererInterface.kt | 68 ++++ .../kmp/KMRenderingContextInterface.kt | 132 +++++++ .../mapscore/kmp/KMRenderingCullMode.kt | 30 ++ .../kmp/KMReverseGeocoderInterface.kt | 37 ++ .../mapscore/kmp/KMSceneCallbackInterface.kt | 38 ++ .../mapscore/kmp/KMSceneInterface.kt | 85 +++++ .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 22 ++ .../mapscore/kmp/KMSchedulerInterface.kt | 132 +++++++ .../mapscore/kmp/KMShaderFactoryInterface.kt | 328 ++++++++++++++++++ .../mapscore/kmp/KMShaderProgramInterface.kt | 40 +++ .../mapscore/kmp/KMSharedBytes.kt | 30 ++ .../openmobilemaps/mapscore/kmp/KMSizeType.kt | 28 ++ .../mapscore/kmp/KMSkySphereLayerInterface.kt | 36 ++ .../kmp/KMSkySphereShaderInterface.kt | 27 ++ .../kmp/KMSphereEffectLayerInterface.kt | 32 ++ .../kmp/KMSphereEffectShaderInterface.kt | 27 ++ .../kmp/KMStretchInstancedShaderInterface.kt | 23 ++ .../mapscore/kmp/KMStretchShaderInfo.kt | 62 ++++ .../mapscore/kmp/KMStretchShaderInterface.kt | 31 ++ .../mapscore/kmp/KMSymbolAlignment.kt | 30 ++ .../mapscore/kmp/KMSymbolZOrder.kt | 30 ++ .../mapscore/kmp/KMTaskConfig.kt | 34 ++ .../mapscore/kmp/KMTaskInterface.kt | 50 +++ .../mapscore/kmp/KMTaskPriority.kt | 30 ++ .../mapscore/kmp/KMTextDescription.kt | 22 ++ .../mapscore/kmp/KMTextFactory.kt | 27 ++ .../mapscore/kmp/KMTextInfoInterface.kt | 112 ++++++ .../mapscore/kmp/KMTextInstancedInterface.kt | 160 +++++++++ .../kmp/KMTextInstancedShaderInterface.kt | 23 ++ .../mapscore/kmp/KMTextInterface.kt | 70 ++++ .../mapscore/kmp/KMTextJustify.kt | 32 ++ .../mapscore/kmp/KMTextLayerInterface.kt | 40 +++ .../mapscore/kmp/KMTextShaderInterface.kt | 35 ++ .../mapscore/kmp/KMTextSymbolPlacement.kt | 30 ++ .../mapscore/kmp/KMTextureAtlas.kt | 26 ++ .../mapscore/kmp/KMTextureFilterType.kt | 28 ++ .../mapscore/kmp/KMTextureHolderInterface.kt | 98 ++++++ .../mapscore/kmp/KMTextureLoaderResult.kt | 34 ++ .../mapscore/kmp/KMThreadPoolScheduler.kt | 27 ++ .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 124 +++++++ ...MTiled2dMapRasterLayerCallbackInterface.kt | 52 +++ .../kmp/KMTiled2dMapRasterLayerInterface.kt | 116 +++++++ .../kmp/KMTiled2dMapReadyStateListener.kt | 38 ++ .../kmp/KMTiled2dMapSourceInterface.kt | 69 ++++ .../kmp/KMTiled2dMapVectorAssetInfo.kt | 26 ++ .../kmp/KMTiled2dMapVectorLayerInterface.kt | 93 +++++ ...apVectorLayerLocalDataProviderInterface.kt | 76 ++++ ...apVectorLayerSelectionCallbackInterface.kt | 64 ++++ ...2dMapVectorLayerSymbolDelegateInterface.kt | 40 +++ .../kmp/KMTiled2dMapVectorSettings.kt | 22 ++ .../kmp/KMTiled2dMapVectorTileOrigin.kt | 32 ++ .../mapscore/kmp/KMTiled2dMapZoomInfo.kt | 46 +++ .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 46 +++ .../mapscore/kmp/KMTiledLayerError.kt | 42 +++ .../mapscore/kmp/KMTouchAction.kt | 32 ++ .../mapscore/kmp/KMTouchEvent.kt | 26 ++ .../mapscore/kmp/KMTouchHandlerInterface.kt | 68 ++++ .../mapscore/kmp/KMTouchInterface.kt | 170 +++++++++ .../io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 26 ++ .../io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 26 ++ .../io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 26 ++ .../io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 30 ++ .../io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 30 ++ .../io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 30 ++ .../kmp/KMVectorLayerFeatureCoordInfo.kt | 26 ++ .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 26 ++ .../kmp/KMVectorLayerFeatureInfoValue.kt | 46 +++ .../kmp/KMWmtsCapabilitiesResource.kt | 72 ++++ .../mapscore/kmp/KMWmtsLayerDescription.kt | 50 +++ .../mapscore/kmp/KMWmtsLayerDimension.kt | 30 ++ .../mapscore/kmp/KMWmtsTileMatrix.kt | 50 +++ .../mapscore/kmp/KMWmtsTileMatrixSet.kt | 30 ++ .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 27 ++ .../mapscore/kmp/MapInterfaceBridge.kt | 5 + .../feature/map/interop/Camera3dConfigIos.kt | 80 ----- .../kmp/core/feature/map/interop/Color.kt | 5 - .../kmp/core/feature/map/interop/Coord.kt | 5 - .../kmp/core/feature/map/interop/GpsCoord.kt | 5 - .../IndexedLayerInterfaceImplementation.kt | 16 - .../interop/LayerInterfaceImplementation.kt | 92 ----- .../MapCameraInterfaceImplementation.kt | 245 ------------- .../feature/map/interop/MapCoreInterop.kt | 12 - .../feature/map/interop/MapCoreTypesIos.kt | 106 ------ ...ProviderLocalDataProviderImplementation.kt | 66 ---- .../map/interop/MapFactoryImplementation.kt | 124 ------- .../map/interop/MapGpsLayerImplementation.kt | 178 ---------- .../map/interop/MapInterfaceImplementation.kt | 210 ----------- .../interop/MapRasterLayerImplementation.kt | 15 - .../map/interop/MapResourceBundleRegistry.kt | 7 - .../MapTiled2dMapLayerConfigImplementation.kt | 100 ------ .../interop/MapVectorLayerImplementation.kt | 42 --- .../MapVectorLayerLocalDataProviderFactory.kt | 14 - .../MapVectorLayerSelectionCallbackProxy.kt | 71 ---- .../feature/map/interop/MapViewWrapper.kt | 20 -- .../feature/map/interop/RecordTypealiases.kt | 17 - .../kmp/core/feature/map/interop/RectCoord.kt | 5 - .../interop/Tiled2dMapRasterLayerInterface.kt | 24 -- .../interop/Tiled2dMapVectorLayerInterface.kt | 46 --- .../interop/Tiled2dMapVectorLayerTypesIos.kt | 34 -- 684 files changed, 20824 insertions(+), 3646 deletions(-) create mode 100644 djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt create mode 100644 djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt create mode 100644 djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt create mode 100644 djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt create mode 100644 djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt create mode 100644 djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt create mode 100644 djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt create mode 100644 djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt create mode 100644 djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt delete mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt create mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt delete mode 100644 kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt diff --git a/Package.swift b/Package.swift index 67c0154db..7ed98f27a 100644 --- a/Package.swift +++ b/Package.swift @@ -11,14 +11,17 @@ let package = Package( products: [ .library( name: "MapCore", + type: .dynamic, targets: ["MapCore"] ), .library( name: "MapCoreSharedModule", + type: .static, targets: ["MapCoreSharedModule"] ), .library( name: "MapCoreSharedModuleCpp", + type: .static, targets: ["MapCoreSharedModuleCpp"] ), ], @@ -117,7 +120,7 @@ let package = Package( .product(name: "Atomics", package: "swift-atomics"), ], path: "ios", - exclude: ["readme.md", "objc"], + exclude: ["readme.md"], resources: [ .process("graphics/Shader/Metal/") ] @@ -128,7 +131,12 @@ let package = Package( "MapCoreSharedModuleCpp" ], path: "bridging/ios", - publicHeadersPath: "" + publicHeadersPath: "", + linkerSettings: [ + .linkedFramework("Foundation"), + .linkedFramework("CoreFoundation"), + .linkedLibrary("objc"), + ] ), .target( name: "MapCoreSharedModuleCpp", diff --git a/build.gradle.kts b/build.gradle.kts index cc64ccc45..760c870a5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,9 +21,6 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinAndroidTarget import org.jetbrains.kotlin.gradle.tasks.CInteropProcess -import java.net.URI -import java.nio.file.FileSystems -import java.nio.file.Files import javax.inject.Inject group = "io.openmobilemaps.mapscore" @@ -45,6 +42,42 @@ val mapCoreSpmBuildType = (project.findProperty("KOTLIN_FRAMEWORK_BUILD_TYPE") a ?.lowercase() ?.takeIf { it == "debug" || it == "release" } ?: "release" +val mapCoreSpmScratchDir = project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch") + +fun ensureLinkerOpts(defFile: File, opts: List) { + if (!defFile.exists()) return + val lines = defFile.readLines().toMutableList() + val idx = lines.indexOfFirst { it.trimStart().startsWith("linkerOpts") } + val optsText = opts.joinToString(" ") { it } + if (idx >= 0) { + val current = lines[idx] + val missing = opts.filterNot { current.contains(it) } + if (missing.isNotEmpty()) { + lines[idx] = current + " " + missing.joinToString(" ") + defFile.writeText(lines.joinToString("\n")) + } + } else { + lines.add("linkerOpts = $optsText") + defFile.writeText(lines.joinToString("\n")) + } +} + +fun stripLinkerOpts(defFile: File, optsToRemove: Set) { + if (!defFile.exists()) return + val lines = defFile.readLines().toMutableList() + val idx = lines.indexOfFirst { it.trimStart().startsWith("linkerOpts") } + if (idx < 0) return + val line = lines[idx] + val prefix = line.substringBefore("=").trimEnd() + " =" + val tokens = line.substringAfter("=").trim().split(Regex("\\s+")) + val filtered = tokens.filterNot { it in optsToRemove } + if (filtered.isEmpty()) { + lines.removeAt(idx) + } else { + lines[idx] = "$prefix ${filtered.joinToString(" ")}" + } + defFile.writeText(lines.joinToString("\n")) +} plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" @@ -76,7 +109,7 @@ kotlin { iosTargets.forEach { iosTarget -> iosTarget.binaries.framework { - isStatic = true + isStatic = false } iosTarget.compilations { val main by getting { @@ -84,7 +117,7 @@ kotlin { } } iosTarget.swiftPackageConfig(cinteropName = mapCoreCinteropName) { - minIos = "14.0" + minIos = "16.4" debug = mapCoreSpmBuildType == "debug" bridgeSettings { cSetting { @@ -99,13 +132,6 @@ kotlin { add("MapCore") add("MapCoreSharedModule", exportToKotlin = true) } - remotePackageVersion( - url = URI("https://github.com/openmobilemaps/layer-gps"), - packageName = "layer-gps", - version = "3.6.0", - ) { - add("LayerGpsSharedModule", exportToKotlin = true) - } } } } @@ -121,7 +147,6 @@ kotlin { kotlin.srcDir("kmp/androidMain/kotlin") dependencies { api("io.openmobilemaps:mapscore:3.6.0") - api("io.openmobilemaps:layer-gps:3.6.0") implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.3") implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.3") implementation("ch.ubique.android:djinni-support-lib:1.1.1") @@ -181,87 +206,101 @@ tasks } } -tasks.withType().configureEach { - if (name.contains("MapCore") || name.contains("LayerGpsSharedModule")) { - settings.compilerOpts("-I$mapCoreCheckoutPath/external/djinni/support-lib/objc") - settings.compilerOpts("-I$mapCoreCheckoutPath/bridging/ios") - } -} - -fun stripStaticLibrariesFromText(file: File) { - val lines = file.readLines() - val filtered = lines.filterNot { it.startsWith("staticLibraries=") } - if (filtered != lines) { - file.writeText(filtered.joinToString("\n") + "\n") - } -} - -fun stripStaticLibrariesFromKlib(klibFile: File) { - if (!klibFile.exists()) return - val uri = URI.create("jar:${klibFile.toURI()}") - FileSystems.newFileSystem(uri, mapOf("create" to "false")).use { fs -> - val manifestPath = fs.getPath("default/manifest") - if (!Files.exists(manifestPath)) return@use - val lines = Files.readAllLines(manifestPath) - val filtered = lines.filterNot { it.startsWith("staticLibraries=") } - if (filtered != lines) { - Files.write(manifestPath, filtered) +// Ensure MapCoreKmp is built as a dynamic SwiftPM library to avoid duplicate MapCore symbols. +tasks + .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateSwiftPackage") } + .configureEach { + doLast { + val packageFile = + project.layout.buildDirectory + .file("spmKmpPlugin/MapCoreKmp/Package.swift") + .get() + .asFile + if (!packageFile.exists()) return@doLast + val original = packageFile.readText() + var updated = original.replace("type: .static", "type: .dynamic") + updated = + updated.replace( + ".product(name: \"MapCore\", package: \"maps-core\"),.product(name: \"MapCoreSharedModule\", package: \"maps-core\")", + ".product(name: \"MapCore\", package: \"maps-core\")", + ) + updated = + updated.replace( + ".product(name: \"MapCore\", package: \"maps-core\"), .product(name: \"MapCoreSharedModule\", package: \"maps-core\")", + ".product(name: \"MapCore\", package: \"maps-core\")", + ) + if (!updated.contains("linkerSettings:")) { + updated = + updated.replace( + ",cSettings: [.headerSearchPath(\"Sources/djinni-objc\")]", + ",cSettings: [.headerSearchPath(\"Sources/djinni-objc\")],linkerSettings: [.linkedLibrary(\"objc\"),.linkedFramework(\"Foundation\")]", + ) + } + if (updated != original) { + packageFile.writeText(updated) + } } } -} -val stripMapCoreLinkerOpts = tasks.register("stripMapCoreLinkerOpts") { - doLast { - val defRoot = layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/defFiles").get().asFile - if (!defRoot.exists()) return@doLast - defRoot - .walkTopDown() - .filter { it.isFile } - .filter { - it.name == "MapCoreSharedModule.def" || - it.name == "MapCoreKmp_bridge.def" +// When MapCoreKmp is dynamic, SwiftPM emits libMapCoreKmp.dylib (no .a). Point cinterop to the dylib. +gradle.projectsEvaluated { +tasks + .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateCInteropDefinition") } + .configureEach { + val platformDir = + when { + name.contains("IosArm64") -> "arm64-apple-ios" + name.contains("IosSimulatorArm64") -> "arm64-apple-ios-simulator" + else -> return@configureEach } - .forEach { defFile -> - val lines = defFile.readLines() - val filtered = lines.filterNot { - it.startsWith("linkerOpts") || it.startsWith("staticLibraries") + val compiledBinaryProp = + javaClass.getMethod("getCompiledBinary").invoke(this) as RegularFileProperty + compiledBinaryProp.set( + project.layout.buildDirectory.file( + "spmKmpPlugin/MapCoreKmp/scratch/$platformDir/$mapCoreSpmBuildType/libMapCoreKmp.dylib", + ), + ) + doLast { + val targetDir = + when { + name.contains("IosArm64") -> "iosArm64" + name.contains("IosSimulatorArm64") -> "iosSimulatorArm64" + else -> return@doLast } - if (filtered != lines) { - defFile.writeText(filtered.joinToString("\n") + "\n") + val defNames = listOf("MapCoreSharedModule", "MapCoreKmp_bridge", "MapCoreKmp") + val libDir = + project.layout.buildDirectory + .dir("spmKmpPlugin/MapCoreKmp/scratch/$platformDir/$mapCoreSpmBuildType") + .get() + .asFile + defNames.forEach { defName -> + val defFile = + project.layout.buildDirectory + .file("spmKmpPlugin/MapCoreKmp/defFiles/$targetDir/$defName.def") + .get() + .asFile + if (!defFile.exists()) return@forEach + val extraOpts = + when (defName) { + "MapCoreKmp_bridge" -> listOf("-L\"${libDir.absolutePath}\"", "-lMapCoreKmp") + else -> emptyList() + } + if (extraOpts.isNotEmpty()) { + ensureLinkerOpts(defFile, extraOpts) } + stripLinkerOpts(defFile, setOf("-lMapCoreSharedModule")) } + } } } tasks.withType().configureEach { - if (name.contains("MapCoreSharedModule") || name.contains("MapCoreKmp")) { - dependsOn(stripMapCoreLinkerOpts) - } -} - -tasks.withType().configureEach { - if (!name.contains("MapCoreKmp")) return@configureEach - doLast { - val buildDirFile = project.layout.buildDirectory.asFile.get() - buildDirFile - .walkTopDown() - .filter { it.isFile && it.name.endsWith("MapCoreKmpMain.klib") } - .forEach { stripStaticLibrariesFromKlib(it) } - - buildDirFile - .walkTopDown() - .filter { it.isFile && it.name == "manifest.properties" } - .filter { it.readText().contains("staticLibraries=libMapCoreKmp.a") } - .forEach { stripStaticLibrariesFromText(it) } + if (name.contains("MapCore")) { + settings.compilerOpts("-I$mapCoreCheckoutPath/external/djinni/support-lib/objc") + settings.compilerOpts("-I$mapCoreCheckoutPath/bridging/ios") } } -tasks.matching { - it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateCInteropDefinition") -}.configureEach { - finalizedBy(stripMapCoreLinkerOpts) -} - val mapCoreSpmBuiltDir = project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch/arm64 x86_64-apple-ios-simulator/$mapCoreSpmBuildType").get().asFile mapCoreSpmBuiltDir.mkdirs() @@ -312,7 +351,8 @@ abstract class CompileMapCoreMetallibTask : DefaultTask() { @get:Input abstract val targetTriple: Property - @get:Internal + @get:InputDirectory + @get:Optional abstract val bundleDir: DirectoryProperty @get:InputFiles diff --git a/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt new file mode 100644 index 000000000..fd2a0ef9e --- /dev/null +++ b/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt @@ -0,0 +1,6 @@ +package io.openmobilemaps.mapscore.kmp + +actual typealias KMDataRef = java.nio.ByteBuffer + +internal fun KMDataRef.asPlatform(): java.nio.ByteBuffer = this +internal fun java.nio.ByteBuffer.asKmp(): KMDataRef = this diff --git a/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt new file mode 100644 index 000000000..e06c79fb4 --- /dev/null +++ b/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt @@ -0,0 +1,6 @@ +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFuture = com.snapchat.djinni.Future + +internal fun KMFuture.asPlatform(): com.snapchat.djinni.Future = this +internal fun com.snapchat.djinni.Future.asKmp(): KMFuture = this diff --git a/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt new file mode 100644 index 000000000..30e6ea85e --- /dev/null +++ b/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp + +actual object KMMapInterfaceBridge { + actual fun wrap(nativeHandle: Any): KMMapInterface = KMMapInterface(nativeHandle) +} diff --git a/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt new file mode 100644 index 000000000..81544d311 --- /dev/null +++ b/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt @@ -0,0 +1,3 @@ +package io.openmobilemaps.mapscore.kmp + +expect class KMDataRef diff --git a/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt new file mode 100644 index 000000000..6e1c9d951 --- /dev/null +++ b/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt @@ -0,0 +1,3 @@ +package io.openmobilemaps.mapscore.kmp + +expect class KMFuture diff --git a/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt new file mode 100644 index 000000000..c0dc45807 --- /dev/null +++ b/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp + +expect object KMMapInterfaceBridge { + fun wrap(nativeHandle: Any): KMMapInterface +} diff --git a/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt new file mode 100644 index 000000000..8915a8ad9 --- /dev/null +++ b/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt @@ -0,0 +1,6 @@ +package io.openmobilemaps.mapscore.kmp + +actual typealias KMDataRef = platform.Foundation.NSData + +internal fun KMDataRef.asPlatform(): platform.Foundation.NSData = this +internal fun platform.Foundation.NSData.asKmp(): KMDataRef = this diff --git a/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt new file mode 100644 index 000000000..2fd6b0a7d --- /dev/null +++ b/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt @@ -0,0 +1,18 @@ +package io.openmobilemaps.mapscore.kmp + +actual class KMFuture { + internal val native: MapCoreSharedModule.DJFuture? + + constructor() { + native = null + } + + internal constructor(native: MapCoreSharedModule.DJFuture) { + this.native = native + } +} + +internal fun KMFuture.asPlatform(): MapCoreSharedModule.DJFuture = + requireNotNull(native) + +internal fun MapCoreSharedModule.DJFuture.asKmp(): KMFuture = KMFuture(this) diff --git a/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt new file mode 100644 index 000000000..30e6ea85e --- /dev/null +++ b/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp + +actual object KMMapInterfaceBridge { + actual fun wrap(nativeHandle: Any): KMMapInterface = KMMapInterface(nativeHandle) +} diff --git a/djinni/run_djinni.sh b/djinni/run_djinni.sh index 316f24e4b..c1ff3daec 100755 --- a/djinni/run_djinni.sh +++ b/djinni/run_djinni.sh @@ -14,11 +14,12 @@ while [ -h "$loc" ]; do fi done base_dir=$(cd "`dirname "$loc"`" && pwd) +cd "$base_dir" JAVA_PACKAGE="io.openmobilemaps.mapscore.shared" PROJECT_PREFIX="MC" -DJINNI_OUT_DIR="../bridging" +DJINNI_OUT_DIR="$base_dir/../bridging" OBJC_OUT="$DJINNI_OUT_DIR/ios" OBJC_PREFIX="$PROJECT_PREFIX" @@ -27,7 +28,14 @@ OBJCPP_OUT="$DJINNI_OUT_DIR/ios" KOTLIN_OUT="$DJINNI_OUT_DIR/android/java/io/openmobilemaps/mapscore/shared" JNI_OUT="$DJINNI_OUT_DIR/android/jni" -CPP_OUT="../shared/public" +KMP_COMMON_OUT="$base_dir/../kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp" +KMP_ANDROID_OUT="$base_dir/../kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp" +KMP_IOS_OUT="$base_dir/../kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp" +KMP_PACKAGE="io.openmobilemaps.mapscore.kmp" +KMP_IOS_MODULE="MapCoreSharedModule" +KMP_BRIDGE_PREFIX="KM" + +CPP_OUT="$base_dir/../shared/public" HPP_EXT="h" IDENT_CPP="FooBar" @@ -37,7 +45,7 @@ IDENT_CPP_METHOD="fooBar" IDENT_JNI_CLASS="NativeFooBar" IDENT_JAVA="fooBar" -for dir in "$OBJCPP_OUT" "$OBJC_OUT" "$JNI_OUT" "$KOTLIN_OUT"; do +for dir in "$OBJCPP_OUT" "$OBJC_OUT" "$JNI_OUT" "$KOTLIN_OUT" "$KMP_COMMON_OUT" "$KMP_ANDROID_OUT" "$KMP_IOS_OUT"; do if [ -e "$dir" ]; then echo "Deleting \"$dir\"..." rm -r "$dir" @@ -75,6 +83,14 @@ for file in $(find . -name "*.djinni" -type f -print); do --ident-java-field "$IDENT_JAVA" \ --ident-java-enum "$IDENT_CPP_ENUM" \ \ + --kotlin-kmp-common-out "$KMP_COMMON_OUT" \ + --kotlin-kmp-android-out "$KMP_ANDROID_OUT" \ + --kotlin-kmp-ios-out "$KMP_IOS_OUT" \ + --kotlin-kmp-package "$KMP_PACKAGE" \ + --kotlin-kmp-ios-module "$KMP_IOS_MODULE" \ + --kotlin-kmp-bridge-prefix "$KMP_BRIDGE_PREFIX" \ + --kotlin-kmp-objc-name-prefix "$KMP_BRIDGE_PREFIX" \ + \ --cpp-out "$CPP_OUT" \ --hpp-ext "$HPP_EXT" \ --ident-cpp-type "$IDENT_CPP" \ @@ -102,4 +118,25 @@ for file in $(find . -name "*.djinni" -type f -print); do done +MANUAL_KMP_DIR="$base_dir/kmp_manual" +MANUAL_KMP_COMMON="$MANUAL_KMP_DIR/commonMain/kotlin/io/openmobilemaps/mapscore/kmp" +MANUAL_KMP_ANDROID="$MANUAL_KMP_DIR/androidMain/kotlin/io/openmobilemaps/mapscore/kmp" +MANUAL_KMP_IOS="$MANUAL_KMP_DIR/iosMain/kotlin/io/openmobilemaps/mapscore/kmp" + +if [ -d "$MANUAL_KMP_DIR" ]; then + echo "Copying manual KMP files..." + if [ -d "$MANUAL_KMP_COMMON" ]; then + mkdir -p "$KMP_COMMON_OUT" + cp -R "$MANUAL_KMP_COMMON/." "$KMP_COMMON_OUT/" + fi + if [ -d "$MANUAL_KMP_ANDROID" ]; then + mkdir -p "$KMP_ANDROID_OUT" + cp -R "$MANUAL_KMP_ANDROID/." "$KMP_ANDROID_OUT/" + fi + if [ -d "$MANUAL_KMP_IOS" ]; then + mkdir -p "$KMP_IOS_OUT" + cp -R "$MANUAL_KMP_IOS/." "$KMP_IOS_OUT/" + fi +fi + echo "djinni completed." diff --git a/external/djinni b/external/djinni index b11a8cd27..979b542c7 160000 --- a/external/djinni +++ b/external/djinni @@ -1 +1 @@ -Subproject commit b11a8cd27dd1f2145570b5ef9c47b1494ac709e6 +Subproject commit 979b542c76c97e24ea253e68a7c1c4b26a4e37a5 diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt new file mode 100644 index 000000000..fd2a0ef9e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt @@ -0,0 +1,6 @@ +package io.openmobilemaps.mapscore.kmp + +actual typealias KMDataRef = java.nio.ByteBuffer + +internal fun KMDataRef.asPlatform(): java.nio.ByteBuffer = this +internal fun java.nio.ByteBuffer.asKmp(): KMDataRef = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt new file mode 100644 index 000000000..e06c79fb4 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt @@ -0,0 +1,6 @@ +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFuture = com.snapchat.djinni.Future + +internal fun KMFuture.asPlatform(): com.snapchat.djinni.Future = this +internal fun com.snapchat.djinni.Future.asKmp(): KMFuture = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt new file mode 100644 index 000000000..8aa2ef9b8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -0,0 +1,18 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMAlphaInstancedShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMAlphaInstancedShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt new file mode 100644 index 000000000..cbe97039c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMAlphaShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface + + actual fun updateAlpha(value: Float) { + native.updateAlpha(value) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMAlphaShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt new file mode 100644 index 000000000..58a5a94b2 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMAnchor = io.openmobilemaps.mapscore.shared.map.layers.text.Anchor + +internal fun KMAnchor.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.Anchor = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.Anchor.asKmp(): KMAnchor = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt new file mode 100644 index 000000000..5847585e5 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMBlendMode = io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode + +internal fun KMBlendMode.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode = this +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode.asKmp(): KMBlendMode = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt new file mode 100644 index 000000000..ca92708cc --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -0,0 +1,51 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMBoundingBoxInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface + + actual fun addPoint(p: KMCoord) { + native.addPoint(p.asPlatform()) + } + + actual fun asRectCoord(): KMRectCoord { + val result = native.asRectCoord() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() + } + + actual fun getCenter(): KMCoord { + val result = native.getCenter() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun getMin(): KMCoord { + val result = native.getMin() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun getMax(): KMCoord { + val result = native.getMax() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun getSystemIdentifier(): Int { + val result = native.getSystemIdentifier() + return result + } + + actual companion object + { + + actual fun create(systemIdentifier: Int): KMBoundingBoxInterface { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface.create(systemIdentifier) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface)).asKmp() + } + } +} + +internal fun KMBoundingBoxInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt new file mode 100644 index 000000000..b237c0992 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMCamera3dConfig = io.openmobilemaps.mapscore.shared.map.Camera3dConfig + +internal fun KMCamera3dConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.Camera3dConfig = this +internal fun io.openmobilemaps.mapscore.shared.map.Camera3dConfig.asKmp(): KMCamera3dConfig = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt new file mode 100644 index 000000000..a6aae3b8f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMCamera3dConfigFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory + + actual companion object + { + + actual fun getBasicConfig(): KMCamera3dConfig { + val result = io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getBasicConfig() + return (result as io.openmobilemaps.mapscore.shared.map.Camera3dConfig).asKmp() + } + + actual fun getRestorConfig(): KMCamera3dConfig { + val result = io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getRestorConfig() + return (result as io.openmobilemaps.mapscore.shared.map.Camera3dConfig).asKmp() + } + } +} + +internal fun KMCamera3dConfigFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory +internal fun io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt new file mode 100644 index 000000000..332e105fa --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt @@ -0,0 +1,68 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMCameraInterface +{ + + actual fun getVpMatrix(): ArrayList + + actual fun getScalingFactor(): Double + + actual fun getOrigin(): KMVec3D + + actual fun viewportSizeChanged() +} + +private class KMCameraInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.CameraInterface) : KMCameraInterface +{ + + override fun getVpMatrix(): ArrayList { + val result = nativeHandle.getVpMatrix() + return ArrayList(result.map { it }) + } + + override fun getScalingFactor(): Double { + val result = nativeHandle.getScalingFactor() + return result + } + + override fun getOrigin(): KMVec3D { + val result = nativeHandle.getOrigin() + return (result as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp() + } + + override fun viewportSizeChanged() { + nativeHandle.viewportSizeChanged() + } +} + +private class KMCameraInterfacePlatformProxy(private val delegate: KMCameraInterface) : io.openmobilemaps.mapscore.shared.graphics.CameraInterface() +{ + + override fun getVpMatrix(): ArrayList { + val result = delegate.getVpMatrix() + return ArrayList(result.map { it }) + } + + override fun getScalingFactor(): Double { + val result = delegate.getScalingFactor() + return result + } + + override fun getOrigin(): io.openmobilemaps.mapscore.shared.graphics.common.Vec3D { + val result = delegate.getOrigin() + return result.asPlatform() + } + + override fun viewportSizeChanged() { + delegate.viewportSizeChanged() + } +} + +internal fun KMCameraInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.CameraInterface = when (this) { + is KMCameraInterfacePlatformWrapper -> this.nativeHandle + else -> KMCameraInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.CameraInterface.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt new file mode 100644 index 000000000..ff505ca8d --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMCameraInterpolation = io.openmobilemaps.mapscore.shared.map.CameraInterpolation + +internal fun KMCameraInterpolation.asPlatform(): io.openmobilemaps.mapscore.shared.map.CameraInterpolation = this +internal fun io.openmobilemaps.mapscore.shared.map.CameraInterpolation.asKmp(): KMCameraInterpolation = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt new file mode 100644 index 000000000..6d1443809 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMCameraInterpolationValue = io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue + +internal fun KMCameraInterpolationValue.asPlatform(): io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue = this +internal fun io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue.asKmp(): KMCameraInterpolationValue = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt new file mode 100644 index 000000000..0fa6c991a --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMCircleD = io.openmobilemaps.mapscore.shared.graphics.common.CircleD + +internal fun KMCircleD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.CircleD = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.CircleD.asKmp(): KMCircleD = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt new file mode 100644 index 000000000..f6d68c3ef --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMCircleF = io.openmobilemaps.mapscore.shared.graphics.common.CircleF + +internal fun KMCircleF.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.CircleF = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.CircleF.asKmp(): KMCircleF = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt new file mode 100644 index 000000000..2373fc491 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMCircleI = io.openmobilemaps.mapscore.shared.graphics.common.CircleI + +internal fun KMCircleI.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.CircleI = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.CircleI.asKmp(): KMCircleI = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt new file mode 100644 index 000000000..23a5b020f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMColor = io.openmobilemaps.mapscore.shared.graphics.common.Color + +internal fun KMColor.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Color = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Color.asKmp(): KMColor = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt new file mode 100644 index 000000000..a8fa1b6d8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMColorCircleShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface + + actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { + native.setColor(red, green, blue, alpha) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMColorCircleShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt new file mode 100644 index 000000000..cddb77fa1 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMColorShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface + + actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { + native.setColor(red, green, blue, alpha) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMColorShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt new file mode 100644 index 000000000..a55291d86 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from styling.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMColorStateList = io.openmobilemaps.mapscore.shared.map.layers.ColorStateList + +internal fun KMColorStateList.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.ColorStateList = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.ColorStateList.asKmp(): KMColorStateList = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt new file mode 100644 index 000000000..5510fd170 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMComputeObjectInterface +{ + + actual fun compute(context: KMRenderingContextInterface, vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) +} + +private class KMComputeObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface) : KMComputeObjectInterface +{ + + override fun compute(context: KMRenderingContextInterface, vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) { + nativeHandle.compute(context.asPlatform(), vpMatrix, origin.asPlatform(), screenPixelAsRealMeterFactor) + } +} + +private class KMComputeObjectInterfacePlatformProxy(private val delegate: KMComputeObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface() +{ + + override fun compute(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, vpMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, screenPixelAsRealMeterFactor: Double) { + delegate.compute(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), vpMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), screenPixelAsRealMeterFactor) + } +} + +internal fun KMComputeObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface = when (this) { + is KMComputeObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMComputeObjectInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt new file mode 100644 index 000000000..88beefc5c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMComputePassInterface +{ + + actual fun getComputeObjects(): ArrayList +} + +private class KMComputePassInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface) : KMComputePassInterface +{ + + override fun getComputeObjects(): ArrayList { + val result = nativeHandle.getComputeObjects() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface)).asKmp() }) + } +} + +private class KMComputePassInterfacePlatformProxy(private val delegate: KMComputePassInterface) : io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface() +{ + + override fun getComputeObjects(): ArrayList { + val result = delegate.getComputeObjects() + return ArrayList(result.map { it.asPlatform() }) + } +} + +internal fun KMComputePassInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface = when (this) { + is KMComputePassInterfacePlatformWrapper -> this.nativeHandle + else -> KMComputePassInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt new file mode 100644 index 000000000..24d0baf66 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMCoord = io.openmobilemaps.mapscore.shared.map.coordinates.Coord + +internal fun KMCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.Coord = this +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.Coord.asKmp(): KMCoord = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt new file mode 100644 index 000000000..cc22377e2 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -0,0 +1,56 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMCoordinateConversionHelperInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface + + actual fun registerConverter(converter: KMCoordinateConverterInterface) { + native.registerConverter(converter.asPlatform()) + } + + actual fun convert(to: Int, coordinate: KMCoord): KMCoord { + val result = native.convert(to, coordinate.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun convertRect(to: Int, rect: KMRectCoord): KMRectCoord { + val result = native.convertRect(to, rect.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() + } + + actual fun convertRectToRenderSystem(rect: KMRectCoord): KMRectCoord { + val result = native.convertRectToRenderSystem(rect.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() + } + + actual fun convertQuad(to: Int, quad: KMQuadCoord): KMQuadCoord { + val result = native.convertQuad(to, quad.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord).asKmp() + } + + actual fun convertQuadToRenderSystem(quad: KMQuadCoord): KMQuadCoord { + val result = native.convertQuadToRenderSystem(quad.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord).asKmp() + } + + actual fun convertToRenderSystem(coordinate: KMCoord): KMCoord { + val result = native.convertToRenderSystem(coordinate.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual companion object + { + + actual fun independentInstance(): KMCoordinateConversionHelperInterface { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface.independentInstance() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface)).asKmp() + } + } +} + +internal fun KMCoordinateConversionHelperInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt new file mode 100644 index 000000000..bac7dc366 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt @@ -0,0 +1,58 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMCoordinateConverterInterface +{ + + actual fun convert(coordinate: KMCoord): KMCoord + + actual fun getFrom(): Int + + actual fun getTo(): Int +} + +private class KMCoordinateConverterInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface) : KMCoordinateConverterInterface +{ + + override fun convert(coordinate: KMCoord): KMCoord { + val result = nativeHandle.convert(coordinate.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + override fun getFrom(): Int { + val result = nativeHandle.getFrom() + return result + } + + override fun getTo(): Int { + val result = nativeHandle.getTo() + return result + } +} + +private class KMCoordinateConverterInterfacePlatformProxy(private val delegate: KMCoordinateConverterInterface) : io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface() +{ + + override fun convert(coordinate: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): io.openmobilemaps.mapscore.shared.map.coordinates.Coord { + val result = delegate.convert((coordinate as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp()) + return result.asPlatform() + } + + override fun getFrom(): Int { + val result = delegate.getFrom() + return result + } + + override fun getTo(): Int { + val result = delegate.getTo() + return result + } +} + +internal fun KMCoordinateConverterInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface = when (this) { + is KMCoordinateConverterInterfacePlatformWrapper -> this.nativeHandle + else -> KMCoordinateConverterInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt new file mode 100644 index 000000000..2a5259383 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -0,0 +1,42 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMCoordinateSystemFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory + + actual companion object + { + + actual fun getEpsg2056System(): KMMapCoordinateSystem { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg2056System() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() + } + + actual fun getEpsg3857System(): KMMapCoordinateSystem { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg3857System() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() + } + + actual fun getEpsg4326System(): KMMapCoordinateSystem { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg4326System() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() + } + + actual fun getEpsg21781System(): KMMapCoordinateSystem { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg21781System() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() + } + + actual fun getUnitSphereSystem(): KMMapCoordinateSystem { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getUnitSphereSystem() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() + } + } +} + +internal fun KMCoordinateSystemFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt new file mode 100644 index 000000000..d2957ad3d --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -0,0 +1,57 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMCoordinateSystemIdentifiers actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers + + actual companion object + { + + actual fun RENDERSYSTEM(): Int { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.RENDERSYSTEM() + return result + } + + actual fun EPSG3857(): Int { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG3857() + return result + } + + actual fun EPSG4326(): Int { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG4326() + return result + } + + actual fun EPSG2056(): Int { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG2056() + return result + } + + actual fun EPSG21781(): Int { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG21781() + return result + } + + actual fun UnitSphere(): Int { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.UnitSphere() + return result + } + + actual fun fromCrsIdentifier(identifier: String): Int { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.fromCrsIdentifier(identifier) + return result + } + + actual fun unitToMeterFactor(coordinateSystemIdentifier: Int): Double { + val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.unitToMeterFactor(coordinateSystemIdentifier) + return result + } + } +} + +internal fun KMCoordinateSystemIdentifiers.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt new file mode 100644 index 000000000..511b4ef64 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMCpuPerformanceLoggerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface + + actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { + val result = native.asPerformanceLoggerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface)).asKmp() + } + + actual companion object + { + + actual fun create(): KMCpuPerformanceLoggerInterface { + val result = io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface)).asKmp() + } + + actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMCpuPerformanceLoggerInterface { + val result = io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface)).asKmp() + } + } +} + +internal fun KMCpuPerformanceLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface +internal fun io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt new file mode 100644 index 000000000..b3dda839a --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMDataLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult + +internal fun KMDataLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult.asKmp(): KMDataLoaderResult = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt new file mode 100644 index 000000000..be0c40d70 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -0,0 +1,37 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMDefaultTiled2dMapLayerConfigs actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs + + actual companion object + { + + actual fun webMercator(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.webMercator(layerName, urlFormat) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + } + + actual fun webMercatorCustom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo?, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.webMercatorCustom(layerName, urlFormat, zoomInfo?.let { it.asPlatform() }, minZoomLevel, maxZoomLevel) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + } + + actual fun epsg4326(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.epsg4326(layerName, urlFormat) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + } + + actual fun epsg4326Custom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.epsg4326Custom(layerName, urlFormat, zoomInfo.asPlatform(), minZoomLevel, maxZoomLevel) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + } + } +} + +internal fun KMDefaultTiled2dMapLayerConfigs.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt new file mode 100644 index 000000000..a60a275db --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMDefaultTouchHandlerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface + + actual companion object + { + + actual fun create(scheduler: KMSchedulerInterface, density: Float): KMTouchHandlerInterface { + val result = io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface.create(scheduler.asPlatform(), density) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface)).asKmp() + } + } +} + +internal fun KMDefaultTouchHandlerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface +internal fun io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt new file mode 100644 index 000000000..85fc38b31 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -0,0 +1,18 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMElevationInterpolationShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMElevationInterpolationShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt new file mode 100644 index 000000000..da423b661 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMErrorManager actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.ErrorManager + + actual fun addTiledLayerError(error: KMTiledLayerError) { + native.addTiledLayerError(error.asPlatform()) + } + + actual fun removeError(url: String) { + native.removeError(url) + } + + actual fun removeAllErrorsForLayer(layerName: String) { + native.removeAllErrorsForLayer(layerName) + } + + actual fun clearAllErrors() { + native.clearAllErrors() + } + + actual fun addErrorListener(listener: KMErrorManagerListener) { + native.addErrorListener(listener.asPlatform()) + } + + actual fun removeErrorListener(listener: KMErrorManagerListener) { + native.removeErrorListener(listener.asPlatform()) + } + + actual companion object + { + + actual fun create(): KMErrorManager { + val result = io.openmobilemaps.mapscore.shared.map.ErrorManager.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.ErrorManager)).asKmp() + } + } +} + +internal fun KMErrorManager.asPlatform(): io.openmobilemaps.mapscore.shared.map.ErrorManager = nativeHandle as io.openmobilemaps.mapscore.shared.map.ErrorManager +internal fun io.openmobilemaps.mapscore.shared.map.ErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt new file mode 100644 index 000000000..23c982aa0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMErrorManagerListener +{ + + actual fun onTiledLayerErrorStateChanged(errors: ArrayList) +} + +private class KMErrorManagerListenerPlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.ErrorManagerListener) : KMErrorManagerListener +{ + + override fun onTiledLayerErrorStateChanged(errors: ArrayList) { + nativeHandle.onTiledLayerErrorStateChanged(ArrayList(errors.map { it.asPlatform() })) + } +} + +private class KMErrorManagerListenerPlatformProxy(private val delegate: KMErrorManagerListener) : io.openmobilemaps.mapscore.shared.map.ErrorManagerListener() +{ + + override fun onTiledLayerErrorStateChanged(errors: ArrayList) { + delegate.onTiledLayerErrorStateChanged(ArrayList(errors.map { (it as io.openmobilemaps.mapscore.shared.map.TiledLayerError).asKmp() })) + } +} + +internal fun KMErrorManagerListener.asPlatform(): io.openmobilemaps.mapscore.shared.map.ErrorManagerListener = when (this) { + is KMErrorManagerListenerPlatformWrapper -> this.nativeHandle + else -> KMErrorManagerListenerPlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.ErrorManagerListener.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt new file mode 100644 index 000000000..b9f1b5873 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from exception_logger.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMExceptionLoggerDelegateInterface +{ + + actual fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) +} + +private class KMExceptionLoggerDelegateInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface) : KMExceptionLoggerDelegateInterface +{ + + override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { + nativeHandle.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), function, file, line) + } +} + +private class KMExceptionLoggerDelegateInterfacePlatformProxy(private val delegate: KMExceptionLoggerDelegateInterface) : io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface() +{ + + override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { + delegate.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), function, file, line) + } +} + +internal fun KMExceptionLoggerDelegateInterface.asPlatform(): io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface = when (this) { + is KMExceptionLoggerDelegateInterfacePlatformWrapper -> this.nativeHandle + else -> KMExceptionLoggerDelegateInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt new file mode 100644 index 000000000..d3b99890c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -0,0 +1,21 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from exception_logger.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMExceptionLoggerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface + + actual companion object + { + + actual fun setLoggerDelegate(delegate: KMExceptionLoggerDelegateInterface) { + io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface.setLoggerDelegate(delegate.asPlatform()) + } + } +} + +internal fun KMExceptionLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface +internal fun io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt new file mode 100644 index 000000000..539668022 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMExecutionEnvironment = io.openmobilemaps.mapscore.shared.map.scheduling.ExecutionEnvironment + +internal fun KMExecutionEnvironment.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.ExecutionEnvironment = this +internal fun io.openmobilemaps.mapscore.shared.map.scheduling.ExecutionEnvironment.asKmp(): KMExecutionEnvironment = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt new file mode 100644 index 000000000..1d1731074 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -0,0 +1,52 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMFeatureInfoValueFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory + + actual companion object + { + + actual fun createString(value: String): KMVectorLayerFeatureInfoValue { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createString(value) + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() + } + + actual fun createDouble(value: Double): KMVectorLayerFeatureInfoValue { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createDouble(value) + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() + } + + actual fun createInt(value: Long): KMVectorLayerFeatureInfoValue { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createInt(value) + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() + } + + actual fun createBool(value: Boolean): KMVectorLayerFeatureInfoValue { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createBool(value) + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() + } + + actual fun createColor(value: KMColor): KMVectorLayerFeatureInfoValue { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createColor(value.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() + } + + actual fun createListFloat(value: ArrayList): KMVectorLayerFeatureInfoValue { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createListFloat(ArrayList(value.map { it })) + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() + } + + actual fun createListString(value: ArrayList): KMVectorLayerFeatureInfoValue { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createListString(ArrayList(value.map { it })) + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() + } + } +} + +internal fun KMFeatureInfoValueFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt new file mode 100644 index 000000000..8af301f7b --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFont = io.openmobilemaps.mapscore.shared.map.loader.Font + +internal fun KMFont.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.Font = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.Font.asKmp(): KMFont = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt new file mode 100644 index 000000000..94098d1ce --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFontData = io.openmobilemaps.mapscore.shared.map.loader.FontData + +internal fun KMFontData.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontData = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontData.asKmp(): KMFontData = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt new file mode 100644 index 000000000..59f22f118 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFontGlyph = io.openmobilemaps.mapscore.shared.map.loader.FontGlyph + +internal fun KMFontGlyph.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontGlyph = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontGlyph.asKmp(): KMFontGlyph = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt new file mode 100644 index 000000000..c1a245717 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMFontLoaderInterface +{ + + actual fun loadFont(font: KMFont): KMFontLoaderResult +} + +private class KMFontLoaderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface) : KMFontLoaderInterface +{ + + override fun loadFont(font: KMFont): KMFontLoaderResult { + val result = nativeHandle.loadFont(font.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult).asKmp() + } +} + +private class KMFontLoaderInterfacePlatformProxy(private val delegate: KMFontLoaderInterface) : io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface() +{ + + override fun loadFont(font: io.openmobilemaps.mapscore.shared.map.loader.Font): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult { + val result = delegate.loadFont((font as io.openmobilemaps.mapscore.shared.map.loader.Font).asKmp()) + return result.asPlatform() + } +} + +internal fun KMFontLoaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface = when (this) { + is KMFontLoaderInterfacePlatformWrapper -> this.nativeHandle + else -> KMFontLoaderInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt new file mode 100644 index 000000000..55479e7bc --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFontLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult + +internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt new file mode 100644 index 000000000..fc98b18e0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFontWrapper = io.openmobilemaps.mapscore.shared.map.loader.FontWrapper + +internal fun KMFontWrapper.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontWrapper = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontWrapper.asKmp(): KMFontWrapper = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt new file mode 100644 index 000000000..9da63982a --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMFormattedStringEntry = io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry + +internal fun KMFormattedStringEntry.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry.asKmp(): KMFormattedStringEntry = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt new file mode 100644 index 000000000..1ad69f355 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -0,0 +1,37 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMGeoJsonFeatureParserInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface + + actual fun parse(geoJson: String): ArrayList? { + val result = native.parse(geoJson) + return result?.let { ArrayList(it.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo).asKmp() }) } + } + + actual fun parseWithPointGeometry(geoJson: String): ArrayList? { + val result = native.parseWithPointGeometry(geoJson) + return result?.let { ArrayList(it.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint).asKmp() }) } + } + + actual fun parseWithLineGeometry(geoJson: String): ArrayList? { + val result = native.parseWithLineGeometry(geoJson) + return result?.let { ArrayList(it.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine).asKmp() }) } + } + + actual companion object + { + + actual fun create(): KMGeoJsonFeatureParserInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface)).asKmp() + } + } +} + +internal fun KMGeoJsonFeatureParserInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt new file mode 100644 index 000000000..94c361565 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMGeoJsonHelperInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface + + actual fun geoJsonStringFromFeatureInfo(point: KMGeoJsonPoint): String { + val result = native.geoJsonStringFromFeatureInfo(point.asPlatform()) + return result + } + + actual fun geoJsonStringFromFeatureInfos(points: ArrayList): String { + val result = native.geoJsonStringFromFeatureInfos(ArrayList(points.map { it.asPlatform() })) + return result + } + + actual companion object + { + + actual fun independentInstance(): KMGeoJsonHelperInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface.independentInstance() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface)).asKmp() + } + } +} + +internal fun KMGeoJsonHelperInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt new file mode 100644 index 000000000..6a21e318e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMGeoJsonLine = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine + +internal fun KMGeoJsonLine.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine.asKmp(): KMGeoJsonLine = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt new file mode 100644 index 000000000..08b93df82 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMGeoJsonPoint = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint + +internal fun KMGeoJsonPoint.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint.asKmp(): KMGeoJsonPoint = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt new file mode 100644 index 000000000..e1a5d27c4 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMGlyphDescription = io.openmobilemaps.mapscore.shared.graphics.objects.GlyphDescription + +internal fun KMGlyphDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.GlyphDescription = this +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.GlyphDescription.asKmp(): KMGlyphDescription = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt new file mode 100644 index 000000000..b76eb13d0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -0,0 +1,166 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMGraphicsObjectFactoryInterface +{ + + actual fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface + + actual fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface + + actual fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface + + actual fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface + + actual fun createQuadStretchedInstanced(shader: KMShaderProgramInterface): KMQuad2dStretchedInstancedInterface + + actual fun createLineGroup(shader: KMShaderProgramInterface): KMLineGroup2dInterface + + actual fun createPolygonGroup(shader: KMShaderProgramInterface): KMPolygonGroup2dInterface + + actual fun createPolygonPatternGroup(shader: KMShaderProgramInterface): KMPolygonPatternGroup2dInterface + + actual fun createQuadMask(is3d: Boolean): KMQuad2dInterface + + actual fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface + + actual fun createText(shader: KMShaderProgramInterface): KMTextInterface + + actual fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface +} + +private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface) : KMGraphicsObjectFactoryInterface +{ + + override fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface { + val result = nativeHandle.createQuad(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface)).asKmp() + } + + override fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface { + val result = nativeHandle.createPolygon(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + } + + override fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface { + val result = nativeHandle.createIcosahedronObject(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface)).asKmp() + } + + override fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface { + val result = nativeHandle.createQuadInstanced(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface)).asKmp() + } + + override fun createQuadStretchedInstanced(shader: KMShaderProgramInterface): KMQuad2dStretchedInstancedInterface { + val result = nativeHandle.createQuadStretchedInstanced(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface)).asKmp() + } + + override fun createLineGroup(shader: KMShaderProgramInterface): KMLineGroup2dInterface { + val result = nativeHandle.createLineGroup(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface)).asKmp() + } + + override fun createPolygonGroup(shader: KMShaderProgramInterface): KMPolygonGroup2dInterface { + val result = nativeHandle.createPolygonGroup(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface)).asKmp() + } + + override fun createPolygonPatternGroup(shader: KMShaderProgramInterface): KMPolygonPatternGroup2dInterface { + val result = nativeHandle.createPolygonPatternGroup(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface)).asKmp() + } + + override fun createQuadMask(is3d: Boolean): KMQuad2dInterface { + val result = nativeHandle.createQuadMask(is3d) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface)).asKmp() + } + + override fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface { + val result = nativeHandle.createPolygonMask(is3d) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + } + + override fun createText(shader: KMShaderProgramInterface): KMTextInterface { + val result = nativeHandle.createText(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface)).asKmp() + } + + override fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface { + val result = nativeHandle.createTextInstanced(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface)).asKmp() + } +} + +private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate: KMGraphicsObjectFactoryInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface() +{ + + override fun createQuad(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface { + val result = delegate.createQuad(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createPolygon(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface { + val result = delegate.createPolygon(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createIcosahedronObject(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface { + val result = delegate.createIcosahedronObject(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createQuadInstanced(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface { + val result = delegate.createQuadInstanced(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createQuadStretchedInstanced(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface { + val result = delegate.createQuadStretchedInstanced(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createLineGroup(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface { + val result = delegate.createLineGroup(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createPolygonGroup(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface { + val result = delegate.createPolygonGroup(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createPolygonPatternGroup(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface { + val result = delegate.createPolygonPatternGroup(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createQuadMask(is3d: Boolean): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface { + val result = delegate.createQuadMask(is3d) + return result.asPlatform() + } + + override fun createPolygonMask(is3d: Boolean): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface { + val result = delegate.createPolygonMask(is3d) + return result.asPlatform() + } + + override fun createText(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface { + val result = delegate.createText(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + + override fun createTextInstanced(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface { + val result = delegate.createTextInstanced(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } +} + +internal fun KMGraphicsObjectFactoryInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface = when (this) { + is KMGraphicsObjectFactoryInterfacePlatformWrapper -> this.nativeHandle + else -> KMGraphicsObjectFactoryInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt new file mode 100644 index 000000000..e2b354c2c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -0,0 +1,84 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMGraphicsObjectInterface +{ + + actual fun isReady(): Boolean + + actual fun setup(context: KMRenderingContextInterface) + + actual fun clear() + + actual fun setIsInverseMasked(inversed: Boolean) + + actual fun setDebugLabel(label: String) + + actual fun render(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) +} + +private class KMGraphicsObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface) : KMGraphicsObjectInterface +{ + + override fun isReady(): Boolean { + val result = nativeHandle.isReady() + return result + } + + override fun setup(context: KMRenderingContextInterface) { + nativeHandle.setup(context.asPlatform()) + } + + override fun clear() { + nativeHandle.clear() + } + + override fun setIsInverseMasked(inversed: Boolean) { + nativeHandle.setIsInverseMasked(inversed) + } + + override fun setDebugLabel(label: String) { + nativeHandle.setDebugLabel(label) + } + + override fun render(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + nativeHandle.render(context.asPlatform(), renderPass.asPlatform(), vpMatrix, mMatrix, origin.asPlatform(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGraphicsObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface() +{ + + override fun isReady(): Boolean { + val result = delegate.isReady() + return result + } + + override fun setup(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface) { + delegate.setup(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp()) + } + + override fun clear() { + delegate.clear() + } + + override fun setIsInverseMasked(inversed: Boolean) { + delegate.setIsInverseMasked(inversed) + } + + override fun setDebugLabel(label: String) { + delegate.setDebugLabel(label) + } + + override fun render(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, renderPass: io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + delegate.render(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), (renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +internal fun KMGraphicsObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface = when (this) { + is KMGraphicsObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMGraphicsObjectInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt new file mode 100644 index 000000000..8a0d823a5 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMIconFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory + + actual companion object + { + + actual fun createIcon(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode): KMIconInfoInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory.createIcon(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() + } + + actual fun createIconWithAnchor(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode, iconAnchor: KMVec2F): KMIconInfoInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory.createIconWithAnchor(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform(), iconAnchor.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() + } + } +} + +internal fun KMIconFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory +internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory.asKmp(): KMIconFactory = KMIconFactory(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt new file mode 100644 index 000000000..fd3049d36 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -0,0 +1,60 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMIconInfoInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface + + actual fun getIdentifier(): String { + val result = native.getIdentifier() + return result + } + + actual fun getTexture(): KMTextureHolderInterface { + val result = native.getTexture() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() + } + + actual fun setCoordinate(coord: KMCoord) { + native.setCoordinate(coord.asPlatform()) + } + + actual fun getCoordinate(): KMCoord { + val result = native.getCoordinate() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun setIconSize(size: KMVec2F) { + native.setIconSize(size.asPlatform()) + } + + actual fun getIconSize(): KMVec2F { + val result = native.getIconSize() + return (result as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp() + } + + actual fun setType(scaleType: KMIconType) { + native.setType(scaleType.asPlatform()) + } + + actual fun getType(): KMIconType { + val result = native.getType() + return (result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconType).asKmp() + } + + actual fun getIconAnchor(): KMVec2F { + val result = native.getIconAnchor() + return (result as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp() + } + + actual fun getBlendMode(): KMBlendMode { + val result = native.getBlendMode() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode).asKmp() + } +} + +internal fun KMIconInfoInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt new file mode 100644 index 000000000..744b18daa --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMIconLayerCallbackInterface +{ + + actual fun onClickConfirmed(icons: ArrayList): Boolean + + actual fun onLongPress(icons: ArrayList): Boolean +} + +private class KMIconLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface) : KMIconLayerCallbackInterface +{ + + override fun onClickConfirmed(icons: ArrayList): Boolean { + val result = nativeHandle.onClickConfirmed(ArrayList(icons.map { it.asPlatform() })) + return result + } + + override fun onLongPress(icons: ArrayList): Boolean { + val result = nativeHandle.onLongPress(ArrayList(icons.map { it.asPlatform() })) + return result + } +} + +private class KMIconLayerCallbackInterfacePlatformProxy(private val delegate: KMIconLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface() +{ + + override fun onClickConfirmed(icons: ArrayList): Boolean { + val result = delegate.onClickConfirmed(ArrayList(icons.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() })) + return result + } + + override fun onLongPress(icons: ArrayList): Boolean { + val result = delegate.onLongPress(ArrayList(icons.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() })) + return result + } +} + +internal fun KMIconLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface = when (this) { + is KMIconLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMIconLayerCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt new file mode 100644 index 000000000..d412e7c85 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -0,0 +1,84 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMIconLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface + + actual fun setIcons(icons: ArrayList) { + native.setIcons(ArrayList(icons.map { it.asPlatform() })) + } + + actual fun getIcons(): ArrayList { + val result = native.getIcons() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() }) + } + + actual fun remove(icon: KMIconInfoInterface) { + native.remove(icon.asPlatform()) + } + + actual fun removeList(icons: ArrayList) { + native.removeList(ArrayList(icons.map { it.asPlatform() })) + } + + actual fun removeIdentifier(identifier: String) { + native.removeIdentifier(identifier) + } + + actual fun removeIdentifierList(identifiers: ArrayList) { + native.removeIdentifierList(ArrayList(identifiers.map { it })) + } + + actual fun add(icon: KMIconInfoInterface) { + native.add(icon.asPlatform()) + } + + actual fun addList(icons: ArrayList) { + native.addList(ArrayList(icons.map { it.asPlatform() })) + } + + actual fun clear() { + native.clear() + } + + actual fun setCallbackHandler(handler: KMIconLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual fun invalidate() { + native.invalidate() + } + + actual fun setLayerClickable(isLayerClickable: Boolean) { + native.setLayerClickable(isLayerClickable) + } + + actual fun setRenderPassIndex(index: Int) { + native.setRenderPassIndex(index) + } + + actual fun animateIconScale(identifier: String, from: Float, to: Float, duration: Float, repetitions: Int) { + native.animateIconScale(identifier, from, to, duration, repetitions) + } + + actual companion object + { + + actual fun create(): KMIconLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface)).asKmp() + } + } +} + +internal fun KMIconLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt new file mode 100644 index 000000000..ed6eebcbc --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMIconTextFit = io.openmobilemaps.mapscore.shared.map.layers.text.IconTextFit + +internal fun KMIconTextFit.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.IconTextFit = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.IconTextFit.asKmp(): KMIconTextFit = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt new file mode 100644 index 000000000..e37bf5dfa --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMIconType = io.openmobilemaps.mapscore.shared.map.layers.icon.IconType + +internal fun KMIconType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconType = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconType.asKmp(): KMIconType = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt new file mode 100644 index 000000000..38d402289 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -0,0 +1,44 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMIcosahedronInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMIcosahedronInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface) : KMIcosahedronInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } +} + +private class KMIcosahedronInterfacePlatformProxy(private val delegate: KMIcosahedronInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface() +{ + + override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { + delegate.setVertices((vertices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp()) + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMIcosahedronInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface = when (this) { + is KMIcosahedronInterfacePlatformWrapper -> this.nativeHandle + else -> KMIcosahedronInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt new file mode 100644 index 000000000..d2670a1b9 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icosahedron.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMIcosahedronLayerCallbackInterface +{ + + actual fun getData(): KMFuture +} + +private class KMIcosahedronLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface) : KMIcosahedronLayerCallbackInterface +{ + + override fun getData(): KMFuture { + val result = nativeHandle.getData() + return (result as com.snapchat.djinni.Future).asKmp() + } +} + +private class KMIcosahedronLayerCallbackInterfacePlatformProxy(private val delegate: KMIcosahedronLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface() +{ + + override fun getData(): com.snapchat.djinni.Future { + val result = delegate.getData() + return result.asPlatform() + } +} + +internal fun KMIcosahedronLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface = when (this) { + is KMIcosahedronLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMIcosahedronLayerCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt new file mode 100644 index 000000000..89ee5c7bc --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icosahedron.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMIcosahedronLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual companion object + { + + actual fun create(callbackHandler: KMIcosahedronLayerCallbackInterface): KMIcosahedronLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface.create(callbackHandler.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface)).asKmp() + } + } +} + +internal fun KMIcosahedronLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt new file mode 100644 index 000000000..4f05fc275 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMIndexedLayerInterface +{ + + actual fun getLayerInterface(): KMLayerInterface + + actual fun getIndex(): Int +} + +private class KMIndexedLayerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface) : KMIndexedLayerInterface +{ + + override fun getLayerInterface(): KMLayerInterface { + val result = nativeHandle.getLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + override fun getIndex(): Int { + val result = nativeHandle.getIndex() + return result + } +} + +private class KMIndexedLayerInterfacePlatformProxy(private val delegate: KMIndexedLayerInterface) : io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface() +{ + + override fun getLayerInterface(): io.openmobilemaps.mapscore.shared.map.LayerInterface { + val result = delegate.getLayerInterface() + return result.asPlatform() + } + + override fun getIndex(): Int { + val result = delegate.getIndex() + return result + } +} + +internal fun KMIndexedLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface = when (this) { + is KMIndexedLayerInterfacePlatformWrapper -> this.nativeHandle + else -> KMIndexedLayerInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt new file mode 100644 index 000000000..3d30a9653 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -0,0 +1,210 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMLayerInterface +{ + + actual fun setMaskingObject(maskingObject: KMMaskingObjectInterface?) + + actual fun update() + + actual fun buildRenderPasses(): ArrayList + + actual fun buildComputePasses(): ArrayList + + actual fun onAdded(mapInterface: KMMapInterface, layerIndex: Int) + + actual fun onRemoved() + + actual fun pause() + + actual fun resume() + + actual fun hide() + + actual fun show() + + actual fun setAlpha(alpha: Float) + + actual fun getAlpha(): Float + + actual fun setScissorRect(scissorRect: KMRectI?) + + actual fun isReadyToRenderOffscreen(): KMLayerReadyState + + actual fun enableAnimations(enabled: Boolean) + + actual fun setErrorManager(errorManager: KMErrorManager) + + actual fun forceReload() + + actual fun setPrimaryRenderTarget(target: KMRenderTargetInterface?) +} + +private class KMLayerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.LayerInterface) : KMLayerInterface +{ + + override fun setMaskingObject(maskingObject: KMMaskingObjectInterface?) { + nativeHandle.setMaskingObject(maskingObject?.let { it.asPlatform() }) + } + + override fun update() { + nativeHandle.update() + } + + override fun buildRenderPasses(): ArrayList { + val result = nativeHandle.buildRenderPasses() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface)).asKmp() }) + } + + override fun buildComputePasses(): ArrayList { + val result = nativeHandle.buildComputePasses() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface)).asKmp() }) + } + + override fun onAdded(mapInterface: KMMapInterface, layerIndex: Int) { + nativeHandle.onAdded(mapInterface.asPlatform(), layerIndex) + } + + override fun onRemoved() { + nativeHandle.onRemoved() + } + + override fun pause() { + nativeHandle.pause() + } + + override fun resume() { + nativeHandle.resume() + } + + override fun hide() { + nativeHandle.hide() + } + + override fun show() { + nativeHandle.show() + } + + override fun setAlpha(alpha: Float) { + nativeHandle.setAlpha(alpha) + } + + override fun getAlpha(): Float { + val result = nativeHandle.getAlpha() + return result + } + + override fun setScissorRect(scissorRect: KMRectI?) { + nativeHandle.setScissorRect(scissorRect?.let { it.asPlatform() }) + } + + override fun isReadyToRenderOffscreen(): KMLayerReadyState { + val result = nativeHandle.isReadyToRenderOffscreen() + return (result as io.openmobilemaps.mapscore.shared.map.LayerReadyState).asKmp() + } + + override fun enableAnimations(enabled: Boolean) { + nativeHandle.enableAnimations(enabled) + } + + override fun setErrorManager(errorManager: KMErrorManager) { + nativeHandle.setErrorManager(errorManager.asPlatform()) + } + + override fun forceReload() { + nativeHandle.forceReload() + } + + override fun setPrimaryRenderTarget(target: KMRenderTargetInterface?) { + nativeHandle.setPrimaryRenderTarget(target?.let { it.asPlatform() }) + } +} + +private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterface) : io.openmobilemaps.mapscore.shared.map.LayerInterface() +{ + + override fun setMaskingObject(maskingObject: io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface?) { + delegate.setMaskingObject(maskingObject?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() }) + } + + override fun update() { + delegate.update() + } + + override fun buildRenderPasses(): ArrayList { + val result = delegate.buildRenderPasses() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun buildComputePasses(): ArrayList { + val result = delegate.buildComputePasses() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun onAdded(mapInterface: io.openmobilemaps.mapscore.shared.map.MapInterface, layerIndex: Int) { + delegate.onAdded(requireNotNull((mapInterface as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp(), layerIndex) + } + + override fun onRemoved() { + delegate.onRemoved() + } + + override fun pause() { + delegate.pause() + } + + override fun resume() { + delegate.resume() + } + + override fun hide() { + delegate.hide() + } + + override fun show() { + delegate.show() + } + + override fun setAlpha(alpha: Float) { + delegate.setAlpha(alpha) + } + + override fun getAlpha(): Float { + val result = delegate.getAlpha() + return result + } + + override fun setScissorRect(scissorRect: io.openmobilemaps.mapscore.shared.graphics.common.RectI?) { + delegate.setScissorRect(scissorRect?.let { (it as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }) + } + + override fun isReadyToRenderOffscreen(): io.openmobilemaps.mapscore.shared.map.LayerReadyState { + val result = delegate.isReadyToRenderOffscreen() + return result.asPlatform() + } + + override fun enableAnimations(enabled: Boolean) { + delegate.enableAnimations(enabled) + } + + override fun setErrorManager(errorManager: io.openmobilemaps.mapscore.shared.map.ErrorManager) { + delegate.setErrorManager(requireNotNull((errorManager as io.openmobilemaps.mapscore.shared.map.ErrorManager)).asKmp()) + } + + override fun forceReload() { + delegate.forceReload() + } + + override fun setPrimaryRenderTarget(target: io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface?) { + delegate.setPrimaryRenderTarget(target?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() }) + } +} + +internal fun KMLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.LayerInterface = when (this) { + is KMLayerInterfacePlatformWrapper -> this.nativeHandle + else -> KMLayerInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.LayerInterface.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt new file mode 100644 index 000000000..d9ee754d5 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from layer_object.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMLayerObjectInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface + + actual fun update() { + native.update() + } + + actual fun getRenderConfig(): ArrayList { + val result = native.getRenderConfig() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface)).asKmp() }) + } +} + +internal fun KMLayerObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt new file mode 100644 index 000000000..9c3f0df2c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMLayerReadyState = io.openmobilemaps.mapscore.shared.map.LayerReadyState + +internal fun KMLayerReadyState.asPlatform(): io.openmobilemaps.mapscore.shared.map.LayerReadyState = this +internal fun io.openmobilemaps.mapscore.shared.map.LayerReadyState.asKmp(): KMLayerReadyState = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt new file mode 100644 index 000000000..bc426777e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMLineCapType = io.openmobilemaps.mapscore.shared.map.layers.line.LineCapType + +internal fun KMLineCapType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineCapType = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineCapType.asKmp(): KMLineCapType = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt new file mode 100644 index 000000000..2f1108ef5 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMLineFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory + + actual companion object + { + + actual fun createLine(identifier: String, coordinates: ArrayList, style: KMLineStyle): KMLineInfoInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory.createLine(identifier, ArrayList(coordinates.map { it.asPlatform() }), style.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface)).asKmp() + } + } +} + +internal fun KMLineFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory +internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory.asKmp(): KMLineFactory = KMLineFactory(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt new file mode 100644 index 000000000..de29970ed --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -0,0 +1,44 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMLineGroup2dInterface +{ + + actual fun setLines(lines: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMLineGroup2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface) : KMLineGroup2dInterface +{ + + override fun setLines(lines: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setLines(lines.asPlatform(), indices.asPlatform(), origin.asPlatform(), is3d) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } +} + +private class KMLineGroup2dInterfacePlatformProxy(private val delegate: KMLineGroup2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface() +{ + + override fun setLines(lines: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { + delegate.setLines((lines as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), is3d) + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMLineGroup2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface = when (this) { + is KMLineGroup2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMLineGroup2dInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt new file mode 100644 index 000000000..5736ffaa2 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMLineGroupShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface + + actual fun setStyles(styles: KMSharedBytes) { + native.setStyles(styles.asPlatform()) + } + + actual fun setDashingScaleFactor(factor: Float) { + native.setDashingScaleFactor(factor) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMLineGroupShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt new file mode 100644 index 000000000..69e60377d --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -0,0 +1,28 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMLineInfoInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface + + actual fun getIdentifier(): String { + val result = native.getIdentifier() + return result + } + + actual fun getCoordinates(): ArrayList { + val result = native.getCoordinates() + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() }) + } + + actual fun getStyle(): KMLineStyle { + val result = native.getStyle() + return (result as io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle).asKmp() + } +} + +internal fun KMLineInfoInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt new file mode 100644 index 000000000..41f56eb74 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMLineJoinType = io.openmobilemaps.mapscore.shared.map.layers.line.LineJoinType + +internal fun KMLineJoinType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineJoinType = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineJoinType.asKmp(): KMLineJoinType = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt new file mode 100644 index 000000000..e60d17747 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMLineLayerCallbackInterface +{ + + actual fun onLineClickConfirmed(line: KMLineInfoInterface) +} + +private class KMLineLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface) : KMLineLayerCallbackInterface +{ + + override fun onLineClickConfirmed(line: KMLineInfoInterface) { + nativeHandle.onLineClickConfirmed(line.asPlatform()) + } +} + +private class KMLineLayerCallbackInterfacePlatformProxy(private val delegate: KMLineLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface() +{ + + override fun onLineClickConfirmed(line: io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface) { + delegate.onLineClickConfirmed(requireNotNull((line as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface)).asKmp()) + } +} + +internal fun KMLineLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface = when (this) { + is KMLineLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMLineLayerCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt new file mode 100644 index 000000000..893de5d59 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -0,0 +1,72 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMLineLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface + + actual fun setLines(lines: ArrayList) { + native.setLines(ArrayList(lines.map { it.asPlatform() })) + } + + actual fun getLines(): ArrayList { + val result = native.getLines() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface)).asKmp() }) + } + + actual fun remove(line: KMLineInfoInterface) { + native.remove(line.asPlatform()) + } + + actual fun add(line: KMLineInfoInterface) { + native.add(line.asPlatform()) + } + + actual fun clear() { + native.clear() + } + + actual fun setCallbackHandler(handler: KMLineLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual fun invalidate() { + native.invalidate() + } + + actual fun resetSelection() { + native.resetSelection() + } + + actual fun setSelected(selectedIds: HashSet) { + native.setSelected(HashSet(selectedIds.map { it })) + } + + actual fun setLayerClickable(isLayerClickable: Boolean) { + native.setLayerClickable(isLayerClickable) + } + + actual fun setRenderPassIndex(index: Int) { + native.setRenderPassIndex(index) + } + + actual companion object + { + + actual fun create(): KMLineLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface)).asKmp() + } + } +} + +internal fun KMLineLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt new file mode 100644 index 000000000..8d3f0ff13 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMLineStyle = io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle + +internal fun KMLineStyle.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle.asKmp(): KMLineStyle = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt new file mode 100644 index 000000000..2d31ce594 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -0,0 +1,80 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMLoaderInterface +{ + + actual fun loadTexture(url: String, etag: String?): KMTextureLoaderResult + + actual fun loadData(url: String, etag: String?): KMDataLoaderResult + + actual fun loadTextureAsync(url: String, etag: String?): KMFuture + + actual fun loadDataAsync(url: String, etag: String?): KMFuture + + actual fun cancel(url: String) +} + +private class KMLoaderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface) : KMLoaderInterface +{ + + override fun loadTexture(url: String, etag: String?): KMTextureLoaderResult { + val result = nativeHandle.loadTexture(url, etag?.let { it }) + return (result as io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult).asKmp() + } + + override fun loadData(url: String, etag: String?): KMDataLoaderResult { + val result = nativeHandle.loadData(url, etag?.let { it }) + return (result as io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult).asKmp() + } + + override fun loadTextureAsync(url: String, etag: String?): KMFuture { + val result = nativeHandle.loadTextureAsync(url, etag?.let { it }) + return (result as com.snapchat.djinni.Future).asKmp() + } + + override fun loadDataAsync(url: String, etag: String?): KMFuture { + val result = nativeHandle.loadDataAsync(url, etag?.let { it }) + return (result as com.snapchat.djinni.Future).asKmp() + } + + override fun cancel(url: String) { + nativeHandle.cancel(url) + } +} + +private class KMLoaderInterfacePlatformProxy(private val delegate: KMLoaderInterface) : io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface() +{ + + override fun loadTexture(url: String, etag: String?): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult { + val result = delegate.loadTexture(url, etag?.let { it }) + return result.asPlatform() + } + + override fun loadData(url: String, etag: String?): io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult { + val result = delegate.loadData(url, etag?.let { it }) + return result.asPlatform() + } + + override fun loadTextureAsync(url: String, etag: String?): com.snapchat.djinni.Future { + val result = delegate.loadTextureAsync(url, etag?.let { it }) + return result.asPlatform() + } + + override fun loadDataAsync(url: String, etag: String?): com.snapchat.djinni.Future { + val result = delegate.loadDataAsync(url, etag?.let { it }) + return result.asPlatform() + } + + override fun cancel(url: String) { + delegate.cancel(url) + } +} + +internal fun KMLoaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface = when (this) { + is KMLoaderInterfacePlatformWrapper -> this.nativeHandle + else -> KMLoaderInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt new file mode 100644 index 000000000..aeaa4f6cd --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMLoaderStatus = io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus + +internal fun KMLoaderStatus.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus.asKmp(): KMLoaderStatus = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt new file mode 100644 index 000000000..d6d9351b8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMLoggerData = io.openmobilemaps.mapscore.shared.map.LoggerData + +internal fun KMLoggerData.asPlatform(): io.openmobilemaps.mapscore.shared.map.LoggerData = this +internal fun io.openmobilemaps.mapscore.shared.map.LoggerData.asKmp(): KMLoggerData = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt new file mode 100644 index 000000000..2727c9404 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt @@ -0,0 +1,42 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMMapCallbackInterface +{ + + actual fun invalidate() + + actual fun onMapResumed() +} + +private class KMMapCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.MapCallbackInterface) : KMMapCallbackInterface +{ + + override fun invalidate() { + nativeHandle.invalidate() + } + + override fun onMapResumed() { + nativeHandle.onMapResumed() + } +} + +private class KMMapCallbackInterfacePlatformProxy(private val delegate: KMMapCallbackInterface) : io.openmobilemaps.mapscore.shared.map.MapCallbackInterface() +{ + + override fun invalidate() { + delegate.invalidate() + } + + override fun onMapResumed() { + delegate.onMapResumed() + } +} + +internal fun KMMapCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapCallbackInterface = when (this) { + is KMMapCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMMapCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.MapCallbackInterface.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt new file mode 100644 index 000000000..b10653580 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMMapCamera3dInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface + + actual fun getCameraConfig(): KMCamera3dConfig { + val result = native.getCameraConfig() + return (result as io.openmobilemaps.mapscore.shared.map.Camera3dConfig).asKmp() + } + + actual fun setCameraConfig(config: KMCamera3dConfig, durationSeconds: Float?, targetZoom: Float?, targetCoordinate: KMCoord?) { + native.setCameraConfig(config.asPlatform(), durationSeconds?.let { it }, targetZoom?.let { it }, targetCoordinate?.let { it.asPlatform() }) + } +} + +internal fun KMMapCamera3dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface +internal fun io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt new file mode 100644 index 000000000..0ca5cac1c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -0,0 +1,237 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMMapCameraInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCameraInterface + + actual fun freeze(freeze: Boolean) { + native.freeze(freeze) + } + + actual fun moveToCenterPositionZoom(centerPosition: KMCoord, zoom: Double, animated: Boolean) { + native.moveToCenterPositionZoom(centerPosition.asPlatform(), zoom, animated) + } + + actual fun moveToCenterPosition(centerPosition: KMCoord, animated: Boolean) { + native.moveToCenterPosition(centerPosition.asPlatform(), animated) + } + + actual fun moveToBoundingBox(boundingBox: KMRectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) { + native.moveToBoundingBox(boundingBox.asPlatform(), paddingPc, animated, minZoom?.let { it }, maxZoom?.let { it }) + } + + actual fun getCenterPosition(): KMCoord { + val result = native.getCenterPosition() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun setZoom(zoom: Double, animated: Boolean) { + native.setZoom(zoom, animated) + } + + actual fun getZoom(): Double { + val result = native.getZoom() + return result + } + + actual fun setRotation(angle: Float, animated: Boolean) { + native.setRotation(angle, animated) + } + + actual fun getRotation(): Float { + val result = native.getRotation() + return result + } + + actual fun setMinZoom(minZoom: Double) { + native.setMinZoom(minZoom) + } + + actual fun setMaxZoom(maxZoom: Double) { + native.setMaxZoom(maxZoom) + } + + actual fun getMinZoom(): Double { + val result = native.getMinZoom() + return result + } + + actual fun getMaxZoom(): Double { + val result = native.getMaxZoom() + return result + } + + actual fun setBounds(bounds: KMRectCoord) { + native.setBounds(bounds.asPlatform()) + } + + actual fun getBounds(): KMRectCoord { + val result = native.getBounds() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() + } + + actual fun isInBounds(coords: KMCoord): Boolean { + val result = native.isInBounds(coords.asPlatform()) + return result + } + + actual fun setPaddingLeft(padding: Float) { + native.setPaddingLeft(padding) + } + + actual fun setPaddingRight(padding: Float) { + native.setPaddingRight(padding) + } + + actual fun setPaddingTop(padding: Float) { + native.setPaddingTop(padding) + } + + actual fun setPaddingBottom(padding: Float) { + native.setPaddingBottom(padding) + } + + actual fun getVisibleRect(): KMRectCoord { + val result = native.getVisibleRect() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() + } + + actual fun getPaddingAdjustedVisibleRect(): KMRectCoord { + val result = native.getPaddingAdjustedVisibleRect() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() + } + + actual fun getScreenDensityPpi(): Float { + val result = native.getScreenDensityPpi() + return result + } + + actual fun update() { + native.update() + } + + actual fun getInvariantModelMatrix(coordinate: KMCoord, scaleInvariant: Boolean, rotationInvariant: Boolean): ArrayList { + val result = native.getInvariantModelMatrix(coordinate.asPlatform(), scaleInvariant, rotationInvariant) + return ArrayList(result.map { it }) + } + + actual fun addListener(listener: KMMapCameraListenerInterface) { + native.addListener(listener.asPlatform()) + } + + actual fun removeListener(listener: KMMapCameraListenerInterface) { + native.removeListener(listener.asPlatform()) + } + + actual fun notifyListenerBoundsChange() { + native.notifyListenerBoundsChange() + } + + actual fun coordFromScreenPosition(posScreen: KMVec2F): KMCoord { + val result = native.coordFromScreenPosition(posScreen.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun coordFromScreenPositionZoom(posScreen: KMVec2F, zoom: Float): KMCoord { + val result = native.coordFromScreenPositionZoom(posScreen.asPlatform(), zoom) + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + actual fun screenPosFromCoord(coord: KMCoord): KMVec2F { + val result = native.screenPosFromCoord(coord.asPlatform()) + return (result as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp() + } + + actual fun screenPosFromCoordZoom(coord: KMCoord, zoom: Float): KMVec2F { + val result = native.screenPosFromCoordZoom(coord.asPlatform(), zoom) + return (result as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp() + } + + actual fun mapUnitsFromPixels(distancePx: Double): Double { + val result = native.mapUnitsFromPixels(distancePx) + return result + } + + actual fun getScalingFactor(): Double { + val result = native.getScalingFactor() + return result + } + + actual fun coordIsVisibleOnScreen(coord: KMCoord, paddingPc: Float): Boolean { + val result = native.coordIsVisibleOnScreen(coord.asPlatform(), paddingPc) + return result + } + + actual fun setRotationEnabled(enabled: Boolean) { + native.setRotationEnabled(enabled) + } + + actual fun setSnapToNorthEnabled(enabled: Boolean) { + native.setSnapToNorthEnabled(enabled) + } + + actual fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + native.setBoundsRestrictWholeVisibleRect(enabled) + } + + actual fun asCameraInterface(): KMCameraInterface { + val result = native.asCameraInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp() + } + + actual fun getLastVpMatrixD(): ArrayList? { + val result = native.getLastVpMatrixD() + return result?.let { ArrayList(it.map { it }) } + } + + actual fun getLastVpMatrix(): ArrayList? { + val result = native.getLastVpMatrix() + return result?.let { ArrayList(it.map { it }) } + } + + actual fun getLastInverseVpMatrix(): ArrayList? { + val result = native.getLastInverseVpMatrix() + return result?.let { ArrayList(it.map { it }) } + } + + actual fun getLastVpMatrixViewBounds(): KMRectCoord? { + val result = native.getLastVpMatrixViewBounds() + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() } + } + + actual fun getLastVpMatrixRotation(): Float? { + val result = native.getLastVpMatrixRotation() + return result?.let { it } + } + + actual fun getLastVpMatrixZoom(): Float? { + val result = native.getLastVpMatrixZoom() + return result?.let { it } + } + + actual fun getLastCameraPosition(): KMVec3D? { + val result = native.getLastCameraPosition() + return result?.let { (it as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp() } + } + + actual fun asMapCamera3d(): KMMapCamera3dInterface? { + val result = native.asMapCamera3d() + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface)).asKmp() } + } + + actual companion object + { + + actual fun create(mapInterface: KMMapInterface, screenDensityPpi: Float, is3D: Boolean): KMMapCameraInterface { + val result = io.openmobilemaps.mapscore.shared.map.MapCameraInterface.create(mapInterface.asPlatform(), screenDensityPpi, is3D) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapCameraInterface)).asKmp() + } + } +} + +internal fun KMMapCameraInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapCameraInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCameraInterface +internal fun io.openmobilemaps.mapscore.shared.map.MapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt new file mode 100644 index 000000000..7b7d764da --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt @@ -0,0 +1,62 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from camera.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMMapCameraListenerInterface +{ + + actual fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, zoom: Double) + + actual fun onRotationChanged(angle: Float) + + actual fun onMapInteraction() + + actual fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) +} + +private class KMMapCameraListenerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface) : KMMapCameraListenerInterface +{ + + override fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, zoom: Double) { + nativeHandle.onVisibleBoundsChanged(visibleBounds.asPlatform(), zoom) + } + + override fun onRotationChanged(angle: Float) { + nativeHandle.onRotationChanged(angle) + } + + override fun onMapInteraction() { + nativeHandle.onMapInteraction() + } + + override fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) { + nativeHandle.onCameraChange(ArrayList(viewMatrix.map { it }), ArrayList(projectionMatrix.map { it }), origin.asPlatform(), verticalFov, horizontalFov, width, height, focusPointAltitude, focusPointPosition.asPlatform(), zoom) + } +} + +private class KMMapCameraListenerInterfacePlatformProxy(private val delegate: KMMapCameraListenerInterface) : io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface() +{ + + override fun onVisibleBoundsChanged(visibleBounds: io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord, zoom: Double) { + delegate.onVisibleBoundsChanged((visibleBounds as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp(), zoom) + } + + override fun onRotationChanged(angle: Float) { + delegate.onRotationChanged(angle) + } + + override fun onMapInteraction() { + delegate.onMapInteraction() + } + + override fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: io.openmobilemaps.mapscore.shared.map.coordinates.Coord, zoom: Float) { + delegate.onCameraChange(ArrayList(viewMatrix.map { it }), ArrayList(projectionMatrix.map { it }), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), verticalFov, horizontalFov, width, height, focusPointAltitude, (focusPointPosition as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp(), zoom) + } +} + +internal fun KMMapCameraListenerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface = when (this) { + is KMMapCameraListenerInterfacePlatformWrapper -> this.nativeHandle + else -> KMMapCameraListenerInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt new file mode 100644 index 000000000..864415eed --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMMapConfig = io.openmobilemaps.mapscore.shared.map.MapConfig + +internal fun KMMapConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapConfig = this +internal fun io.openmobilemaps.mapscore.shared.map.MapConfig.asKmp(): KMMapConfig = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt new file mode 100644 index 000000000..5cd2d5ea6 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMMapCoordinateSystem = io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem + +internal fun KMMapCoordinateSystem.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem = this +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem.asKmp(): KMMapCoordinateSystem = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt new file mode 100644 index 000000000..9b70ee62c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -0,0 +1,180 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMMapInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapInterface + + actual fun setCallbackHandler(callbackInterface: KMMapCallbackInterface?) { + native.setCallbackHandler(callbackInterface?.let { it.asPlatform() }) + } + + actual fun getGraphicsObjectFactory(): KMGraphicsObjectFactoryInterface { + val result = native.getGraphicsObjectFactory() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface)).asKmp() + } + + actual fun getShaderFactory(): KMShaderFactoryInterface { + val result = native.getShaderFactory() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface)).asKmp() + } + + actual fun getScheduler(): KMSchedulerInterface { + val result = native.getScheduler() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface)).asKmp() + } + + actual fun getRenderingContext(): KMRenderingContextInterface { + val result = native.getRenderingContext() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp() + } + + actual fun getMapConfig(): KMMapConfig { + val result = native.getMapConfig() + return (result as io.openmobilemaps.mapscore.shared.map.MapConfig).asKmp() + } + + actual fun getCoordinateConverterHelper(): KMCoordinateConversionHelperInterface { + val result = native.getCoordinateConverterHelper() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface)).asKmp() + } + + actual fun setCamera(camera: KMMapCameraInterface) { + native.setCamera(camera.asPlatform()) + } + + actual fun getCamera(): KMMapCameraInterface { + val result = native.getCamera() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapCameraInterface)).asKmp() + } + + actual fun setTouchHandler(touchHandler: KMTouchHandlerInterface) { + native.setTouchHandler(touchHandler.asPlatform()) + } + + actual fun getTouchHandler(): KMTouchHandlerInterface { + val result = native.getTouchHandler() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface)).asKmp() + } + + actual fun setPerformanceLoggers(performanceLoggers: ArrayList) { + native.setPerformanceLoggers(ArrayList(performanceLoggers.map { it.asPlatform() })) + } + + actual fun getPerformanceLoggers(): ArrayList { + val result = native.getPerformanceLoggers() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface)).asKmp() }) + } + + actual fun getLayers(): ArrayList { + val result = native.getLayers() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() }) + } + + actual fun getLayersIndexed(): ArrayList { + val result = native.getLayersIndexed() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface)).asKmp() }) + } + + actual fun addLayer(layer: KMLayerInterface) { + native.addLayer(layer.asPlatform()) + } + + actual fun insertLayerAt(layer: KMLayerInterface, atIndex: Int) { + native.insertLayerAt(layer.asPlatform(), atIndex) + } + + actual fun insertLayerAbove(layer: KMLayerInterface, above: KMLayerInterface) { + native.insertLayerAbove(layer.asPlatform(), above.asPlatform()) + } + + actual fun insertLayerBelow(layer: KMLayerInterface, below: KMLayerInterface) { + native.insertLayerBelow(layer.asPlatform(), below.asPlatform()) + } + + actual fun removeLayer(layer: KMLayerInterface) { + native.removeLayer(layer.asPlatform()) + } + + actual fun setViewportSize(size: KMVec2I) { + native.setViewportSize(size.asPlatform()) + } + + actual fun setBackgroundColor(color: KMColor) { + native.setBackgroundColor(color.asPlatform()) + } + + actual fun is3d(): Boolean { + val result = native.is3d() + return result + } + + actual fun invalidate() { + native.invalidate() + } + + actual fun resetIsInvalidated() { + native.resetIsInvalidated() + } + + actual fun prepare() { + native.prepare() + } + + actual fun getNeedsCompute(): Boolean { + val result = native.getNeedsCompute() + return result + } + + actual fun drawOffscreenFrame(target: KMRenderTargetInterface) { + native.drawOffscreenFrame(target.asPlatform()) + } + + actual fun drawFrame() { + native.drawFrame() + } + + actual fun compute() { + native.compute() + } + + actual fun resume() { + native.resume() + } + + actual fun pause() { + native.pause() + } + + actual fun destroy() { + native.destroy() + } + + actual fun drawReadyFrame(bounds: KMRectCoord, paddingPc: Float, timeout: Float, callbacks: KMMapReadyCallbackInterface) { + native.drawReadyFrame(bounds.asPlatform(), paddingPc, timeout, callbacks.asPlatform()) + } + + actual fun forceReload() { + native.forceReload() + } + + actual companion object + { + + actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface, mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { + val result = io.openmobilemaps.mapscore.shared.map.MapInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform(), mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp() + } + + actual fun createWithOpenGl(mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { + val result = io.openmobilemaps.mapscore.shared.map.MapInterface.createWithOpenGl(mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp() + } + } +} + +internal fun KMMapInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapInterface +internal fun io.openmobilemaps.mapscore.shared.map.MapInterface.asKmp(): KMMapInterface = KMMapInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt new file mode 100644 index 000000000..29370d4b3 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMMapReadyCallbackInterface +{ + + actual fun stateDidUpdate(state: KMLayerReadyState) +} + +private class KMMapReadyCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface) : KMMapReadyCallbackInterface +{ + + override fun stateDidUpdate(state: KMLayerReadyState) { + nativeHandle.stateDidUpdate(state.asPlatform()) + } +} + +private class KMMapReadyCallbackInterfacePlatformProxy(private val delegate: KMMapReadyCallbackInterface) : io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface() +{ + + override fun stateDidUpdate(state: io.openmobilemaps.mapscore.shared.map.LayerReadyState) { + delegate.stateDidUpdate((state as io.openmobilemaps.mapscore.shared.map.LayerReadyState).asKmp()) + } +} + +internal fun KMMapReadyCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface = when (this) { + is KMMapReadyCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMMapReadyCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt new file mode 100644 index 000000000..ba4e9e67f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from maps_core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMMapsCoreSharedModule actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.MapsCoreSharedModule + + actual companion object + { + + actual fun version(): String { + val result = io.openmobilemaps.mapscore.shared.MapsCoreSharedModule.version() + return result + } + } +} + +internal fun KMMapsCoreSharedModule.asPlatform(): io.openmobilemaps.mapscore.shared.MapsCoreSharedModule = nativeHandle as io.openmobilemaps.mapscore.shared.MapsCoreSharedModule +internal fun io.openmobilemaps.mapscore.shared.MapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt new file mode 100644 index 000000000..15b64c848 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -0,0 +1,44 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMMaskingObjectInterface +{ + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) +} + +private class KMMaskingObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface) : KMMaskingObjectInterface +{ + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } + + override fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + nativeHandle.renderAsMask(context.asPlatform(), renderPass.asPlatform(), vpMatrix, mMatrix, origin.asPlatform(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +private class KMMaskingObjectInterfacePlatformProxy(private val delegate: KMMaskingObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface() +{ + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun renderAsMask(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, renderPass: io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + delegate.renderAsMask(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), (renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +internal fun KMMaskingObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface = when (this) { + is KMMaskingObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMMaskingObjectInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt new file mode 100644 index 000000000..766ed6fe0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMOpenGlPerformanceLoggerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface + + actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { + val result = native.asPerformanceLoggerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface)).asKmp() + } + + actual companion object + { + + actual fun create(): KMOpenGlPerformanceLoggerInterface { + val result = io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface)).asKmp() + } + + actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMOpenGlPerformanceLoggerInterface { + val result = io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface)).asKmp() + } + } +} + +internal fun KMOpenGlPerformanceLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface +internal fun io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt new file mode 100644 index 000000000..156f0de36 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -0,0 +1,86 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMOpenGlRenderTargetInterface +{ + + actual fun asRenderTargetInterface(): KMRenderTargetInterface + + actual fun setup(size: KMVec2I) + + actual fun clear() + + actual fun bindFramebuffer(renderingContext: KMRenderingContextInterface) + + actual fun unbindFramebuffer() + + actual fun getTextureId(): Int +} + +private class KMOpenGlRenderTargetInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface) : KMOpenGlRenderTargetInterface +{ + + override fun asRenderTargetInterface(): KMRenderTargetInterface { + val result = nativeHandle.asRenderTargetInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() + } + + override fun setup(size: KMVec2I) { + nativeHandle.setup(size.asPlatform()) + } + + override fun clear() { + nativeHandle.clear() + } + + override fun bindFramebuffer(renderingContext: KMRenderingContextInterface) { + nativeHandle.bindFramebuffer(renderingContext.asPlatform()) + } + + override fun unbindFramebuffer() { + nativeHandle.unbindFramebuffer() + } + + override fun getTextureId(): Int { + val result = nativeHandle.getTextureId() + return result + } +} + +private class KMOpenGlRenderTargetInterfacePlatformProxy(private val delegate: KMOpenGlRenderTargetInterface) : io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface() +{ + + override fun asRenderTargetInterface(): io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface { + val result = delegate.asRenderTargetInterface() + return result.asPlatform() + } + + override fun setup(size: io.openmobilemaps.mapscore.shared.graphics.common.Vec2I) { + delegate.setup((size as io.openmobilemaps.mapscore.shared.graphics.common.Vec2I).asKmp()) + } + + override fun clear() { + delegate.clear() + } + + override fun bindFramebuffer(renderingContext: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface) { + delegate.bindFramebuffer(requireNotNull((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp()) + } + + override fun unbindFramebuffer() { + delegate.unbindFramebuffer() + } + + override fun getTextureId(): Int { + val result = delegate.getTextureId() + return result + } +} + +internal fun KMOpenGlRenderTargetInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface = when (this) { + is KMOpenGlRenderTargetInterfacePlatformWrapper -> this.nativeHandle + else -> KMOpenGlRenderTargetInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt new file mode 100644 index 000000000..724724107 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -0,0 +1,122 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMOpenGlRenderingContextInterface +{ + + actual fun resume() + + actual fun pause() + + actual fun getCreateRenderTarget(name: String, textureFilter: KMTextureFilterType, clearColor: KMColor, usesDepthStencil: Boolean): KMOpenGlRenderTargetInterface + + actual fun deleteRenderTarget(name: String) + + actual fun getRenderTargets(): ArrayList + + actual fun getProgram(name: String): Int + + actual fun storeProgram(name: String, program: Int) + + actual fun getAspectRatio(): Float + + actual fun getDeltaTimeMs(): Long +} + +private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface) : KMOpenGlRenderingContextInterface +{ + + override fun resume() { + nativeHandle.resume() + } + + override fun pause() { + nativeHandle.pause() + } + + override fun getCreateRenderTarget(name: String, textureFilter: KMTextureFilterType, clearColor: KMColor, usesDepthStencil: Boolean): KMOpenGlRenderTargetInterface { + val result = nativeHandle.getCreateRenderTarget(name, textureFilter.asPlatform(), clearColor.asPlatform(), usesDepthStencil) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface)).asKmp() + } + + override fun deleteRenderTarget(name: String) { + nativeHandle.deleteRenderTarget(name) + } + + override fun getRenderTargets(): ArrayList { + val result = nativeHandle.getRenderTargets() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface)).asKmp() }) + } + + override fun getProgram(name: String): Int { + val result = nativeHandle.getProgram(name) + return result + } + + override fun storeProgram(name: String, program: Int) { + nativeHandle.storeProgram(name, program) + } + + override fun getAspectRatio(): Float { + val result = nativeHandle.getAspectRatio() + return result + } + + override fun getDeltaTimeMs(): Long { + val result = nativeHandle.getDeltaTimeMs() + return result + } +} + +private class KMOpenGlRenderingContextInterfacePlatformProxy(private val delegate: KMOpenGlRenderingContextInterface) : io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface() +{ + + override fun resume() { + delegate.resume() + } + + override fun pause() { + delegate.pause() + } + + override fun getCreateRenderTarget(name: String, textureFilter: io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType, clearColor: io.openmobilemaps.mapscore.shared.graphics.common.Color, usesDepthStencil: Boolean): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface { + val result = delegate.getCreateRenderTarget(name, (textureFilter as io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType).asKmp(), (clearColor as io.openmobilemaps.mapscore.shared.graphics.common.Color).asKmp(), usesDepthStencil) + return result.asPlatform() + } + + override fun deleteRenderTarget(name: String) { + delegate.deleteRenderTarget(name) + } + + override fun getRenderTargets(): ArrayList { + val result = delegate.getRenderTargets() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getProgram(name: String): Int { + val result = delegate.getProgram(name) + return result + } + + override fun storeProgram(name: String, program: Int) { + delegate.storeProgram(name, program) + } + + override fun getAspectRatio(): Float { + val result = delegate.getAspectRatio() + return result + } + + override fun getDeltaTimeMs(): Long { + val result = delegate.getDeltaTimeMs() + return result + } +} + +internal fun KMOpenGlRenderingContextInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface = when (this) { + is KMOpenGlRenderingContextInterfacePlatformWrapper -> this.nativeHandle + else -> KMOpenGlRenderingContextInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt new file mode 100644 index 000000000..2789e599d --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt @@ -0,0 +1,98 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMPerformanceLoggerInterface +{ + + actual fun getLoggerName(): String + + actual fun startLog(id: String) + + actual fun endLog(id: String) + + actual fun getStatistics(id: String): KMLoggerData? + + actual fun getAllStatistics(): ArrayList + + actual fun resetData() + + actual fun setLoggingEnabled(enabled: Boolean) +} + +private class KMPerformanceLoggerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface) : KMPerformanceLoggerInterface +{ + + override fun getLoggerName(): String { + val result = nativeHandle.getLoggerName() + return result + } + + override fun startLog(id: String) { + nativeHandle.startLog(id) + } + + override fun endLog(id: String) { + nativeHandle.endLog(id) + } + + override fun getStatistics(id: String): KMLoggerData? { + val result = nativeHandle.getStatistics(id) + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.LoggerData).asKmp() } + } + + override fun getAllStatistics(): ArrayList { + val result = nativeHandle.getAllStatistics() + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.LoggerData).asKmp() }) + } + + override fun resetData() { + nativeHandle.resetData() + } + + override fun setLoggingEnabled(enabled: Boolean) { + nativeHandle.setLoggingEnabled(enabled) + } +} + +private class KMPerformanceLoggerInterfacePlatformProxy(private val delegate: KMPerformanceLoggerInterface) : io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface() +{ + + override fun getLoggerName(): String { + val result = delegate.getLoggerName() + return result + } + + override fun startLog(id: String) { + delegate.startLog(id) + } + + override fun endLog(id: String) { + delegate.endLog(id) + } + + override fun getStatistics(id: String): io.openmobilemaps.mapscore.shared.map.LoggerData? { + val result = delegate.getStatistics(id) + return result?.let { it.asPlatform() } + } + + override fun getAllStatistics(): ArrayList { + val result = delegate.getAllStatistics() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun resetData() { + delegate.resetData() + } + + override fun setLoggingEnabled(enabled: Boolean) { + delegate.setLoggingEnabled(enabled) + } +} + +internal fun KMPerformanceLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface = when (this) { + is KMPerformanceLoggerInterfacePlatformWrapper -> this.nativeHandle + else -> KMPerformanceLoggerInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt new file mode 100644 index 000000000..13bdcbfe4 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -0,0 +1,56 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMPolygon2dInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface) : KMPolygon2dInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + } +} + +private class KMPolygon2dInterfacePlatformProxy(private val delegate: KMPolygon2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface() +{ + + override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { + delegate.setVertices((vertices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp()) + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMPolygon2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface = when (this) { + is KMPolygon2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygon2dInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt new file mode 100644 index 000000000..45672fe70 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMPolygonCoord = io.openmobilemaps.mapscore.shared.map.coordinates.PolygonCoord + +internal fun KMPolygonCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.PolygonCoord = this +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.PolygonCoord.asKmp(): KMPolygonCoord = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt new file mode 100644 index 000000000..cf3ed3f37 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -0,0 +1,44 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMPolygonGroup2dInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMPolygonGroup2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface) : KMPolygonGroup2dInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } +} + +private class KMPolygonGroup2dInterfacePlatformProxy(private val delegate: KMPolygonGroup2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface() +{ + + override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { + delegate.setVertices((vertices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp()) + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMPolygonGroup2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface = when (this) { + is KMPolygonGroup2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygonGroup2dInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt new file mode 100644 index 000000000..7e9317699 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMPolygonGroupShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface + + actual fun setStyles(styles: KMSharedBytes) { + native.setStyles(styles.asPlatform()) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMPolygonGroupShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt new file mode 100644 index 000000000..a720be953 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMPolygonInfo = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo + +internal fun KMPolygonInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo.asKmp(): KMPolygonInfo = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt new file mode 100644 index 000000000..a35483b14 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMPolygonLayerCallbackInterface +{ + + actual fun onClickConfirmed(polygon: KMPolygonInfo): Boolean + + actual fun onClickUnconfirmed(polygon: KMPolygonInfo): Boolean +} + +private class KMPolygonLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface) : KMPolygonLayerCallbackInterface +{ + + override fun onClickConfirmed(polygon: KMPolygonInfo): Boolean { + val result = nativeHandle.onClickConfirmed(polygon.asPlatform()) + return result + } + + override fun onClickUnconfirmed(polygon: KMPolygonInfo): Boolean { + val result = nativeHandle.onClickUnconfirmed(polygon.asPlatform()) + return result + } +} + +private class KMPolygonLayerCallbackInterfacePlatformProxy(private val delegate: KMPolygonLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface() +{ + + override fun onClickConfirmed(polygon: io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo): Boolean { + val result = delegate.onClickConfirmed((polygon as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo).asKmp()) + return result + } + + override fun onClickUnconfirmed(polygon: io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo): Boolean { + val result = delegate.onClickUnconfirmed((polygon as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo).asKmp()) + return result + } +} + +internal fun KMPolygonLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface = when (this) { + is KMPolygonLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygonLayerCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt new file mode 100644 index 000000000..f0eda6113 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -0,0 +1,68 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMPolygonLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface + + actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { + native.setPolygons(ArrayList(polygons.map { it.asPlatform() }), origin.asPlatform()) + } + + actual fun getPolygons(): ArrayList { + val result = native.getPolygons() + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo).asKmp() }) + } + + actual fun remove(polygon: KMPolygonInfo) { + native.remove(polygon.asPlatform()) + } + + actual fun add(polygon: KMPolygonInfo) { + native.add(polygon.asPlatform()) + } + + actual fun addAll(polygons: ArrayList) { + native.addAll(ArrayList(polygons.map { it.asPlatform() })) + } + + actual fun clear() { + native.clear() + } + + actual fun setCallbackHandler(handler: KMPolygonLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual fun resetSelection() { + native.resetSelection() + } + + actual fun setLayerClickable(isLayerClickable: Boolean) { + native.setLayerClickable(isLayerClickable) + } + + actual fun setRenderPassIndex(index: Int) { + native.setRenderPassIndex(index) + } + + actual companion object + { + + actual fun create(): KMPolygonLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface)).asKmp() + } + } +} + +internal fun KMPolygonLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt new file mode 100644 index 000000000..4d1057347 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -0,0 +1,35 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMPolygonMaskObjectInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface + + actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { + native.setPolygons(ArrayList(polygons.map { it.asPlatform() }), origin.asPlatform()) + } + + actual fun setPolygon(polygon: KMPolygonCoord, origin: KMVec3D) { + native.setPolygon(polygon.asPlatform(), origin.asPlatform()) + } + + actual fun getPolygonObject(): KMPolygon2dInterface { + val result = native.getPolygonObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + } + + actual companion object + { + + actual fun create(graphicsObjectFactory: KMGraphicsObjectFactoryInterface, conversionHelper: KMCoordinateConversionHelperInterface, is3d: Boolean): KMPolygonMaskObjectInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface.create(graphicsObjectFactory.asPlatform(), conversionHelper.asPlatform(), is3d) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface)).asKmp() + } + } +} + +internal fun KMPolygonMaskObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt new file mode 100644 index 000000000..2477accb0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -0,0 +1,104 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMPolygonPatternGroup2dInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun setOpacities(values: KMSharedBytes) + + actual fun setTextureCoordinates(values: KMSharedBytes) + + actual fun setScalingFactor(factor: Float) + + actual fun setScalingFactors(factor: KMVec2F) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMPolygonPatternGroup2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface) : KMPolygonPatternGroup2dInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun setOpacities(values: KMSharedBytes) { + nativeHandle.setOpacities(values.asPlatform()) + } + + override fun setTextureCoordinates(values: KMSharedBytes) { + nativeHandle.setTextureCoordinates(values.asPlatform()) + } + + override fun setScalingFactor(factor: Float) { + nativeHandle.setScalingFactor(factor) + } + + override fun setScalingFactors(factor: KMVec2F) { + nativeHandle.setScalingFactors(factor.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } +} + +private class KMPolygonPatternGroup2dInterfacePlatformProxy(private val delegate: KMPolygonPatternGroup2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface() +{ + + override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { + delegate.setVertices((vertices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp()) + } + + override fun setOpacities(values: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setOpacities((values as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setTextureCoordinates(values: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setTextureCoordinates((values as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setScalingFactor(factor: Float) { + delegate.setScalingFactor(factor) + } + + override fun setScalingFactors(factor: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F) { + delegate.setScalingFactors((factor as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp()) + } + + override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { + delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMPolygonPatternGroup2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface = when (this) { + is KMPolygonPatternGroup2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygonPatternGroup2dInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt new file mode 100644 index 000000000..779274629 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -0,0 +1,18 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMPolygonPatternGroupShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMPolygonPatternGroupShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt new file mode 100644 index 000000000..cf79ecb4e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMPolygonStyle = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonStyle + +internal fun KMPolygonStyle.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonStyle = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonStyle.asKmp(): KMPolygonStyle = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt new file mode 100644 index 000000000..20910e25e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMQuad2dD = io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD + +internal fun KMQuad2dD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD.asKmp(): KMQuad2dD = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt new file mode 100644 index 000000000..c9a2e026e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -0,0 +1,146 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMQuad2dInstancedInterface +{ + + actual fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + actual fun setInstanceCount(count: Int) + + actual fun setPositions(positions: KMSharedBytes) + + actual fun setScales(scales: KMSharedBytes) + + actual fun setRotations(rotations: KMSharedBytes) + + actual fun setAlphas(values: KMSharedBytes) + + actual fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + actual fun setPositionOffset(offsets: KMSharedBytes) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMQuad2dInstancedInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface) : KMQuad2dInstancedInterface +{ + + override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setInstanceCount(count: Int) { + nativeHandle.setInstanceCount(count) + } + + override fun setPositions(positions: KMSharedBytes) { + nativeHandle.setPositions(positions.asPlatform()) + } + + override fun setScales(scales: KMSharedBytes) { + nativeHandle.setScales(scales.asPlatform()) + } + + override fun setRotations(rotations: KMSharedBytes) { + nativeHandle.setRotations(rotations.asPlatform()) + } + + override fun setAlphas(values: KMSharedBytes) { + nativeHandle.setAlphas(values.asPlatform()) + } + + override fun setTextureCoordinates(textureCoordinates: KMSharedBytes) { + nativeHandle.setTextureCoordinates(textureCoordinates.asPlatform()) + } + + override fun setPositionOffset(offsets: KMSharedBytes) { + nativeHandle.setPositionOffset(offsets.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + } +} + +private class KMQuad2dInstancedInterfacePlatformProxy(private val delegate: KMQuad2dInstancedInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface() +{ + + override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { + delegate.setFrame((frame as io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), is3d) + } + + override fun setInstanceCount(count: Int) { + delegate.setInstanceCount(count) + } + + override fun setPositions(positions: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setPositions((positions as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setScales(scales: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setScales((scales as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setRotations(rotations: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setRotations((rotations as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setAlphas(values: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setAlphas((values as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setTextureCoordinates(textureCoordinates: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setTextureCoordinates((textureCoordinates as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setPositionOffset(offsets: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setPositionOffset((offsets as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { + delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMQuad2dInstancedInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface = when (this) { + is KMQuad2dInstancedInterfacePlatformWrapper -> this.nativeHandle + else -> KMQuad2dInstancedInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt new file mode 100644 index 000000000..3f8e2b225 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -0,0 +1,96 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMQuad2dInterface +{ + + actual fun setFrame(frame: KMQuad3dD, textureCoordinates: KMRectD, origin: KMVec3D, is3d: Boolean) + + actual fun setSubdivisionFactor(factor: Int) + + actual fun setMinMagFilter(filterType: KMTextureFilterType) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMQuad2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface) : KMQuad2dInterface +{ + + override fun setFrame(frame: KMQuad3dD, textureCoordinates: KMRectD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), textureCoordinates.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + nativeHandle.setSubdivisionFactor(factor) + } + + override fun setMinMagFilter(filterType: KMTextureFilterType) { + nativeHandle.setMinMagFilter(filterType.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + } +} + +private class KMQuad2dInterfacePlatformProxy(private val delegate: KMQuad2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface() +{ + + override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD, textureCoordinates: io.openmobilemaps.mapscore.shared.graphics.common.RectD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { + delegate.setFrame((frame as io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD).asKmp(), (textureCoordinates as io.openmobilemaps.mapscore.shared.graphics.common.RectD).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + delegate.setSubdivisionFactor(factor) + } + + override fun setMinMagFilter(filterType: io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType) { + delegate.setMinMagFilter((filterType as io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType).asKmp()) + } + + override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { + delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMQuad2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface = when (this) { + is KMQuad2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMQuad2dInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt new file mode 100644 index 000000000..d4fd182d6 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -0,0 +1,146 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMQuad2dStretchedInstancedInterface +{ + + actual fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + actual fun setInstanceCount(count: Int) + + actual fun setPositions(positions: KMSharedBytes) + + actual fun setScales(scales: KMSharedBytes) + + actual fun setRotations(rotations: KMSharedBytes) + + actual fun setAlphas(values: KMSharedBytes) + + actual fun setStretchInfos(values: KMSharedBytes) + + actual fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMQuad2dStretchedInstancedInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface) : KMQuad2dStretchedInstancedInterface +{ + + override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setInstanceCount(count: Int) { + nativeHandle.setInstanceCount(count) + } + + override fun setPositions(positions: KMSharedBytes) { + nativeHandle.setPositions(positions.asPlatform()) + } + + override fun setScales(scales: KMSharedBytes) { + nativeHandle.setScales(scales.asPlatform()) + } + + override fun setRotations(rotations: KMSharedBytes) { + nativeHandle.setRotations(rotations.asPlatform()) + } + + override fun setAlphas(values: KMSharedBytes) { + nativeHandle.setAlphas(values.asPlatform()) + } + + override fun setStretchInfos(values: KMSharedBytes) { + nativeHandle.setStretchInfos(values.asPlatform()) + } + + override fun setTextureCoordinates(textureCoordinates: KMSharedBytes) { + nativeHandle.setTextureCoordinates(textureCoordinates.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + } +} + +private class KMQuad2dStretchedInstancedInterfacePlatformProxy(private val delegate: KMQuad2dStretchedInstancedInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface() +{ + + override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { + delegate.setFrame((frame as io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), is3d) + } + + override fun setInstanceCount(count: Int) { + delegate.setInstanceCount(count) + } + + override fun setPositions(positions: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setPositions((positions as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setScales(scales: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setScales((scales as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setRotations(rotations: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setRotations((rotations as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setAlphas(values: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setAlphas((values as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setStretchInfos(values: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setStretchInfos((values as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setTextureCoordinates(textureCoordinates: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setTextureCoordinates((textureCoordinates as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { + delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMQuad2dStretchedInstancedInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface = when (this) { + is KMQuad2dStretchedInstancedInterfacePlatformWrapper -> this.nativeHandle + else -> KMQuad2dStretchedInstancedInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt new file mode 100644 index 000000000..bf2a3f460 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMQuad3dD = io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD + +internal fun KMQuad3dD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD.asKmp(): KMQuad3dD = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt new file mode 100644 index 000000000..8e34f1045 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMQuadCoord = io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord + +internal fun KMQuadCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord = this +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord.asKmp(): KMQuadCoord = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt new file mode 100644 index 000000000..d11f1e3d8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMRasterShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface + + actual fun setStyle(style: KMRasterShaderStyle) { + native.setStyle(style.asPlatform()) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMRasterShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt new file mode 100644 index 000000000..ef990f253 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRasterShaderStyle = io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle + +internal fun KMRasterShaderStyle.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle = this +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle.asKmp(): KMRasterShaderStyle = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt new file mode 100644 index 000000000..a15b92a93 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRectCoord = io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord + +internal fun KMRectCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord = this +internal fun io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord.asKmp(): KMRectCoord = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt new file mode 100644 index 000000000..fc798f72c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRectD = io.openmobilemaps.mapscore.shared.graphics.common.RectD + +internal fun KMRectD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.RectD = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.RectD.asKmp(): KMRectD = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt new file mode 100644 index 000000000..af4728757 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRectF = io.openmobilemaps.mapscore.shared.graphics.common.RectF + +internal fun KMRectF.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.RectF = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.RectF.asKmp(): KMRectF = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt new file mode 100644 index 000000000..602111788 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRectI = io.openmobilemaps.mapscore.shared.graphics.common.RectI + +internal fun KMRectI.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.RectI = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.RectI.asKmp(): KMRectI = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt new file mode 100644 index 000000000..cf155eefa --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMRectanglePacker actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.RectanglePacker + + actual companion object + { + + actual fun pack(rectangles: HashMap, maxPageSize: KMVec2I, spacing: Int): ArrayList { + val result = io.openmobilemaps.mapscore.shared.graphics.RectanglePacker.pack(HashMap(rectangles.map { it.key to it.value.asPlatform() }.toMap()), maxPageSize.asPlatform(), spacing) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage).asKmp() }) + } + } +} + +internal fun KMRectanglePacker.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RectanglePacker = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.RectanglePacker +internal fun io.openmobilemaps.mapscore.shared.graphics.RectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt new file mode 100644 index 000000000..c5970a83a --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRectanglePackerPage = io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage + +internal fun KMRectanglePackerPage.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage = this +internal fun io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage.asKmp(): KMRectanglePackerPage = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt new file mode 100644 index 000000000..9c0190772 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from layer_object.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMRenderConfigInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface + + actual fun getGraphicsObject(): KMGraphicsObjectInterface { + val result = native.getGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } + + actual fun getRenderIndex(): Int { + val result = native.getRenderIndex() + return result + } +} + +internal fun KMRenderConfigInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt new file mode 100644 index 000000000..6bcfd5210 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRenderLineDescription = io.openmobilemaps.mapscore.shared.graphics.objects.RenderLineDescription + +internal fun KMRenderLineDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.RenderLineDescription = this +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.RenderLineDescription.asKmp(): KMRenderLineDescription = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt new file mode 100644 index 000000000..26475e824 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -0,0 +1,92 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMRenderObjectInterface +{ + + actual fun getGraphicsObject(): KMGraphicsObjectInterface + + actual fun hasCustomModelMatrix(): Boolean + + actual fun isScreenSpaceCoords(): Boolean + + actual fun getCustomModelMatrix(): ArrayList + + actual fun setHidden(hidden: Boolean) + + actual fun isHidden(): Boolean +} + +private class KMRenderObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface) : KMRenderObjectInterface +{ + + override fun getGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.getGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } + + override fun hasCustomModelMatrix(): Boolean { + val result = nativeHandle.hasCustomModelMatrix() + return result + } + + override fun isScreenSpaceCoords(): Boolean { + val result = nativeHandle.isScreenSpaceCoords() + return result + } + + override fun getCustomModelMatrix(): ArrayList { + val result = nativeHandle.getCustomModelMatrix() + return ArrayList(result.map { it }) + } + + override fun setHidden(hidden: Boolean) { + nativeHandle.setHidden(hidden) + } + + override fun isHidden(): Boolean { + val result = nativeHandle.isHidden() + return result + } +} + +private class KMRenderObjectInterfacePlatformProxy(private val delegate: KMRenderObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface() +{ + + override fun getGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.getGraphicsObject() + return result.asPlatform() + } + + override fun hasCustomModelMatrix(): Boolean { + val result = delegate.hasCustomModelMatrix() + return result + } + + override fun isScreenSpaceCoords(): Boolean { + val result = delegate.isScreenSpaceCoords() + return result + } + + override fun getCustomModelMatrix(): ArrayList { + val result = delegate.getCustomModelMatrix() + return ArrayList(result.map { it }) + } + + override fun setHidden(hidden: Boolean) { + delegate.setHidden(hidden) + } + + override fun isHidden(): Boolean { + val result = delegate.isHidden() + return result + } +} + +internal fun KMRenderObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface = when (this) { + is KMRenderObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderObjectInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt new file mode 100644 index 000000000..2f5318e64 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRenderPassConfig = io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig + +internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig = this +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt new file mode 100644 index 000000000..c44971c32 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -0,0 +1,80 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMRenderPassInterface +{ + + actual fun getRenderObjects(): ArrayList + + actual fun addRenderObject(renderObject: KMRenderObjectInterface) + + actual fun getRenderPassConfig(): KMRenderPassConfig + + actual fun getMaskingObject(): KMMaskingObjectInterface? + + actual fun getScissoringRect(): KMRectI? +} + +private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface) : KMRenderPassInterface +{ + + override fun getRenderObjects(): ArrayList { + val result = nativeHandle.getRenderObjects() + return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface)).asKmp() }) + } + + override fun addRenderObject(renderObject: KMRenderObjectInterface) { + nativeHandle.addRenderObject(renderObject.asPlatform()) + } + + override fun getRenderPassConfig(): KMRenderPassConfig { + val result = nativeHandle.getRenderPassConfig() + return (result as io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig).asKmp() + } + + override fun getMaskingObject(): KMMaskingObjectInterface? { + val result = nativeHandle.getMaskingObject() + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() } + } + + override fun getScissoringRect(): KMRectI? { + val result = nativeHandle.getScissoringRect() + return result?.let { (it as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() } + } +} + +private class KMRenderPassInterfacePlatformProxy(private val delegate: KMRenderPassInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface() +{ + + override fun getRenderObjects(): ArrayList { + val result = delegate.getRenderObjects() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun addRenderObject(renderObject: io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface) { + delegate.addRenderObject(requireNotNull((renderObject as io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface)).asKmp()) + } + + override fun getRenderPassConfig(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig { + val result = delegate.getRenderPassConfig() + return result.asPlatform() + } + + override fun getMaskingObject(): io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface? { + val result = delegate.getMaskingObject() + return result?.let { it.asPlatform() } + } + + override fun getScissoringRect(): io.openmobilemaps.mapscore.shared.graphics.common.RectI? { + val result = delegate.getScissoringRect() + return result?.let { it.asPlatform() } + } +} + +internal fun KMRenderPassInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface = when (this) { + is KMRenderPassInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderPassInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt new file mode 100644 index 000000000..7a9b607a4 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMRenderTargetInterface +{ + + actual fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? +} + +private class KMRenderTargetInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface) : KMRenderTargetInterface +{ + + override fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? { + val result = nativeHandle.asGlRenderTargetInterface() + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface)).asKmp() } + } +} + +private class KMRenderTargetInterfacePlatformProxy(private val delegate: KMRenderTargetInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface() +{ + + override fun asGlRenderTargetInterface(): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface? { + val result = delegate.asGlRenderTargetInterface() + return result?.let { it.asPlatform() } + } +} + +internal fun KMRenderTargetInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface = when (this) { + is KMRenderTargetInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderTargetInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt new file mode 100644 index 000000000..ea7e90141 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRenderVerticesDescription = io.openmobilemaps.mapscore.shared.graphics.objects.RenderVerticesDescription + +internal fun KMRenderVerticesDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.RenderVerticesDescription = this +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.RenderVerticesDescription.asKmp(): KMRenderVerticesDescription = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt new file mode 100644 index 000000000..29caf603e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -0,0 +1,62 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMRendererInterface +{ + + actual fun addToRenderQueue(renderPass: KMRenderPassInterface) + + actual fun addToComputeQueue(computePass: KMComputePassInterface) + + actual fun drawFrame(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface, target: KMRenderTargetInterface?) + + actual fun compute(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface) +} + +private class KMRendererInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RendererInterface) : KMRendererInterface +{ + + override fun addToRenderQueue(renderPass: KMRenderPassInterface) { + nativeHandle.addToRenderQueue(renderPass.asPlatform()) + } + + override fun addToComputeQueue(computePass: KMComputePassInterface) { + nativeHandle.addToComputeQueue(computePass.asPlatform()) + } + + override fun drawFrame(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface, target: KMRenderTargetInterface?) { + nativeHandle.drawFrame(renderingContext.asPlatform(), camera.asPlatform(), target?.let { it.asPlatform() }) + } + + override fun compute(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface) { + nativeHandle.compute(renderingContext.asPlatform(), camera.asPlatform()) + } +} + +private class KMRendererInterfacePlatformProxy(private val delegate: KMRendererInterface) : io.openmobilemaps.mapscore.shared.graphics.RendererInterface() +{ + + override fun addToRenderQueue(renderPass: io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface) { + delegate.addToRenderQueue(requireNotNull((renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface)).asKmp()) + } + + override fun addToComputeQueue(computePass: io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface) { + delegate.addToComputeQueue(requireNotNull((computePass as io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface)).asKmp()) + } + + override fun drawFrame(renderingContext: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, camera: io.openmobilemaps.mapscore.shared.graphics.CameraInterface, target: io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface?) { + delegate.drawFrame(requireNotNull((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((camera as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp(), target?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() }) + } + + override fun compute(renderingContext: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, camera: io.openmobilemaps.mapscore.shared.graphics.CameraInterface) { + delegate.compute(requireNotNull((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((camera as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp()) + } +} + +internal fun KMRendererInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RendererInterface = when (this) { + is KMRendererInterfacePlatformWrapper -> this.nativeHandle + else -> KMRendererInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.RendererInterface.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt new file mode 100644 index 000000000..d090e8c61 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -0,0 +1,126 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMRenderingContextInterface +{ + + actual fun onSurfaceCreated() + + actual fun setViewportSize(size: KMVec2I) + + actual fun getViewportSize(): KMVec2I + + actual fun setBackgroundColor(color: KMColor) + + actual fun setCulling(mode: KMRenderingCullMode) + + actual fun setupDrawFrame(vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) + + actual fun preRenderStencilMask() + + actual fun postRenderStencilMask() + + actual fun applyScissorRect(scissorRect: KMRectI?) + + actual fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? +} + +private class KMRenderingContextInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface) : KMRenderingContextInterface +{ + + override fun onSurfaceCreated() { + nativeHandle.onSurfaceCreated() + } + + override fun setViewportSize(size: KMVec2I) { + nativeHandle.setViewportSize(size.asPlatform()) + } + + override fun getViewportSize(): KMVec2I { + val result = nativeHandle.getViewportSize() + return (result as io.openmobilemaps.mapscore.shared.graphics.common.Vec2I).asKmp() + } + + override fun setBackgroundColor(color: KMColor) { + nativeHandle.setBackgroundColor(color.asPlatform()) + } + + override fun setCulling(mode: KMRenderingCullMode) { + nativeHandle.setCulling(mode.asPlatform()) + } + + override fun setupDrawFrame(vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) { + nativeHandle.setupDrawFrame(vpMatrix, origin.asPlatform(), screenPixelAsRealMeterFactor) + } + + override fun preRenderStencilMask() { + nativeHandle.preRenderStencilMask() + } + + override fun postRenderStencilMask() { + nativeHandle.postRenderStencilMask() + } + + override fun applyScissorRect(scissorRect: KMRectI?) { + nativeHandle.applyScissorRect(scissorRect?.let { it.asPlatform() }) + } + + override fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? { + val result = nativeHandle.asOpenGlRenderingContext() + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface)).asKmp() } + } +} + +private class KMRenderingContextInterfacePlatformProxy(private val delegate: KMRenderingContextInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface() +{ + + override fun onSurfaceCreated() { + delegate.onSurfaceCreated() + } + + override fun setViewportSize(size: io.openmobilemaps.mapscore.shared.graphics.common.Vec2I) { + delegate.setViewportSize((size as io.openmobilemaps.mapscore.shared.graphics.common.Vec2I).asKmp()) + } + + override fun getViewportSize(): io.openmobilemaps.mapscore.shared.graphics.common.Vec2I { + val result = delegate.getViewportSize() + return result.asPlatform() + } + + override fun setBackgroundColor(color: io.openmobilemaps.mapscore.shared.graphics.common.Color) { + delegate.setBackgroundColor((color as io.openmobilemaps.mapscore.shared.graphics.common.Color).asKmp()) + } + + override fun setCulling(mode: io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode) { + delegate.setCulling((mode as io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode).asKmp()) + } + + override fun setupDrawFrame(vpMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, screenPixelAsRealMeterFactor: Double) { + delegate.setupDrawFrame(vpMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), screenPixelAsRealMeterFactor) + } + + override fun preRenderStencilMask() { + delegate.preRenderStencilMask() + } + + override fun postRenderStencilMask() { + delegate.postRenderStencilMask() + } + + override fun applyScissorRect(scissorRect: io.openmobilemaps.mapscore.shared.graphics.common.RectI?) { + delegate.applyScissorRect(scissorRect?.let { (it as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }) + } + + override fun asOpenGlRenderingContext(): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface? { + val result = delegate.asOpenGlRenderingContext() + return result?.let { it.asPlatform() } + } +} + +internal fun KMRenderingContextInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface = when (this) { + is KMRenderingContextInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderingContextInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt new file mode 100644 index 000000000..f1e42e8b8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMRenderingCullMode = io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode + +internal fun KMRenderingCullMode.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode = this +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode.asKmp(): KMRenderingCullMode = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt new file mode 100644 index 000000000..cb34983b1 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from reverse_geocoder.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMReverseGeocoderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface + + actual fun reverseGeocode(coord: KMCoord, thresholdMeters: Long): ArrayList { + val result = native.reverseGeocode(coord.asPlatform(), thresholdMeters) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo).asKmp() }) + } + + actual fun reverseGeocodeClosest(coord: KMCoord, thresholdMeters: Long): KMVectorLayerFeatureCoordInfo? { + val result = native.reverseGeocodeClosest(coord.asPlatform(), thresholdMeters) + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo).asKmp() } + } + + actual companion object + { + + actual fun create(loader: KMLoaderInterface, tileUrlTemplate: String, zoomLevel: Int): KMReverseGeocoderInterface { + val result = io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface.create(loader.asPlatform(), tileUrlTemplate, zoomLevel) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface)).asKmp() + } + } +} + +internal fun KMReverseGeocoderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface +internal fun io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt new file mode 100644 index 000000000..54f219337 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMSceneCallbackInterface +{ + + actual fun invalidate() +} + +private class KMSceneCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface) : KMSceneCallbackInterface +{ + + override fun invalidate() { + nativeHandle.invalidate() + } +} + +private class KMSceneCallbackInterfacePlatformProxy(private val delegate: KMSceneCallbackInterface) : io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface() +{ + + override fun invalidate() { + delegate.invalidate() + } +} + +internal fun KMSceneCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface = when (this) { + is KMSceneCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMSceneCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt new file mode 100644 index 000000000..387023c76 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -0,0 +1,80 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMSceneInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.SceneInterface + + actual fun setCallbackHandler(callbackInterface: KMSceneCallbackInterface) { + native.setCallbackHandler(callbackInterface.asPlatform()) + } + + actual fun setCamera(camera: KMCameraInterface) { + native.setCamera(camera.asPlatform()) + } + + actual fun getCamera(): KMCameraInterface { + val result = native.getCamera() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp() + } + + actual fun getRenderer(): KMRendererInterface { + val result = native.getRenderer() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RendererInterface)).asKmp() + } + + actual fun getRenderingContext(): KMRenderingContextInterface { + val result = native.getRenderingContext() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp() + } + + actual fun getGraphicsFactory(): KMGraphicsObjectFactoryInterface { + val result = native.getGraphicsFactory() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface)).asKmp() + } + + actual fun getShaderFactory(): KMShaderFactoryInterface { + val result = native.getShaderFactory() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface)).asKmp() + } + + actual fun prepare() { + native.prepare() + } + + actual fun drawFrame(target: KMRenderTargetInterface?) { + native.drawFrame(target?.let { it.asPlatform() }) + } + + actual fun compute() { + native.compute() + } + + actual fun clear() { + native.clear() + } + + actual fun invalidate() { + native.invalidate() + } + + actual companion object + { + + actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface): KMSceneInterface { + val result = io.openmobilemaps.mapscore.shared.graphics.SceneInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface)).asKmp() + } + + actual fun createWithOpenGl(): KMSceneInterface { + val result = io.openmobilemaps.mapscore.shared.graphics.SceneInterface.createWithOpenGl() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface)).asKmp() + } + } +} + +internal fun KMSceneInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.SceneInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.SceneInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.SceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt new file mode 100644 index 000000000..db9b5ba19 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMSchedulerGraphicsTaskCallbacks actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks + + actual fun requestGraphicsTaskExecution() { + native.requestGraphicsTaskExecution() + } +} + +internal fun KMSchedulerGraphicsTaskCallbacks.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks +internal fun io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt new file mode 100644 index 000000000..92a56327e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -0,0 +1,126 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMSchedulerInterface +{ + + actual fun addTask(task: KMTaskInterface) + + actual fun addTasks(tasks: ArrayList) + + actual fun removeTask(id: String) + + actual fun clear() + + actual fun pause() + + actual fun resume() + + actual fun destroy() + + actual fun hasSeparateGraphicsInvocation(): Boolean + + actual fun runGraphicsTasks(): Boolean + + actual fun setSchedulerGraphicsTaskCallbacks(callbacks: KMSchedulerGraphicsTaskCallbacks) +} + +private class KMSchedulerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface) : KMSchedulerInterface +{ + + override fun addTask(task: KMTaskInterface) { + nativeHandle.addTask(task.asPlatform()) + } + + override fun addTasks(tasks: ArrayList) { + nativeHandle.addTasks(ArrayList(tasks.map { it.asPlatform() })) + } + + override fun removeTask(id: String) { + nativeHandle.removeTask(id) + } + + override fun clear() { + nativeHandle.clear() + } + + override fun pause() { + nativeHandle.pause() + } + + override fun resume() { + nativeHandle.resume() + } + + override fun destroy() { + nativeHandle.destroy() + } + + override fun hasSeparateGraphicsInvocation(): Boolean { + val result = nativeHandle.hasSeparateGraphicsInvocation() + return result + } + + override fun runGraphicsTasks(): Boolean { + val result = nativeHandle.runGraphicsTasks() + return result + } + + override fun setSchedulerGraphicsTaskCallbacks(callbacks: KMSchedulerGraphicsTaskCallbacks) { + nativeHandle.setSchedulerGraphicsTaskCallbacks(callbacks.asPlatform()) + } +} + +private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedulerInterface) : io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface() +{ + + override fun addTask(task: io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface) { + delegate.addTask(requireNotNull((task as io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface)).asKmp()) + } + + override fun addTasks(tasks: ArrayList) { + delegate.addTasks(ArrayList(tasks.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface)).asKmp() })) + } + + override fun removeTask(id: String) { + delegate.removeTask(id) + } + + override fun clear() { + delegate.clear() + } + + override fun pause() { + delegate.pause() + } + + override fun resume() { + delegate.resume() + } + + override fun destroy() { + delegate.destroy() + } + + override fun hasSeparateGraphicsInvocation(): Boolean { + val result = delegate.hasSeparateGraphicsInvocation() + return result + } + + override fun runGraphicsTasks(): Boolean { + val result = delegate.runGraphicsTasks() + return result + } + + override fun setSchedulerGraphicsTaskCallbacks(callbacks: io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks) { + delegate.setSchedulerGraphicsTaskCallbacks(requireNotNull((callbacks as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks)).asKmp()) + } +} + +internal fun KMSchedulerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface = when (this) { + is KMSchedulerInterfacePlatformWrapper -> this.nativeHandle + else -> KMSchedulerInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt new file mode 100644 index 000000000..969a91219 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -0,0 +1,322 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMShaderFactoryInterface +{ + + actual fun createAlphaShader(): KMAlphaShaderInterface + + actual fun createUnitSphereAlphaShader(): KMAlphaShaderInterface + + actual fun createAlphaInstancedShader(): KMAlphaInstancedShaderInterface + + actual fun createUnitSphereAlphaInstancedShader(): KMAlphaInstancedShaderInterface + + actual fun createLineGroupShader(): KMLineGroupShaderInterface + + actual fun createUnitSphereLineGroupShader(): KMLineGroupShaderInterface + + actual fun createSimpleLineGroupShader(): KMLineGroupShaderInterface + + actual fun createUnitSphereSimpleLineGroupShader(): KMLineGroupShaderInterface + + actual fun createUnitSphereColorShader(): KMColorShaderInterface + + actual fun createColorShader(): KMColorShaderInterface + + actual fun createColorCircleShader(): KMColorCircleShaderInterface + + actual fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface + + actual fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): KMPolygonGroupShaderInterface + + actual fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): KMPolygonPatternGroupShaderInterface + + actual fun createTextShader(): KMTextShaderInterface + + actual fun createTextInstancedShader(): KMTextInstancedShaderInterface + + actual fun createUnitSphereTextInstancedShader(): KMTextInstancedShaderInterface + + actual fun createRasterShader(): KMRasterShaderInterface + + actual fun createUnitSphereRasterShader(): KMRasterShaderInterface + + actual fun createStretchShader(): KMStretchShaderInterface + + actual fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface + + actual fun createIcosahedronColorShader(): KMColorShaderInterface + + actual fun createSphereEffectShader(): KMSphereEffectShaderInterface + + actual fun createSkySphereShader(): KMSkySphereShaderInterface + + actual fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface +} + +private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface) : KMShaderFactoryInterface +{ + + override fun createAlphaShader(): KMAlphaShaderInterface { + val result = nativeHandle.createAlphaShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface)).asKmp() + } + + override fun createUnitSphereAlphaShader(): KMAlphaShaderInterface { + val result = nativeHandle.createUnitSphereAlphaShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface)).asKmp() + } + + override fun createAlphaInstancedShader(): KMAlphaInstancedShaderInterface { + val result = nativeHandle.createAlphaInstancedShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface)).asKmp() + } + + override fun createUnitSphereAlphaInstancedShader(): KMAlphaInstancedShaderInterface { + val result = nativeHandle.createUnitSphereAlphaInstancedShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface)).asKmp() + } + + override fun createLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createLineGroupShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + } + + override fun createUnitSphereLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createUnitSphereLineGroupShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + } + + override fun createSimpleLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createSimpleLineGroupShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + } + + override fun createUnitSphereSimpleLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createUnitSphereSimpleLineGroupShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + } + + override fun createUnitSphereColorShader(): KMColorShaderInterface { + val result = nativeHandle.createUnitSphereColorShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + } + + override fun createColorShader(): KMColorShaderInterface { + val result = nativeHandle.createColorShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + } + + override fun createColorCircleShader(): KMColorCircleShaderInterface { + val result = nativeHandle.createColorCircleShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface)).asKmp() + } + + override fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface { + val result = nativeHandle.createUnitSphereColorCircleShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface)).asKmp() + } + + override fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): KMPolygonGroupShaderInterface { + val result = nativeHandle.createPolygonGroupShader(isStriped, unitSphere) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface)).asKmp() + } + + override fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): KMPolygonPatternGroupShaderInterface { + val result = nativeHandle.createPolygonPatternGroupShader(fadeInPattern, unitSphere) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface)).asKmp() + } + + override fun createTextShader(): KMTextShaderInterface { + val result = nativeHandle.createTextShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface)).asKmp() + } + + override fun createTextInstancedShader(): KMTextInstancedShaderInterface { + val result = nativeHandle.createTextInstancedShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface)).asKmp() + } + + override fun createUnitSphereTextInstancedShader(): KMTextInstancedShaderInterface { + val result = nativeHandle.createUnitSphereTextInstancedShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface)).asKmp() + } + + override fun createRasterShader(): KMRasterShaderInterface { + val result = nativeHandle.createRasterShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface)).asKmp() + } + + override fun createUnitSphereRasterShader(): KMRasterShaderInterface { + val result = nativeHandle.createUnitSphereRasterShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface)).asKmp() + } + + override fun createStretchShader(): KMStretchShaderInterface { + val result = nativeHandle.createStretchShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface)).asKmp() + } + + override fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface { + val result = nativeHandle.createStretchInstancedShader(unitSphere) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface)).asKmp() + } + + override fun createIcosahedronColorShader(): KMColorShaderInterface { + val result = nativeHandle.createIcosahedronColorShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + } + + override fun createSphereEffectShader(): KMSphereEffectShaderInterface { + val result = nativeHandle.createSphereEffectShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface)).asKmp() + } + + override fun createSkySphereShader(): KMSkySphereShaderInterface { + val result = nativeHandle.createSkySphereShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface)).asKmp() + } + + override fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface { + val result = nativeHandle.createElevationInterpolationShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface)).asKmp() + } +} + +private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShaderFactoryInterface) : io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface() +{ + + override fun createAlphaShader(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface { + val result = delegate.createAlphaShader() + return result.asPlatform() + } + + override fun createUnitSphereAlphaShader(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface { + val result = delegate.createUnitSphereAlphaShader() + return result.asPlatform() + } + + override fun createAlphaInstancedShader(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface { + val result = delegate.createAlphaInstancedShader() + return result.asPlatform() + } + + override fun createUnitSphereAlphaInstancedShader(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface { + val result = delegate.createUnitSphereAlphaInstancedShader() + return result.asPlatform() + } + + override fun createLineGroupShader(): io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface { + val result = delegate.createLineGroupShader() + return result.asPlatform() + } + + override fun createUnitSphereLineGroupShader(): io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface { + val result = delegate.createUnitSphereLineGroupShader() + return result.asPlatform() + } + + override fun createSimpleLineGroupShader(): io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface { + val result = delegate.createSimpleLineGroupShader() + return result.asPlatform() + } + + override fun createUnitSphereSimpleLineGroupShader(): io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface { + val result = delegate.createUnitSphereSimpleLineGroupShader() + return result.asPlatform() + } + + override fun createUnitSphereColorShader(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface { + val result = delegate.createUnitSphereColorShader() + return result.asPlatform() + } + + override fun createColorShader(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface { + val result = delegate.createColorShader() + return result.asPlatform() + } + + override fun createColorCircleShader(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface { + val result = delegate.createColorCircleShader() + return result.asPlatform() + } + + override fun createUnitSphereColorCircleShader(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface { + val result = delegate.createUnitSphereColorCircleShader() + return result.asPlatform() + } + + override fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface { + val result = delegate.createPolygonGroupShader(isStriped, unitSphere) + return result.asPlatform() + } + + override fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface { + val result = delegate.createPolygonPatternGroupShader(fadeInPattern, unitSphere) + return result.asPlatform() + } + + override fun createTextShader(): io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface { + val result = delegate.createTextShader() + return result.asPlatform() + } + + override fun createTextInstancedShader(): io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface { + val result = delegate.createTextInstancedShader() + return result.asPlatform() + } + + override fun createUnitSphereTextInstancedShader(): io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface { + val result = delegate.createUnitSphereTextInstancedShader() + return result.asPlatform() + } + + override fun createRasterShader(): io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface { + val result = delegate.createRasterShader() + return result.asPlatform() + } + + override fun createUnitSphereRasterShader(): io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface { + val result = delegate.createUnitSphereRasterShader() + return result.asPlatform() + } + + override fun createStretchShader(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface { + val result = delegate.createStretchShader() + return result.asPlatform() + } + + override fun createStretchInstancedShader(unitSphere: Boolean): io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface { + val result = delegate.createStretchInstancedShader(unitSphere) + return result.asPlatform() + } + + override fun createIcosahedronColorShader(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface { + val result = delegate.createIcosahedronColorShader() + return result.asPlatform() + } + + override fun createSphereEffectShader(): io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface { + val result = delegate.createSphereEffectShader() + return result.asPlatform() + } + + override fun createSkySphereShader(): io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface { + val result = delegate.createSkySphereShader() + return result.asPlatform() + } + + override fun createElevationInterpolationShader(): io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface { + val result = delegate.createElevationInterpolationShader() + return result.asPlatform() + } +} + +internal fun KMShaderFactoryInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface = when (this) { + is KMShaderFactoryInterfacePlatformWrapper -> this.nativeHandle + else -> KMShaderFactoryInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt new file mode 100644 index 000000000..2fda3d129 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -0,0 +1,35 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMShaderProgramInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface + + actual fun getProgramName(): String { + val result = native.getProgramName() + return result + } + + actual fun setupProgram(context: KMRenderingContextInterface) { + native.setupProgram(context.asPlatform()) + } + + actual fun preRender(context: KMRenderingContextInterface, isScreenSpaceCoords: Boolean) { + native.preRender(context.asPlatform(), isScreenSpaceCoords) + } + + actual fun setBlendMode(blendMode: KMBlendMode) { + native.setBlendMode(blendMode.asPlatform()) + } + + actual fun usesModelMatrix(): Boolean { + val result = native.usesModelMatrix() + return result + } +} + +internal fun KMShaderProgramInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt new file mode 100644 index 000000000..5d0ad0aa6 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMSharedBytes = io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes + +internal fun KMSharedBytes.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes.asKmp(): KMSharedBytes = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt new file mode 100644 index 000000000..fdb8408e2 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from styling.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMSizeType = io.openmobilemaps.mapscore.shared.map.layers.SizeType + +internal fun KMSizeType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.SizeType = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.SizeType.asKmp(): KMSizeType = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt new file mode 100644 index 000000000..87e5d185f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from sky_sphere.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMSkySphereLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual fun setTexture(texture: KMTextureHolderInterface) { + native.setTexture(texture.asPlatform()) + } + + actual companion object + { + + actual fun create(): KMSkySphereLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface)).asKmp() + } + } +} + +internal fun KMSkySphereLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt new file mode 100644 index 000000000..0431f3f98 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMSkySphereShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } + + actual fun setCameraProperties(inverseVP: ArrayList, cameraPosition: KMVec3D) { + native.setCameraProperties(ArrayList(inverseVP.map { it }), cameraPosition.asPlatform()) + } +} + +internal fun KMSkySphereShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt new file mode 100644 index 000000000..81befee97 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from sphere_effect.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMSphereEffectLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual companion object + { + + actual fun create(): KMSphereEffectLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface)).asKmp() + } + } +} + +internal fun KMSphereEffectLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt new file mode 100644 index 000000000..66f351d10 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMSphereEffectShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } + + actual fun setEllipse(coefficients: KMSharedBytes) { + native.setEllipse(coefficients.asPlatform()) + } +} + +internal fun KMSphereEffectShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt new file mode 100644 index 000000000..b2f295d21 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -0,0 +1,18 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMStretchInstancedShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMStretchInstancedShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt new file mode 100644 index 000000000..370fe7335 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMStretchShaderInfo = io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInfo + +internal fun KMStretchShaderInfo.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInfo = this +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInfo.asKmp(): KMStretchShaderInfo = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt new file mode 100644 index 000000000..da2692dc8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMStretchShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface + + actual fun updateAlpha(value: Float) { + native.updateAlpha(value) + } + + actual fun updateStretchInfo(info: KMStretchShaderInfo) { + native.updateStretchInfo(info.asPlatform()) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMStretchShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt new file mode 100644 index 000000000..4ba2c09f7 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMSymbolAlignment = io.openmobilemaps.mapscore.shared.map.layers.text.SymbolAlignment + +internal fun KMSymbolAlignment.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.SymbolAlignment = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.SymbolAlignment.asKmp(): KMSymbolAlignment = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt new file mode 100644 index 000000000..371e71925 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMSymbolZOrder = io.openmobilemaps.mapscore.shared.map.layers.text.SymbolZOrder + +internal fun KMSymbolZOrder.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.SymbolZOrder = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.SymbolZOrder.asKmp(): KMSymbolZOrder = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt new file mode 100644 index 000000000..24672c0ca --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTaskConfig = io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig + +internal fun KMTaskConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig = this +internal fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig.asKmp(): KMTaskConfig = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt new file mode 100644 index 000000000..191e14e9f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt @@ -0,0 +1,44 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTaskInterface +{ + + actual fun getConfig(): KMTaskConfig + + actual fun run() +} + +private class KMTaskInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface) : KMTaskInterface +{ + + override fun getConfig(): KMTaskConfig { + val result = nativeHandle.getConfig() + return (result as io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig).asKmp() + } + + override fun run() { + nativeHandle.run() + } +} + +private class KMTaskInterfacePlatformProxy(private val delegate: KMTaskInterface) : io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface() +{ + + override fun getConfig(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig { + val result = delegate.getConfig() + return result.asPlatform() + } + + override fun run() { + delegate.run() + } +} + +internal fun KMTaskInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface = when (this) { + is KMTaskInterfacePlatformWrapper -> this.nativeHandle + else -> KMTaskInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt new file mode 100644 index 000000000..3cfd44484 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTaskPriority = io.openmobilemaps.mapscore.shared.map.scheduling.TaskPriority + +internal fun KMTaskPriority.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskPriority = this +internal fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskPriority.asKmp(): KMTaskPriority = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt new file mode 100644 index 000000000..09d219a5c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTextDescription = io.openmobilemaps.mapscore.shared.graphics.objects.TextDescription + +internal fun KMTextDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextDescription = this +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextDescription.asKmp(): KMTextDescription = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt new file mode 100644 index 000000000..c725b4737 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMTextFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory + + actual companion object + { + + actual fun createText(text: ArrayList, coordinate: KMCoord, font: KMFont, textAnchor: KMAnchor, textJustify: KMTextJustify): KMTextInfoInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory.createText(ArrayList(text.map { it.asPlatform() }), coordinate.asPlatform(), font.asPlatform(), textAnchor.asPlatform(), textJustify.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface)).asKmp() + } + } +} + +internal fun KMTextFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory.asKmp(): KMTextFactory = KMTextFactory(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt new file mode 100644 index 000000000..ad395710b --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt @@ -0,0 +1,106 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTextInfoInterface +{ + + actual fun getText(): ArrayList + + actual fun getCoordinate(): KMCoord + + actual fun getFont(): KMFont + + actual fun getTextAnchor(): KMAnchor + + actual fun getTextJustify(): KMTextJustify + + actual fun getSymbolPlacement(): KMTextSymbolPlacement + + actual fun getLineCoordinates(): ArrayList? +} + +private class KMTextInfoInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface) : KMTextInfoInterface +{ + + override fun getText(): ArrayList { + val result = nativeHandle.getText() + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry).asKmp() }) + } + + override fun getCoordinate(): KMCoord { + val result = nativeHandle.getCoordinate() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() + } + + override fun getFont(): KMFont { + val result = nativeHandle.getFont() + return (result as io.openmobilemaps.mapscore.shared.map.loader.Font).asKmp() + } + + override fun getTextAnchor(): KMAnchor { + val result = nativeHandle.getTextAnchor() + return (result as io.openmobilemaps.mapscore.shared.map.layers.text.Anchor).asKmp() + } + + override fun getTextJustify(): KMTextJustify { + val result = nativeHandle.getTextJustify() + return (result as io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify).asKmp() + } + + override fun getSymbolPlacement(): KMTextSymbolPlacement { + val result = nativeHandle.getSymbolPlacement() + return (result as io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement).asKmp() + } + + override fun getLineCoordinates(): ArrayList? { + val result = nativeHandle.getLineCoordinates() + return result?.let { ArrayList(it.map { (it as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp() }) } + } +} + +private class KMTextInfoInterfacePlatformProxy(private val delegate: KMTextInfoInterface) : io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface() +{ + + override fun getText(): ArrayList { + val result = delegate.getText() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getCoordinate(): io.openmobilemaps.mapscore.shared.map.coordinates.Coord { + val result = delegate.getCoordinate() + return result.asPlatform() + } + + override fun getFont(): io.openmobilemaps.mapscore.shared.map.loader.Font { + val result = delegate.getFont() + return result.asPlatform() + } + + override fun getTextAnchor(): io.openmobilemaps.mapscore.shared.map.layers.text.Anchor { + val result = delegate.getTextAnchor() + return result.asPlatform() + } + + override fun getTextJustify(): io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify { + val result = delegate.getTextJustify() + return result.asPlatform() + } + + override fun getSymbolPlacement(): io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement { + val result = delegate.getSymbolPlacement() + return result.asPlatform() + } + + override fun getLineCoordinates(): ArrayList? { + val result = delegate.getLineCoordinates() + return result?.let { ArrayList(it.map { it.asPlatform() }) } + } +} + +internal fun KMTextInfoInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface = when (this) { + is KMTextInfoInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextInfoInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt new file mode 100644 index 000000000..b06d93950 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -0,0 +1,154 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTextInstancedInterface +{ + + actual fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + actual fun setInstanceCount(count: Int) + + actual fun setPositions(positions: KMSharedBytes) + + actual fun setReferencePositions(positions: KMSharedBytes) + + actual fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + actual fun setScales(scales: KMSharedBytes) + + actual fun setRotations(rotations: KMSharedBytes) + + actual fun setAlphas(alphas: KMSharedBytes) + + actual fun setStyleIndices(indices: KMSharedBytes) + + actual fun setStyles(values: KMSharedBytes) + + actual fun loadFont(context: KMRenderingContextInterface, fontData: KMFontData, fontMsdfTexture: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMTextInstancedInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface) : KMTextInstancedInterface +{ + + override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setInstanceCount(count: Int) { + nativeHandle.setInstanceCount(count) + } + + override fun setPositions(positions: KMSharedBytes) { + nativeHandle.setPositions(positions.asPlatform()) + } + + override fun setReferencePositions(positions: KMSharedBytes) { + nativeHandle.setReferencePositions(positions.asPlatform()) + } + + override fun setTextureCoordinates(textureCoordinates: KMSharedBytes) { + nativeHandle.setTextureCoordinates(textureCoordinates.asPlatform()) + } + + override fun setScales(scales: KMSharedBytes) { + nativeHandle.setScales(scales.asPlatform()) + } + + override fun setRotations(rotations: KMSharedBytes) { + nativeHandle.setRotations(rotations.asPlatform()) + } + + override fun setAlphas(alphas: KMSharedBytes) { + nativeHandle.setAlphas(alphas.asPlatform()) + } + + override fun setStyleIndices(indices: KMSharedBytes) { + nativeHandle.setStyleIndices(indices.asPlatform()) + } + + override fun setStyles(values: KMSharedBytes) { + nativeHandle.setStyles(values.asPlatform()) + } + + override fun loadFont(context: KMRenderingContextInterface, fontData: KMFontData, fontMsdfTexture: KMTextureHolderInterface) { + nativeHandle.loadFont(context.asPlatform(), fontData.asPlatform(), fontMsdfTexture.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } +} + +private class KMTextInstancedInterfacePlatformProxy(private val delegate: KMTextInstancedInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface() +{ + + override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { + delegate.setFrame((frame as io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), is3d) + } + + override fun setInstanceCount(count: Int) { + delegate.setInstanceCount(count) + } + + override fun setPositions(positions: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setPositions((positions as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setReferencePositions(positions: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setReferencePositions((positions as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setTextureCoordinates(textureCoordinates: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setTextureCoordinates((textureCoordinates as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setScales(scales: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setScales((scales as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setRotations(rotations: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setRotations((rotations as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setAlphas(alphas: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setAlphas((alphas as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setStyleIndices(indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setStyleIndices((indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun setStyles(values: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setStyles((values as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun loadFont(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, fontData: io.openmobilemaps.mapscore.shared.map.loader.FontData, fontMsdfTexture: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { + delegate.loadFont(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), (fontData as io.openmobilemaps.mapscore.shared.map.loader.FontData).asKmp(), requireNotNull((fontMsdfTexture as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMTextInstancedInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface = when (this) { + is KMTextInstancedInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextInstancedInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt new file mode 100644 index 000000000..5441ab990 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -0,0 +1,18 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMTextInstancedShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMTextInstancedShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt new file mode 100644 index 000000000..38d840e5b --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -0,0 +1,64 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTextInterface +{ + + actual fun setTextsShared(vertices: KMSharedBytes, indices: KMSharedBytes) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMTextInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface) : KMTextInterface +{ + + override fun setTextsShared(vertices: KMSharedBytes, indices: KMSharedBytes) { + nativeHandle.setTextsShared(vertices.asPlatform(), indices.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + } +} + +private class KMTextInterfacePlatformProxy(private val delegate: KMTextInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface() +{ + + override fun setTextsShared(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { + delegate.setTextsShared((vertices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp()) + } + + override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { + delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMTextInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface = when (this) { + is KMTextInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt new file mode 100644 index 000000000..c35aebff8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTextJustify = io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify + +internal fun KMTextJustify.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify.asKmp(): KMTextJustify = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt new file mode 100644 index 000000000..059636be9 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -0,0 +1,35 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMTextLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface + + actual fun setTexts(texts: ArrayList) { + native.setTexts(ArrayList(texts.map { it.asPlatform() })) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual fun invalidate() { + native.invalidate() + } + + actual companion object + { + + actual fun create(fontLoader: KMFontLoaderInterface): KMTextLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface.create(fontLoader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface)).asKmp() + } + } +} + +internal fun KMTextLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt new file mode 100644 index 000000000..1ac12f4fb --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMTextShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface + + actual fun setColor(color: KMColor) { + native.setColor(color.asPlatform()) + } + + actual fun setOpacity(opacity: Float) { + native.setOpacity(opacity) + } + + actual fun setHaloColor(color: KMColor, width: Float, blur: Float) { + native.setHaloColor(color.asPlatform(), width, blur) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + } +} + +internal fun KMTextShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt new file mode 100644 index 000000000..d5ed82843 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTextSymbolPlacement = io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement + +internal fun KMTextSymbolPlacement.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement.asKmp(): KMTextSymbolPlacement = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt new file mode 100644 index 000000000..b02b255b6 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTextureAtlas = io.openmobilemaps.mapscore.shared.graphics.TextureAtlas + +internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.TextureAtlas = this +internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt new file mode 100644 index 000000000..8ece2ed05 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTextureFilterType = io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType + +internal fun KMTextureFilterType.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType = this +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType.asKmp(): KMTextureFilterType = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt new file mode 100644 index 000000000..9171e8e5f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt @@ -0,0 +1,92 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTextureHolderInterface +{ + + actual fun getImageWidth(): Int + + actual fun getImageHeight(): Int + + actual fun getTextureWidth(): Int + + actual fun getTextureHeight(): Int + + actual fun attachToGraphics(): Int + + actual fun clearFromGraphics() +} + +private class KMTextureHolderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) : KMTextureHolderInterface +{ + + override fun getImageWidth(): Int { + val result = nativeHandle.getImageWidth() + return result + } + + override fun getImageHeight(): Int { + val result = nativeHandle.getImageHeight() + return result + } + + override fun getTextureWidth(): Int { + val result = nativeHandle.getTextureWidth() + return result + } + + override fun getTextureHeight(): Int { + val result = nativeHandle.getTextureHeight() + return result + } + + override fun attachToGraphics(): Int { + val result = nativeHandle.attachToGraphics() + return result + } + + override fun clearFromGraphics() { + nativeHandle.clearFromGraphics() + } +} + +private class KMTextureHolderInterfacePlatformProxy(private val delegate: KMTextureHolderInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface() +{ + + override fun getImageWidth(): Int { + val result = delegate.getImageWidth() + return result + } + + override fun getImageHeight(): Int { + val result = delegate.getImageHeight() + return result + } + + override fun getTextureWidth(): Int { + val result = delegate.getTextureWidth() + return result + } + + override fun getTextureHeight(): Int { + val result = delegate.getTextureHeight() + return result + } + + override fun attachToGraphics(): Int { + val result = delegate.attachToGraphics() + return result + } + + override fun clearFromGraphics() { + delegate.clearFromGraphics() + } +} + +internal fun KMTextureHolderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface = when (this) { + is KMTextureHolderInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextureHolderInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt new file mode 100644 index 000000000..3d2ca145f --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTextureLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult + +internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt new file mode 100644 index 000000000..aeb14104e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMThreadPoolScheduler actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler + + actual companion object + { + + actual fun create(): KMSchedulerInterface { + val result = io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler.create() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface)).asKmp() + } + } +} + +internal fun KMThreadPoolScheduler.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler +internal fun io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt new file mode 100644 index 000000000..e3e85e4a0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt @@ -0,0 +1,118 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTiled2dMapLayerConfig +{ + + actual fun getCoordinateSystemIdentifier(): Int + + actual fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String + + actual fun getZoomLevelInfos(): ArrayList + + actual fun getVirtualZoomLevelInfos(): ArrayList + + actual fun getZoomInfo(): KMTiled2dMapZoomInfo + + actual fun getLayerName(): String + + actual fun getVectorSettings(): KMTiled2dMapVectorSettings? + + actual fun getBounds(): KMRectCoord? +} + +private class KMTiled2dMapLayerConfigPlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig) : KMTiled2dMapLayerConfig +{ + + override fun getCoordinateSystemIdentifier(): Int { + val result = nativeHandle.getCoordinateSystemIdentifier() + return result + } + + override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { + val result = nativeHandle.getTileUrl(x, y, t, zoom) + return result + } + + override fun getZoomLevelInfos(): ArrayList { + val result = nativeHandle.getZoomLevelInfos() + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo).asKmp() }) + } + + override fun getVirtualZoomLevelInfos(): ArrayList { + val result = nativeHandle.getVirtualZoomLevelInfos() + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo).asKmp() }) + } + + override fun getZoomInfo(): KMTiled2dMapZoomInfo { + val result = nativeHandle.getZoomInfo() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo).asKmp() + } + + override fun getLayerName(): String { + val result = nativeHandle.getLayerName() + return result + } + + override fun getVectorSettings(): KMTiled2dMapVectorSettings? { + val result = nativeHandle.getVectorSettings() + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings).asKmp() } + } + + override fun getBounds(): KMRectCoord? { + val result = nativeHandle.getBounds() + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord).asKmp() } + } +} + +private class KMTiled2dMapLayerConfigPlatformProxy(private val delegate: KMTiled2dMapLayerConfig) : io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig() +{ + + override fun getCoordinateSystemIdentifier(): Int { + val result = delegate.getCoordinateSystemIdentifier() + return result + } + + override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { + val result = delegate.getTileUrl(x, y, t, zoom) + return result + } + + override fun getZoomLevelInfos(): ArrayList { + val result = delegate.getZoomLevelInfos() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getVirtualZoomLevelInfos(): ArrayList { + val result = delegate.getVirtualZoomLevelInfos() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getZoomInfo(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo { + val result = delegate.getZoomInfo() + return result.asPlatform() + } + + override fun getLayerName(): String { + val result = delegate.getLayerName() + return result + } + + override fun getVectorSettings(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings? { + val result = delegate.getVectorSettings() + return result?.let { it.asPlatform() } + } + + override fun getBounds(): io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord? { + val result = delegate.getBounds() + return result?.let { it.asPlatform() } + } +} + +internal fun KMTiled2dMapLayerConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig = when (this) { + is KMTiled2dMapLayerConfigPlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapLayerConfigPlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt new file mode 100644 index 000000000..6c410ea40 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_raster_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTiled2dMapRasterLayerCallbackInterface +{ + + actual fun onClickConfirmed(coord: KMCoord): Boolean + + actual fun onLongPress(coord: KMCoord): Boolean +} + +private class KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface) : KMTiled2dMapRasterLayerCallbackInterface +{ + + override fun onClickConfirmed(coord: KMCoord): Boolean { + val result = nativeHandle.onClickConfirmed(coord.asPlatform()) + return result + } + + override fun onLongPress(coord: KMCoord): Boolean { + val result = nativeHandle.onLongPress(coord.asPlatform()) + return result + } +} + +private class KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapRasterLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface() +{ + + override fun onClickConfirmed(coord: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): Boolean { + val result = delegate.onClickConfirmed((coord as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp()) + return result + } + + override fun onLongPress(coord: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): Boolean { + val result = delegate.onLongPress((coord as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp()) + return result + } +} + +internal fun KMTiled2dMapRasterLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface = when (this) { + is KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt new file mode 100644 index 000000000..9882a4fc7 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -0,0 +1,111 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_raster_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMTiled2dMapRasterLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual fun setCallbackHandler(handler: KMTiled2dMapRasterLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun getCallbackHandler(): KMTiled2dMapRasterLayerCallbackInterface? { + val result = native.getCallbackHandler() + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface)).asKmp() } + } + + actual fun removeCallbackHandler() { + native.removeCallbackHandler() + } + + actual fun setAlpha(alpha: Float) { + native.setAlpha(alpha) + } + + actual fun getAlpha(): Float { + val result = native.getAlpha() + return result + } + + actual fun setStyle(style: KMRasterShaderStyle) { + native.setStyle(style.asPlatform()) + } + + actual fun getStyle(): KMRasterShaderStyle { + val result = native.getStyle() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle).asKmp() + } + + actual fun setMinMagFilter(filterType: KMTextureFilterType) { + native.setMinMagFilter(filterType.asPlatform()) + } + + actual fun setMinZoomLevelIdentifier(value: Int?) { + native.setMinZoomLevelIdentifier(value?.let { it }) + } + + actual fun getMinZoomLevelIdentifier(): Int? { + val result = native.getMinZoomLevelIdentifier() + return result?.let { it } + } + + actual fun setMaxZoomLevelIdentifier(value: Int?) { + native.setMaxZoomLevelIdentifier(value?.let { it }) + } + + actual fun getMaxZoomLevelIdentifier(): Int? { + val result = native.getMaxZoomLevelIdentifier() + return result?.let { it } + } + + actual fun setT(t: Int) { + native.setT(t) + } + + actual fun setReadyStateListener(listener: KMTiled2dMapReadyStateListener?) { + native.setReadyStateListener(listener?.let { it.asPlatform() }) + } + + actual fun getConfig(): KMTiled2dMapLayerConfig { + val result = native.getConfig() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + } + + actual fun set3dSubdivisionFactor(factor: Int) { + native.set3dSubdivisionFactor(factor) + } + + actual fun setBlendMode(blendMode: KMBlendMode) { + native.setBlendMode(blendMode.asPlatform()) + } + + actual companion object + { + + actual fun createWithMask(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, mask: KMMaskingObjectInterface): KMTiled2dMapRasterLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.createWithMask(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), mask.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() + } + + actual fun createWithShader(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, shader: KMShaderProgramInterface): KMTiled2dMapRasterLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.createWithShader(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() + } + + actual fun create(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList): KMTiled2dMapRasterLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.create(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() })) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() + } + } +} + +internal fun KMTiled2dMapRasterLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt new file mode 100644 index 000000000..4b19f4104 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTiled2dMapReadyStateListener +{ + + actual fun stateUpdate(state: KMLayerReadyState) +} + +private class KMTiled2dMapReadyStateListenerPlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener) : KMTiled2dMapReadyStateListener +{ + + override fun stateUpdate(state: KMLayerReadyState) { + nativeHandle.stateUpdate(state.asPlatform()) + } +} + +private class KMTiled2dMapReadyStateListenerPlatformProxy(private val delegate: KMTiled2dMapReadyStateListener) : io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener() +{ + + override fun stateUpdate(state: io.openmobilemaps.mapscore.shared.map.LayerReadyState) { + delegate.stateUpdate((state as io.openmobilemaps.mapscore.shared.map.LayerReadyState).asKmp()) + } +} + +internal fun KMTiled2dMapReadyStateListener.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener = when (this) { + is KMTiled2dMapReadyStateListenerPlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapReadyStateListenerPlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt new file mode 100644 index 000000000..0fec17ddb --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -0,0 +1,64 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMTiled2dMapSourceInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface + + actual fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, curT: Int, zoom: Double) { + native.onVisibleBoundsChanged(visibleBounds.asPlatform(), curT, zoom) + } + + actual fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) { + native.onCameraChange(ArrayList(viewMatrix.map { it }), ArrayList(projectionMatrix.map { it }), origin.asPlatform(), verticalFov, horizontalFov, width, height, focusPointAltitude, focusPointPosition.asPlatform(), zoom) + } + + actual fun setMinZoomLevelIdentifier(value: Int?) { + native.setMinZoomLevelIdentifier(value?.let { it }) + } + + actual fun getMinZoomLevelIdentifier(): Int? { + val result = native.getMinZoomLevelIdentifier() + return result?.let { it } + } + + actual fun setMaxZoomLevelIdentifier(value: Int?) { + native.setMaxZoomLevelIdentifier(value?.let { it }) + } + + actual fun getMaxZoomLevelIdentifier(): Int? { + val result = native.getMaxZoomLevelIdentifier() + return result?.let { it } + } + + actual fun pause() { + native.pause() + } + + actual fun resume() { + native.resume() + } + + actual fun isReadyToRenderOffscreen(): KMLayerReadyState { + val result = native.isReadyToRenderOffscreen() + return (result as io.openmobilemaps.mapscore.shared.map.LayerReadyState).asKmp() + } + + actual fun setErrorManager(errorManager: KMErrorManager) { + native.setErrorManager(errorManager.asPlatform()) + } + + actual fun forceReload() { + native.forceReload() + } + + actual fun notifyTilesUpdates() { + native.notifyTilesUpdates() + } +} + +internal fun KMTiled2dMapSourceInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt new file mode 100644 index 000000000..51837cf22 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTiled2dMapVectorAssetInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo + +internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt new file mode 100644 index 000000000..f61d5513d --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -0,0 +1,88 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMTiled2dMapVectorLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface + + actual fun setSelectionDelegate(selectionDelegate: KMTiled2dMapVectorLayerSelectionCallbackInterface?) { + native.setSelectionDelegate(selectionDelegate?.let { it.asPlatform() }) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + } + + actual fun setMinZoomLevelIdentifier(value: Int?) { + native.setMinZoomLevelIdentifier(value?.let { it }) + } + + actual fun getMinZoomLevelIdentifier(): Int? { + val result = native.getMinZoomLevelIdentifier() + return result?.let { it } + } + + actual fun setMaxZoomLevelIdentifier(value: Int?) { + native.setMaxZoomLevelIdentifier(value?.let { it }) + } + + actual fun getMaxZoomLevelIdentifier(): Int? { + val result = native.getMaxZoomLevelIdentifier() + return result?.let { it } + } + + actual fun getStyleMetadataJson(): String? { + val result = native.getStyleMetadataJson() + return result?.let { it } + } + + actual fun setFeatureState(identifier: String, properties: HashMap) { + native.setFeatureState(identifier, HashMap(properties.map { it.key to it.value.asPlatform() }.toMap())) + } + + actual fun setGlobalState(properties: HashMap) { + native.setGlobalState(HashMap(properties.map { it.key to it.value.asPlatform() }.toMap())) + } + + actual fun getVisiblePointFeatureContexts(paddingPc: Float, sourceLayer: String?): ArrayList { + val result = native.getVisiblePointFeatureContexts(paddingPc, sourceLayer?.let { it }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo).asKmp() }) + } + + actual fun setReadyStateListener(listener: KMTiled2dMapReadyStateListener?) { + native.setReadyStateListener(listener?.let { it.asPlatform() }) + } + + actual fun reloadDataSource(sourceName: String) { + native.reloadDataSource(sourceName) + } + + actual fun reloadLocalDataSource(sourceName: String, geoJson: String) { + native.reloadLocalDataSource(sourceName, geoJson) + } + + actual fun performClick(coord: KMCoord) { + native.performClick(coord.asPlatform()) + } + + actual companion object + { + + actual fun createFromStyleJson(layerName: String, styleJsonUrl: String, loaders: ArrayList, fontLoader: KMFontLoaderInterface): KMTiled2dMapVectorLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface.createFromStyleJson(layerName, styleJsonUrl, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface)).asKmp() + } + + actual fun createExplicitly(layerName: String, styleJson: String?, localStyleJson: Boolean?, loaders: ArrayList, fontLoader: KMFontLoaderInterface, localDataProvider: KMTiled2dMapVectorLayerLocalDataProviderInterface?, customZoomInfo: KMTiled2dMapZoomInfo?, symbolDelegate: KMTiled2dMapVectorLayerSymbolDelegateInterface?, sourceUrlParams: HashMap?): KMTiled2dMapVectorLayerInterface { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface.createExplicitly(layerName, styleJson?.let { it }, localStyleJson?.let { it }, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform(), localDataProvider?.let { it.asPlatform() }, customZoomInfo?.let { it.asPlatform() }, symbolDelegate?.let { it.asPlatform() }, sourceUrlParams?.let { HashMap(it.map { it.key to it.value }.toMap()) }) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface)).asKmp() + } + } +} + +internal fun KMTiled2dMapVectorLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt new file mode 100644 index 000000000..6441e3b37 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -0,0 +1,70 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTiled2dMapVectorLayerLocalDataProviderInterface +{ + + actual fun getStyleJson(): String? + + actual fun loadSpriteAsync(spriteId: String, url: String, scale: Int): KMFuture + + actual fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): KMFuture + + actual fun loadGeojson(sourceName: String, url: String): KMFuture +} + +private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface) : KMTiled2dMapVectorLayerLocalDataProviderInterface +{ + + override fun getStyleJson(): String? { + val result = nativeHandle.getStyleJson() + return result?.let { it } + } + + override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): KMFuture { + val result = nativeHandle.loadSpriteAsync(spriteId, url, scale) + return (result as com.snapchat.djinni.Future).asKmp() + } + + override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): KMFuture { + val result = nativeHandle.loadSpriteJsonAsync(spriteId, url, scale) + return (result as com.snapchat.djinni.Future).asKmp() + } + + override fun loadGeojson(sourceName: String, url: String): KMFuture { + val result = nativeHandle.loadGeojson(sourceName, url) + return (result as com.snapchat.djinni.Future).asKmp() + } +} + +private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerLocalDataProviderInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface() +{ + + override fun getStyleJson(): String? { + val result = delegate.getStyleJson() + return result?.let { it } + } + + override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): com.snapchat.djinni.Future { + val result = delegate.loadSpriteAsync(spriteId, url, scale) + return result.asPlatform() + } + + override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): com.snapchat.djinni.Future { + val result = delegate.loadSpriteJsonAsync(spriteId, url, scale) + return result.asPlatform() + } + + override fun loadGeojson(sourceName: String, url: String): com.snapchat.djinni.Future { + val result = delegate.loadGeojson(sourceName, url) + return result.asPlatform() + } +} + +internal fun KMTiled2dMapVectorLayerLocalDataProviderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface = when (this) { + is KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt new file mode 100644 index 000000000..d304baafe --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt @@ -0,0 +1,58 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTiled2dMapVectorLayerSelectionCallbackInterface +{ + + actual fun didSelectFeature(featureInfo: KMVectorLayerFeatureInfo, layerIdentifier: String, coord: KMCoord): Boolean + + actual fun didMultiSelectLayerFeatures(featureInfos: ArrayList, layerIdentifier: String, coord: KMCoord): Boolean + + actual fun didClickBackgroundConfirmed(coord: KMCoord): Boolean +} + +private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface) : KMTiled2dMapVectorLayerSelectionCallbackInterface +{ + + override fun didSelectFeature(featureInfo: KMVectorLayerFeatureInfo, layerIdentifier: String, coord: KMCoord): Boolean { + val result = nativeHandle.didSelectFeature(featureInfo.asPlatform(), layerIdentifier, coord.asPlatform()) + return result + } + + override fun didMultiSelectLayerFeatures(featureInfos: ArrayList, layerIdentifier: String, coord: KMCoord): Boolean { + val result = nativeHandle.didMultiSelectLayerFeatures(ArrayList(featureInfos.map { it.asPlatform() }), layerIdentifier, coord.asPlatform()) + return result + } + + override fun didClickBackgroundConfirmed(coord: KMCoord): Boolean { + val result = nativeHandle.didClickBackgroundConfirmed(coord.asPlatform()) + return result + } +} + +private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSelectionCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface() +{ + + override fun didSelectFeature(featureInfo: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo, layerIdentifier: String, coord: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): Boolean { + val result = delegate.didSelectFeature((featureInfo as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo).asKmp(), layerIdentifier, (coord as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp()) + return result + } + + override fun didMultiSelectLayerFeatures(featureInfos: ArrayList, layerIdentifier: String, coord: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): Boolean { + val result = delegate.didMultiSelectLayerFeatures(ArrayList(featureInfos.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo).asKmp() }), layerIdentifier, (coord as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp()) + return result + } + + override fun didClickBackgroundConfirmed(coord: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): Boolean { + val result = delegate.didClickBackgroundConfirmed((coord as io.openmobilemaps.mapscore.shared.map.coordinates.Coord).asKmp()) + return result + } +} + +internal fun KMTiled2dMapVectorLayerSelectionCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface = when (this) { + is KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt new file mode 100644 index 000000000..dcace4bcc --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTiled2dMapVectorLayerSymbolDelegateInterface +{ + + actual fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList +} + +private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface) : KMTiled2dMapVectorLayerSymbolDelegateInterface +{ + + override fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList { + val result = nativeHandle.getCustomAssetsFor(ArrayList(featureInfos.map { it.asPlatform() }), layerIdentifier) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo).asKmp() }) + } +} + +private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSymbolDelegateInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface() +{ + + override fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList { + val result = delegate.getCustomAssetsFor(ArrayList(featureInfos.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo).asKmp() }), layerIdentifier) + return ArrayList(result.map { it.asPlatform() }) + } +} + +internal fun KMTiled2dMapVectorLayerSymbolDelegateInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface = when (this) { + is KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt new file mode 100644 index 000000000..939ce8a27 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTiled2dMapVectorSettings = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings + +internal fun KMTiled2dMapVectorSettings.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings.asKmp(): KMTiled2dMapVectorSettings = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt new file mode 100644 index 000000000..0bb162350 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTiled2dMapVectorTileOrigin = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorTileOrigin + +internal fun KMTiled2dMapVectorTileOrigin.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorTileOrigin = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorTileOrigin.asKmp(): KMTiled2dMapVectorTileOrigin = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt new file mode 100644 index 000000000..a766ea2a5 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTiled2dMapZoomInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo + +internal fun KMTiled2dMapZoomInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo.asKmp(): KMTiled2dMapZoomInfo = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt new file mode 100644 index 000000000..bdef17a83 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTiled2dMapZoomLevelInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo + +internal fun KMTiled2dMapZoomLevelInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo.asKmp(): KMTiled2dMapZoomLevelInfo = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt new file mode 100644 index 000000000..f64cad6ff --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTiledLayerError = io.openmobilemaps.mapscore.shared.map.TiledLayerError + +internal fun KMTiledLayerError.asPlatform(): io.openmobilemaps.mapscore.shared.map.TiledLayerError = this +internal fun io.openmobilemaps.mapscore.shared.map.TiledLayerError.asKmp(): KMTiledLayerError = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt new file mode 100644 index 000000000..9980cf871 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTouchAction = io.openmobilemaps.mapscore.shared.map.controls.TouchAction + +internal fun KMTouchAction.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchAction = this +internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchAction.asKmp(): KMTouchAction = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt new file mode 100644 index 000000000..2f2418e21 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTouchEvent = io.openmobilemaps.mapscore.shared.map.controls.TouchEvent + +internal fun KMTouchEvent.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchEvent = this +internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchEvent.asKmp(): KMTouchEvent = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt new file mode 100644 index 000000000..e5711d642 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -0,0 +1,62 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTouchHandlerInterface +{ + + actual fun onTouchEvent(touchEvent: KMTouchEvent) + + actual fun insertListener(listener: KMTouchInterface, index: Int) + + actual fun addListener(listener: KMTouchInterface) + + actual fun removeListener(listener: KMTouchInterface) +} + +private class KMTouchHandlerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface) : KMTouchHandlerInterface +{ + + override fun onTouchEvent(touchEvent: KMTouchEvent) { + nativeHandle.onTouchEvent(touchEvent.asPlatform()) + } + + override fun insertListener(listener: KMTouchInterface, index: Int) { + nativeHandle.insertListener(listener.asPlatform(), index) + } + + override fun addListener(listener: KMTouchInterface) { + nativeHandle.addListener(listener.asPlatform()) + } + + override fun removeListener(listener: KMTouchInterface) { + nativeHandle.removeListener(listener.asPlatform()) + } +} + +private class KMTouchHandlerInterfacePlatformProxy(private val delegate: KMTouchHandlerInterface) : io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface() +{ + + override fun onTouchEvent(touchEvent: io.openmobilemaps.mapscore.shared.map.controls.TouchEvent) { + delegate.onTouchEvent((touchEvent as io.openmobilemaps.mapscore.shared.map.controls.TouchEvent).asKmp()) + } + + override fun insertListener(listener: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface, index: Int) { + delegate.insertListener(requireNotNull((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface)).asKmp(), index) + } + + override fun addListener(listener: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface) { + delegate.addListener(requireNotNull((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface)).asKmp()) + } + + override fun removeListener(listener: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface) { + delegate.removeListener(requireNotNull((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface)).asKmp()) + } +} + +internal fun KMTouchHandlerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface = when (this) { + is KMTouchHandlerInterfacePlatformWrapper -> this.nativeHandle + else -> KMTouchHandlerInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt new file mode 100644 index 000000000..5f40d5646 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -0,0 +1,164 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +actual interface KMTouchInterface +{ + + actual fun onTouchDown(posScreen: KMVec2F): Boolean + + actual fun onClickUnconfirmed(posScreen: KMVec2F): Boolean + + actual fun onClickConfirmed(posScreen: KMVec2F): Boolean + + actual fun onDoubleClick(posScreen: KMVec2F): Boolean + + actual fun onLongPress(posScreen: KMVec2F): Boolean + + actual fun onMove(deltaScreen: KMVec2F, confirmed: Boolean, doubleClick: Boolean): Boolean + + actual fun onMoveComplete(): Boolean + + actual fun onOneFingerDoubleClickMoveComplete(): Boolean + + actual fun onTwoFingerClick(posScreen1: KMVec2F, posScreen2: KMVec2F): Boolean + + actual fun onTwoFingerMove(posScreenOld: ArrayList, posScreenNew: ArrayList): Boolean + + actual fun onTwoFingerMoveComplete(): Boolean + + actual fun clearTouch() +} + +private class KMTouchInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface) : KMTouchInterface +{ + + override fun onTouchDown(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onTouchDown(posScreen.asPlatform()) + return result + } + + override fun onClickUnconfirmed(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onClickUnconfirmed(posScreen.asPlatform()) + return result + } + + override fun onClickConfirmed(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onClickConfirmed(posScreen.asPlatform()) + return result + } + + override fun onDoubleClick(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onDoubleClick(posScreen.asPlatform()) + return result + } + + override fun onLongPress(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onLongPress(posScreen.asPlatform()) + return result + } + + override fun onMove(deltaScreen: KMVec2F, confirmed: Boolean, doubleClick: Boolean): Boolean { + val result = nativeHandle.onMove(deltaScreen.asPlatform(), confirmed, doubleClick) + return result + } + + override fun onMoveComplete(): Boolean { + val result = nativeHandle.onMoveComplete() + return result + } + + override fun onOneFingerDoubleClickMoveComplete(): Boolean { + val result = nativeHandle.onOneFingerDoubleClickMoveComplete() + return result + } + + override fun onTwoFingerClick(posScreen1: KMVec2F, posScreen2: KMVec2F): Boolean { + val result = nativeHandle.onTwoFingerClick(posScreen1.asPlatform(), posScreen2.asPlatform()) + return result + } + + override fun onTwoFingerMove(posScreenOld: ArrayList, posScreenNew: ArrayList): Boolean { + val result = nativeHandle.onTwoFingerMove(ArrayList(posScreenOld.map { it.asPlatform() }), ArrayList(posScreenNew.map { it.asPlatform() })) + return result + } + + override fun onTwoFingerMoveComplete(): Boolean { + val result = nativeHandle.onTwoFingerMoveComplete() + return result + } + + override fun clearTouch() { + nativeHandle.clearTouch() + } +} + +private class KMTouchInterfacePlatformProxy(private val delegate: KMTouchInterface) : io.openmobilemaps.mapscore.shared.map.controls.TouchInterface() +{ + + override fun onTouchDown(posScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F): Boolean { + val result = delegate.onTouchDown((posScreen as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp()) + return result + } + + override fun onClickUnconfirmed(posScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F): Boolean { + val result = delegate.onClickUnconfirmed((posScreen as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp()) + return result + } + + override fun onClickConfirmed(posScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F): Boolean { + val result = delegate.onClickConfirmed((posScreen as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp()) + return result + } + + override fun onDoubleClick(posScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F): Boolean { + val result = delegate.onDoubleClick((posScreen as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp()) + return result + } + + override fun onLongPress(posScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F): Boolean { + val result = delegate.onLongPress((posScreen as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp()) + return result + } + + override fun onMove(deltaScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F, confirmed: Boolean, doubleClick: Boolean): Boolean { + val result = delegate.onMove((deltaScreen as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp(), confirmed, doubleClick) + return result + } + + override fun onMoveComplete(): Boolean { + val result = delegate.onMoveComplete() + return result + } + + override fun onOneFingerDoubleClickMoveComplete(): Boolean { + val result = delegate.onOneFingerDoubleClickMoveComplete() + return result + } + + override fun onTwoFingerClick(posScreen1: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F, posScreen2: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F): Boolean { + val result = delegate.onTwoFingerClick((posScreen1 as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp(), (posScreen2 as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp()) + return result + } + + override fun onTwoFingerMove(posScreenOld: ArrayList, posScreenNew: ArrayList): Boolean { + val result = delegate.onTwoFingerMove(ArrayList(posScreenOld.map { (it as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp() }), ArrayList(posScreenNew.map { (it as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp() })) + return result + } + + override fun onTwoFingerMoveComplete(): Boolean { + val result = delegate.onTwoFingerMoveComplete() + return result + } + + override fun clearTouch() { + delegate.clearTouch() + } +} + +internal fun KMTouchInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchInterface = when (this) { + is KMTouchInterfacePlatformWrapper -> this.nativeHandle + else -> KMTouchInterfacePlatformProxy(this) +} +internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchInterface.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt new file mode 100644 index 000000000..ba75add22 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVec2D = io.openmobilemaps.mapscore.shared.graphics.common.Vec2D + +internal fun KMVec2D.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec2D = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2D.asKmp(): KMVec2D = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt new file mode 100644 index 000000000..70128616c --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVec2F = io.openmobilemaps.mapscore.shared.graphics.common.Vec2F + +internal fun KMVec2F.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec2F = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2F.asKmp(): KMVec2F = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt new file mode 100644 index 000000000..490273d42 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVec2I = io.openmobilemaps.mapscore.shared.graphics.common.Vec2I + +internal fun KMVec2I.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec2I = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2I.asKmp(): KMVec2I = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt new file mode 100644 index 000000000..514a92cc2 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVec3D = io.openmobilemaps.mapscore.shared.graphics.common.Vec3D + +internal fun KMVec3D.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec3D = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3D.asKmp(): KMVec3D = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt new file mode 100644 index 000000000..b24a967cc --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVec3F = io.openmobilemaps.mapscore.shared.graphics.common.Vec3F + +internal fun KMVec3F.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec3F = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3F.asKmp(): KMVec3F = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt new file mode 100644 index 000000000..a0b1b5051 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVec3I = io.openmobilemaps.mapscore.shared.graphics.common.Vec3I + +internal fun KMVec3I.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec3I = this +internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3I.asKmp(): KMVec3I = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt new file mode 100644 index 000000000..c62de52ca --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVectorLayerFeatureCoordInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo + +internal fun KMVectorLayerFeatureCoordInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo.asKmp(): KMVectorLayerFeatureCoordInfo = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt new file mode 100644 index 000000000..d214feddd --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVectorLayerFeatureInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo + +internal fun KMVectorLayerFeatureInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo.asKmp(): KMVectorLayerFeatureInfo = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt new file mode 100644 index 000000000..d925c068b --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMVectorLayerFeatureInfoValue = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue + +internal fun KMVectorLayerFeatureInfoValue.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue.asKmp(): KMVectorLayerFeatureInfoValue = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt new file mode 100644 index 000000000..251e658b2 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -0,0 +1,67 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMWmtsCapabilitiesResource actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource + + actual fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayer(identifier, ArrayList(tileLoaders.map { it.asPlatform() })) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerTimed(identifier: String, tileLoaders: ArrayList, numT: Int): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayerTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), numT) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerWithZoomInfo(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayerWithZoomInfo(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform()) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerWithZoomInfoTimed(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayerWithZoomInfoTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform(), numT) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerConfig(identifier: String): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfig(identifier) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + } + + actual fun createLayerConfigTimed(identifier: String, numT: Int): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfigTimed(identifier, numT) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + } + + actual fun createLayerConfigWithZoomInfo(identifier: String, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfigWithZoomInfo(identifier, zoomInfo.asPlatform()) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + } + + actual fun createLayerConfigWithZoomInfoTimed(identifier: String, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfigWithZoomInfoTimed(identifier, zoomInfo.asPlatform(), numT) + return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + } + + actual fun getAllLayers(): ArrayList { + val result = native.getAllLayers() + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription).asKmp() }) + } + + actual companion object + { + + actual fun create(xml: String): KMWmtsCapabilitiesResource { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource.create(xml) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource)).asKmp() + } + } +} + +internal fun KMWmtsCapabilitiesResource.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt new file mode 100644 index 000000000..0e956c4d2 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMWmtsLayerDescription = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription + +internal fun KMWmtsLayerDescription.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription.asKmp(): KMWmtsLayerDescription = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt new file mode 100644 index 000000000..fcc55afc8 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMWmtsLayerDimension = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDimension + +internal fun KMWmtsLayerDimension.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDimension = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDimension.asKmp(): KMWmtsLayerDimension = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt new file mode 100644 index 000000000..7cf317e77 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMWmtsTileMatrix = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrix + +internal fun KMWmtsTileMatrix.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrix = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrix.asKmp(): KMWmtsTileMatrix = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt new file mode 100644 index 000000000..a9f111c90 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMWmtsTileMatrixSet = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrixSet + +internal fun KMWmtsTileMatrixSet.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrixSet = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrixSet.asKmp(): KMWmtsTileMatrixSet = this diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt new file mode 100644 index 000000000..c9688655d --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +actual class KMWmtsTiled2dMapLayerConfigFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory + + actual companion object + { + + actual fun create(wmtsLayerConfiguration: KMWmtsLayerDescription, zoomLevelInfo: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, coordinateSystemIdentifier: Int, matrixSetIdentifier: String): KMTiled2dMapLayerConfig { + val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory.create(wmtsLayerConfiguration.asPlatform(), ArrayList(zoomLevelInfo.map { it.asPlatform() }), zoomInfo.asPlatform(), coordinateSystemIdentifier, matrixSetIdentifier) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + } + } +} + +internal fun KMWmtsTiled2dMapLayerConfigFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt new file mode 100644 index 000000000..30e6ea85e --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp + +actual object KMMapInterfaceBridge { + actual fun wrap(nativeHandle: Any): KMMapInterface = KMMapInterface(nativeHandle) +} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt deleted file mode 100644 index 4c9ca077b..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigAndroid.kt +++ /dev/null @@ -1,75 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.Camera3dConfig as MapscoreCamera3dConfig -import io.openmobilemaps.mapscore.shared.map.CameraInterpolation as MapscoreCameraInterpolation -import io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue as MapscoreCameraInterpolationValue - -actual class CameraInterpolationValue actual constructor( - stop: Float, - value: Float, -) { - actual val stop: Float = stop - actual val value: Float = value -} - -actual class CameraInterpolation actual constructor( - stops: List, -) { - actual val stops: List = stops -} - -actual class Camera3dConfig actual constructor( - key: String, - allowUserInteraction: Boolean, - rotationSpeed: Float?, - animationDurationMs: Int, - minZoom: Float, - maxZoom: Float, - pitchInterpolationValues: CameraInterpolation, - verticalDisplacementInterpolationValues: CameraInterpolation, -) { - actual val key: String = key - actual val allowUserInteraction: Boolean = allowUserInteraction - actual val rotationSpeed: Float? = rotationSpeed - actual val animationDurationMs: Int = animationDurationMs - actual val minZoom: Float = minZoom - actual val maxZoom: Float = maxZoom - actual val pitchInterpolationValues: CameraInterpolation = pitchInterpolationValues - actual val verticalDisplacementInterpolationValues: CameraInterpolation = verticalDisplacementInterpolationValues -} - -internal fun CameraInterpolationValue.asMapscore(): MapscoreCameraInterpolationValue = - MapscoreCameraInterpolationValue(stop = stop, value = value) - -internal fun CameraInterpolation.asMapscore(): MapscoreCameraInterpolation = - MapscoreCameraInterpolation(ArrayList(stops.map { it.asMapscore() })) - -internal fun CameraInterpolationValueFromMapscore(value: MapscoreCameraInterpolationValue): CameraInterpolationValue = - CameraInterpolationValue(stop = value.stop, value = value.value) - -internal fun CameraInterpolationFromMapscore(value: MapscoreCameraInterpolation): CameraInterpolation = - CameraInterpolation(stops = value.stops.map { CameraInterpolationValueFromMapscore(it) }) - -internal fun Camera3dConfig.asMapscore(): MapscoreCamera3dConfig = - MapscoreCamera3dConfig( - key = key, - allowUserInteraction = allowUserInteraction, - rotationSpeed = rotationSpeed, - animationDurationMs = animationDurationMs, - minZoom = minZoom, - maxZoom = maxZoom, - pitchInterpolationValues = pitchInterpolationValues.asMapscore(), - verticalDisplacementInterpolationValues = verticalDisplacementInterpolationValues.asMapscore(), - ) - -internal fun Camera3dConfigFromMapscore(value: MapscoreCamera3dConfig): Camera3dConfig = - Camera3dConfig( - key = value.key, - allowUserInteraction = value.allowUserInteraction, - rotationSpeed = value.rotationSpeed, - animationDurationMs = value.animationDurationMs, - minZoom = value.minZoom, - maxZoom = value.maxZoom, - pitchInterpolationValues = CameraInterpolationFromMapscore(value.pitchInterpolationValues), - verticalDisplacementInterpolationValues = CameraInterpolationFromMapscore(value.verticalDisplacementInterpolationValues), - ) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt deleted file mode 100644 index 335f6c8f0..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.graphics.common.Color as MapscoreColor - -actual typealias Color = MapscoreColor diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt deleted file mode 100644 index 1854f7712..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.coordinates.Coord as MapscoreCoord - -actual typealias Coord = MapscoreCoord diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt deleted file mode 100644 index 1b014b3e4..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt +++ /dev/null @@ -1,16 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface as MapscoreIndexedLayerInterface - -actual open class IndexedLayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val indexedLayer = nativeHandle as? MapscoreIndexedLayerInterface - - internal fun asMapscore(): MapscoreIndexedLayerInterface? = - nativeHandle as? MapscoreIndexedLayerInterface - - actual fun getLayerInterface(): LayerInterface = - LayerInterface(indexedLayer?.getLayerInterface()) - - actual fun getIndex(): Int = indexedLayer?.getIndex() ?: 0 -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt deleted file mode 100644 index fb2d8cba5..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt +++ /dev/null @@ -1,92 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.LayerInterface as MapscoreLayerInterface -import io.openmobilemaps.mapscore.shared.map.LayerReadyState as MapscoreLayerReadyState - -actual open class LayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - private val layer = nativeHandle as? MapscoreLayerInterface - - internal fun asMapscore(): MapscoreLayerInterface? = - nativeHandle as? MapscoreLayerInterface - - actual fun setMaskingObject(maskingObject: MaskingObjectInterface?) { - layer?.setMaskingObject(maskingObject?.asMapscore()) - } - - actual fun update() { - layer?.update() - } - - actual fun buildRenderPasses(): List { - return layer?.buildRenderPasses()?.map { RenderPassInterface(it) } ?: emptyList() - } - - actual fun buildComputePasses(): List { - return layer?.buildComputePasses()?.map { ComputePassInterface(it) } ?: emptyList() - } - - actual fun onAdded(mapInterface: MapInterface, layerIndex: Int) { - val typedMap = requireNotNull(mapInterface.asMapscore()) - layer?.onAdded(typedMap, layerIndex) - } - - actual fun onRemoved() { - layer?.onRemoved() - } - - actual fun pause() { - layer?.pause() - } - - actual fun resume() { - layer?.resume() - } - - actual fun hide() { - layer?.hide() - } - - actual fun show() { - layer?.show() - } - - actual fun setAlpha(alpha: Float) { - layer?.setAlpha(alpha) - } - - actual fun getAlpha(): Float = layer?.getAlpha() ?: 0f - - actual fun setScissorRect(scissorRect: RectI?) { - layer?.setScissorRect(scissorRect) - } - - actual fun isReadyToRenderOffscreen(): LayerReadyState = - layer?.isReadyToRenderOffscreen().asShared() - - actual fun enableAnimations(enabled: Boolean) { - layer?.enableAnimations(enabled) - } - - actual fun setErrorManager(errorManager: ErrorManager) { - val typedErrorManager = requireNotNull(errorManager.asMapscore()) - layer?.setErrorManager(typedErrorManager) - } - - actual fun forceReload() { - layer?.forceReload() - } - - actual fun setPrimaryRenderTarget(target: RenderTargetInterface?) { - layer?.setPrimaryRenderTarget(target?.asMapscore()) - } -} - -internal fun MapscoreLayerReadyState?.asShared(): LayerReadyState = when (this) { - MapscoreLayerReadyState.READY -> LayerReadyState.READY - MapscoreLayerReadyState.NOT_READY -> LayerReadyState.NOT_READY - MapscoreLayerReadyState.ERROR -> LayerReadyState.ERROR - MapscoreLayerReadyState.TIMEOUT_ERROR -> LayerReadyState.TIMEOUT_ERROR - null -> LayerReadyState.NOT_READY -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt deleted file mode 100644 index 41770e6f9..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt +++ /dev/null @@ -1,235 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface as MapscoreMapCamera3dInterface -import io.openmobilemaps.mapscore.shared.map.MapCameraInterface as MapscoreMapCameraInterface -import io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface as MapscoreMapCameraListenerInterface - -actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val camera = nativeHandle as? MapscoreMapCameraInterface - - internal fun asMapscore(): MapscoreMapCameraInterface? = - nativeHandle as? MapscoreMapCameraInterface - - actual companion object { - actual fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface { - val created = MapscoreMapCameraInterface.create(requireNotNull(mapInterface.asMapscore()), screenDensityPpi, is3d) - return MapCameraInterface(created) - } - } - - actual fun freeze(freeze: Boolean) { - camera?.freeze(freeze) - } - - actual fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { - camera?.moveToCenterPositionZoom(centerPosition, zoom, animated) - } - - actual fun moveToCenterPosition(centerPosition: Coord, animated: Boolean) { - camera?.moveToCenterPosition(centerPosition, animated) - } - - actual fun moveToBoundingBox(boundingBox: RectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) { - camera?.moveToBoundingBox(boundingBox, paddingPc, animated, minZoom, maxZoom) - } - - actual fun getCenterPosition(): Coord = requireNotNull(camera?.getCenterPosition()) - - actual fun setZoom(zoom: Double, animated: Boolean) { - camera?.setZoom(zoom, animated) - } - - actual fun getZoom(): Double = requireNotNull(camera?.getZoom()) - - actual fun setRotation(angle: Float, animated: Boolean) { - camera?.setRotation(angle, animated) - } - - actual fun getRotation(): Float = requireNotNull(camera?.getRotation()) - - actual fun setMinZoom(minZoom: Double) { - camera?.setMinZoom(minZoom) - } - - actual fun setMaxZoom(maxZoom: Double) { - camera?.setMaxZoom(maxZoom) - } - - actual fun getMinZoom(): Double = requireNotNull(camera?.getMinZoom()) - - actual fun getMaxZoom(): Double = requireNotNull(camera?.getMaxZoom()) - - actual fun setBounds(bounds: RectCoord) { - camera?.setBounds(bounds) - } - - actual fun getBounds(): RectCoord = requireNotNull(camera?.getBounds()) - - actual fun isInBounds(coords: Coord): Boolean = camera?.isInBounds(coords) ?: false - - actual fun setPaddingLeft(padding: Float) { - camera?.setPaddingLeft(padding) - } - - actual fun setPaddingRight(padding: Float) { - camera?.setPaddingRight(padding) - } - - actual fun setPaddingTop(padding: Float) { - camera?.setPaddingTop(padding) - } - - actual fun setPaddingBottom(padding: Float) { - camera?.setPaddingBottom(padding) - } - - actual fun getVisibleRect(): RectCoord = requireNotNull(camera?.getVisibleRect()) - - actual fun getPaddingAdjustedVisibleRect(): RectCoord = requireNotNull(camera?.getPaddingAdjustedVisibleRect()) - - actual fun getScreenDensityPpi(): Float = requireNotNull(camera?.getScreenDensityPpi()) - - actual fun update() { - camera?.update() - } - - actual fun getInvariantModelMatrix(coordinate: Coord, scaleInvariant: Boolean, rotationInvariant: Boolean): List = - camera?.getInvariantModelMatrix(coordinate, scaleInvariant, rotationInvariant) ?: emptyList() - - actual fun addListener(listener: MapCameraListenerInterface) { - camera?.addListener(MapCameraListenerProxy(listener)) - } - - actual fun removeListener(listener: MapCameraListenerInterface) { - camera?.removeListener(MapCameraListenerProxy(listener)) - } - - actual fun notifyListenerBoundsChange() { - camera?.notifyListenerBoundsChange() - } - - actual fun coordFromScreenPosition(posScreen: Vec2F): Coord = - requireNotNull(camera?.coordFromScreenPosition(posScreen)) - - actual fun coordFromScreenPositionZoom(posScreen: Vec2F, zoom: Float): Coord = - requireNotNull(camera?.coordFromScreenPositionZoom(posScreen, zoom)) - - actual fun screenPosFromCoord(coord: Coord): Vec2F = - requireNotNull(camera?.screenPosFromCoord(coord)) - - actual fun screenPosFromCoordZoom(coord: Coord, zoom: Float): Vec2F = - requireNotNull(camera?.screenPosFromCoordZoom(coord, zoom)) - - actual fun mapUnitsFromPixels(distancePx: Double): Double = requireNotNull(camera?.mapUnitsFromPixels(distancePx)) - - actual fun getScalingFactor(): Double = requireNotNull(camera?.getScalingFactor()) - - actual fun coordIsVisibleOnScreen(coord: Coord, paddingPc: Float): Boolean = - camera?.coordIsVisibleOnScreen(coord, paddingPc) ?: false - - actual fun setRotationEnabled(enabled: Boolean) { - camera?.setRotationEnabled(enabled) - } - - actual fun setSnapToNorthEnabled(enabled: Boolean) { - camera?.setSnapToNorthEnabled(enabled) - } - - actual fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { - camera?.setBoundsRestrictWholeVisibleRect(enabled) - } - - actual fun asCameraInterface(): CameraInterface = CameraInterface(requireNotNull(camera?.asCameraInterface())) - - actual fun getLastVpMatrixD(): List? = camera?.getLastVpMatrixD() - - actual fun getLastVpMatrix(): List? = camera?.getLastVpMatrix() - - actual fun getLastInverseVpMatrix(): List? = camera?.getLastInverseVpMatrix() - - actual fun getLastVpMatrixViewBounds(): RectCoord? = camera?.getLastVpMatrixViewBounds() - - actual fun getLastVpMatrixRotation(): Float? = camera?.getLastVpMatrixRotation() - - actual fun getLastVpMatrixZoom(): Float? = camera?.getLastVpMatrixZoom() - - actual fun getLastCameraPosition(): Vec3D? = camera?.getLastCameraPosition() - - actual fun asMapCamera3d(): MapCamera3dInterface? = camera?.asMapCamera3d()?.let { MapCamera3dInterface(it) } -} - -private class MapCameraListenerProxy( - private val handler: MapCameraListenerInterface, -) : MapscoreMapCameraListenerInterface() { - override fun onVisibleBoundsChanged(visibleBounds: RectCoord, zoom: Double) { - handler.onVisibleBoundsChanged(visibleBounds, zoom) - } - - override fun onRotationChanged(angle: Float) { - handler.onRotationChanged(angle) - } - - override fun onMapInteraction() { - handler.onMapInteraction() - } - - override fun onCameraChange( - viewMatrix: ArrayList, - projectionMatrix: ArrayList, - origin: Vec3D, - verticalFov: Float, - horizontalFov: Float, - width: Float, - height: Float, - focusPointAltitude: Float, - focusPointPosition: Coord, - zoom: Float, - ) { - handler.onCameraChange( - viewMatrix = viewMatrix, - projectionMatrix = projectionMatrix, - origin = origin, - verticalFov = verticalFov, - horizontalFov = horizontalFov, - width = width, - height = height, - focusPointAltitude = focusPointAltitude, - focusPointPosition = focusPointPosition, - zoom = zoom, - ) - } -} - -actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val camera3d = nativeHandle as? MapscoreMapCamera3dInterface - - actual fun getCameraConfig(): Camera3dConfig = - Camera3dConfigFromMapscore(requireNotNull(camera3d?.getCameraConfig())) - - actual fun setCameraConfig( - config: Camera3dConfig, - durationSeconds: Float?, - targetZoom: Float?, - targetCoordinate: Coord?, - ) { - camera3d?.setCameraConfig(config.asMapscore(), durationSeconds, targetZoom, targetCoordinate) - } -} - -actual open class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - actual companion object { - actual fun getBasicConfig(): Camera3dConfig = - Camera3dConfigFromMapscore( - io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getBasicConfig(), - ) - - actual fun getRestorConfig(): Camera3dConfig = - Camera3dConfigFromMapscore( - io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getRestorConfig(), - ) - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt deleted file mode 100644 index 176f8c253..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt +++ /dev/null @@ -1,7 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -actual object MapCoreInterop { - actual fun moveToCenter(coord: Coord) { - coord.hashCode() - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt deleted file mode 100644 index 68afef11c..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesAndroid.kt +++ /dev/null @@ -1,106 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.graphics.CameraInterface as MapscoreCameraInterface -import io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface as MapscoreComputePassInterface -import io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface as MapscoreMaskingObjectInterface -import io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface as MapscoreRenderPassInterface -import io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface as MapscoreRenderTargetInterface -import io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface as MapscoreRenderingContextInterface -import io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface as MapscoreGraphicsObjectFactoryInterface -import io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface as MapscoreShaderFactoryInterface -import io.openmobilemaps.mapscore.shared.map.ErrorManager as MapscoreErrorManager -import io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface as MapscorePerformanceLoggerInterface -import io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface as MapscoreTouchHandlerInterface -import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface as MapscoreCoordinateConversionHelperInterface -import io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface as MapscoreSchedulerInterface - -actual open class GraphicsObjectFactoryInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreGraphicsObjectFactoryInterface? = - nativeHandle as? MapscoreGraphicsObjectFactoryInterface -} - -actual open class ShaderFactoryInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreShaderFactoryInterface? = - nativeHandle as? MapscoreShaderFactoryInterface -} - -actual open class RenderingContextInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreRenderingContextInterface? = - nativeHandle as? MapscoreRenderingContextInterface -} - -actual open class SchedulerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreSchedulerInterface? = - nativeHandle as? MapscoreSchedulerInterface -} - -actual open class TouchHandlerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreTouchHandlerInterface? = - nativeHandle as? MapscoreTouchHandlerInterface -} - -actual open class PerformanceLoggerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscorePerformanceLoggerInterface? = - nativeHandle as? MapscorePerformanceLoggerInterface -} - -actual open class CoordinateConversionHelperInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreCoordinateConversionHelperInterface? = - nativeHandle as? MapscoreCoordinateConversionHelperInterface -} - -actual open class RenderTargetInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreRenderTargetInterface? = - nativeHandle as? MapscoreRenderTargetInterface -} - -actual open class RenderPassInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreRenderPassInterface? = - nativeHandle as? MapscoreRenderPassInterface -} - -actual open class ComputePassInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreComputePassInterface? = - nativeHandle as? MapscoreComputePassInterface -} - -actual open class MaskingObjectInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreMaskingObjectInterface? = - nativeHandle as? MapscoreMaskingObjectInterface -} - -actual open class ErrorManager actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreErrorManager? = - nativeHandle as? MapscoreErrorManager -} - -actual open class CameraInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreCameraInterface? = - nativeHandle as? MapscoreCameraInterface -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt deleted file mode 100644 index b90aaac0a..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt +++ /dev/null @@ -1,80 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import android.graphics.BitmapFactory -import com.snapchat.djinni.Future -import com.snapchat.djinni.Promise -import io.openmobilemaps.mapscore.graphics.BitmapTextureHolder -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface as MapscoreLocalDataProvider -import io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult -import io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus -import io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch -import java.nio.ByteBuffer - -internal class MapDataProviderLocalDataProviderImplementation( - private val dataProvider: MapDataProviderProtocol, - private val coroutineScope: CoroutineScope, -) : MapscoreLocalDataProvider() { - - override fun getStyleJson(): String? = dataProvider.getStyleJson() - - override fun loadSpriteAsync(scale: Int): Future { - val promise = Promise() - coroutineScope.launch(Dispatchers.IO) { - val attempt = runCatching { dataProvider.loadSpriteAsync("", "", scale) } - val texture = attempt.getOrNull() - ?.let { bytes -> BitmapFactory.decodeByteArray(bytes, 0, bytes.size) } - ?.let { BitmapTextureHolder(it) } - val result = if (attempt.isFailure) { - TextureLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) - } else { - texture?.let { TextureLoaderResult(it, null, LoaderStatus.OK, null) } - ?: TextureLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) - } - promise.setValue(result) - } - return promise.future - } - - override fun loadSpriteJsonAsync(scale: Int): Future { - val promise = Promise() - coroutineScope.launch(Dispatchers.IO) { - val attempt = runCatching { dataProvider.loadSpriteJsonAsync("", "", scale) } - val result = if (attempt.isFailure) { - DataLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) - } else { - attempt.getOrNull() - ?.let { bytes -> bytes.asDataLoaderResult() } - ?: DataLoaderResult(null, null, LoaderStatus.OK, null) - } - promise.setValue(result) - } - return promise.future - } - - override fun loadGeojson(sourceName: String, url: String): Future { - val promise = Promise() - coroutineScope.launch(Dispatchers.IO) { - val attempt = runCatching { dataProvider.loadGeojson(sourceName, url) } - val result = if (attempt.isFailure) { - DataLoaderResult(null, null, LoaderStatus.ERROR_NETWORK, null) - } else { - attempt.getOrNull() - ?.let { bytes -> bytes.asDataLoaderResult() } - ?: DataLoaderResult(null, null, LoaderStatus.OK, null) - } - promise.setValue(result) - } - return promise.future - } - - private fun ByteArray.asDataLoaderResult(): DataLoaderResult { - val buffer = ByteBuffer.allocateDirect(size).apply { - put(this@asDataLoaderResult) - flip() - } - return DataLoaderResult(buffer, null, LoaderStatus.OK, null) - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt deleted file mode 100644 index ee88b18ae..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ /dev/null @@ -1,95 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import android.content.Context -import androidx.lifecycle.Lifecycle -import io.openmobilemaps.gps.GpsLayer -import io.openmobilemaps.gps.GpsProviderType -import io.openmobilemaps.gps.style.GpsStyleInfoFactory -import io.openmobilemaps.mapscore.map.loader.DataLoader -import io.openmobilemaps.mapscore.map.loader.FontLoader -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer -import kotlinx.coroutines.CoroutineScope -import java.io.File - -actual abstract class MapFactory actual constructor( - platformContext: Any?, - coroutineScope: CoroutineScope?, - lifecycle: Any?, -) { - protected val context = platformContext as? Context - protected val coroutineScope = coroutineScope - protected val lifecycle = lifecycle as? Lifecycle - - actual abstract fun createVectorLayer( - layerName: String, - dataProvider: MapDataProviderProtocol, - ): MapVectorLayer? - - actual abstract fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? - - actual abstract fun createGpsLayer(): MapGpsLayer? - - actual companion object { - actual fun create( - platformContext: Any?, - coroutineScope: CoroutineScope?, - lifecycle: Any?, - ): MapFactory = MapFactoryImpl(platformContext, coroutineScope, lifecycle) - } -} - -private class MapFactoryImpl( - platformContext: Any?, - coroutineScope: CoroutineScope?, - lifecycle: Any?, -) : MapFactory(platformContext, coroutineScope, lifecycle) { - override fun createVectorLayer( - layerName: String, - dataProvider: MapDataProviderProtocol, - ): MapVectorLayer? { - val context = requireNotNull(context) { "MapFactory requires an Android Context" } - val coroutineScope = requireNotNull(coroutineScope) { "MapFactory requires a CoroutineScope" } - val cacheDir = File(context.cacheDir, "vector").apply { mkdirs() } - val provider = MapDataProviderLocalDataProviderImplementation( - dataProvider = dataProvider, - coroutineScope = coroutineScope, - ) - return MapscoreVectorLayer.createExplicitly( - layerName, - null, - false, - arrayListOf(DataLoader(context, cacheDir, 50L * 1024 * 1024)), - FontLoader(context, "map/fonts/", context.resources.displayMetrics.density), - provider, - null, - null, - null, - ).let { MapVectorLayer(it) } - } - - override fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { - val context = requireNotNull(context) { "MapFactory requires an Android Context" } - val cacheDir = File(context.cacheDir, "raster").apply { mkdirs() } - val loader = DataLoader(context, cacheDir, 25L * 1024 * 1024) - val layer = Tiled2dMapRasterLayerInterface.create( - layerConfig = config, - loaders = listOf(LoaderInterface(loader)), - ) ?: return null - return MapRasterLayer(layer) - } - - override fun createGpsLayer(): MapGpsLayer? { - val context = requireNotNull(context) { "MapFactory requires an Android Context" } - val locationProvider = GpsProviderType.GOOGLE_FUSED.getProvider(context) - val gpsLayer = GpsLayer( - context = context, - style = GpsStyleInfoFactory.createDefaultStyle(context), - initialLocationProvider = locationProvider, - ).apply { - setHeadingEnabled(false) - setFollowInitializeZoom(25_000f) - lifecycle?.let { registerLifecycle(it) } - } - return MapGpsLayerImpl(GpsLayerHandle(gpsLayer, locationProvider)) - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt deleted file mode 100644 index 3101f8260..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ /dev/null @@ -1,86 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import android.content.Context -import androidx.lifecycle.Lifecycle -import io.openmobilemaps.gps.GpsLayer -import io.openmobilemaps.gps.GpsProviderType -import io.openmobilemaps.gps.providers.LocationProviderInterface -import io.openmobilemaps.gps.shared.gps.GpsMode as MapscoreGpsMode -import io.openmobilemaps.gps.style.GpsStyleInfoFactory -import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode - -actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : LayerInterface( - (nativeHandle as? GpsLayerHandle)?.layer?.asLayerInterface(), -) { - protected val gpsHandle: GpsLayerHandle? = nativeHandle as? GpsLayerHandle - - actual abstract fun setMode(mode: GpsMode) - actual abstract fun getMode(): GpsMode - actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - actual abstract fun notifyPermissionGranted() - actual abstract fun lastLocation(): Coord? - - actual companion object { - actual fun create(platformContext: Any?, lifecycle: Any?): MapGpsLayer? { - val context = platformContext as? Context ?: return null - val locationProvider = GpsProviderType.GOOGLE_FUSED.getProvider(context) - val gpsLayer = GpsLayer( - context = context, - style = GpsStyleInfoFactory.createDefaultStyle(context), - initialLocationProvider = locationProvider, - ).apply { - setHeadingEnabled(false) - setFollowInitializeZoom(25_000f) - (lifecycle as? Lifecycle)?.let { registerLifecycle(it) } - } - return MapGpsLayerImpl(GpsLayerHandle(gpsLayer, locationProvider)) - } - } -} - -class MapGpsLayerImpl(nativeHandle: Any?) : MapGpsLayer(nativeHandle) { - private val handle = gpsHandle - private val gpsLayer = handle?.layer - private val locationProvider = handle?.locationProvider - private var modeListener: ((GpsMode) -> Unit)? = null - - init { - gpsLayer?.setOnModeChangedListener { mode -> - modeListener?.invoke(mode.asShared()) - } - } - - override fun setMode(mode: GpsMode) { - gpsLayer?.setMode(mode.asMapscore()) - } - - override fun getMode(): GpsMode = gpsLayer?.layerInterface?.getMode()?.asShared() ?: GpsMode.DISABLED - - override fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { - modeListener = listener - } - - override fun notifyPermissionGranted() { - locationProvider?.notifyLocationPermissionGranted() - } - - override fun lastLocation(): Coord? = locationProvider?.getLastLocation() -} - -private fun GpsMode.asMapscore(): MapscoreGpsMode = when (this) { - GpsMode.DISABLED -> MapscoreGpsMode.DISABLED - GpsMode.STANDARD -> MapscoreGpsMode.STANDARD - GpsMode.FOLLOW -> MapscoreGpsMode.FOLLOW -} - -private fun MapscoreGpsMode.asShared(): GpsMode = when (this) { - MapscoreGpsMode.DISABLED -> GpsMode.DISABLED - MapscoreGpsMode.STANDARD -> GpsMode.STANDARD - MapscoreGpsMode.FOLLOW -> GpsMode.FOLLOW - MapscoreGpsMode.FOLLOW_AND_TURN -> GpsMode.FOLLOW -} - -data class GpsLayerHandle( - val layer: GpsLayer, - val locationProvider: LocationProviderInterface, -) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt deleted file mode 100644 index 44ab8cdcb..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt +++ /dev/null @@ -1,197 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.MapInterface as MapscoreMapInterface -import io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface as MapscoreMapReadyCallbackInterface -import io.openmobilemaps.mapscore.shared.map.MapCallbackInterface as MapscoreMapCallbackInterface - -actual open class MapInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val map = nativeHandle as? MapscoreMapInterface - - internal fun asMapscore(): MapscoreMapInterface? = - nativeHandle as? MapscoreMapInterface - - actual companion object { - actual fun create( - graphicsFactory: GraphicsObjectFactoryInterface, - shaderFactory: ShaderFactoryInterface, - renderingContext: RenderingContextInterface, - mapConfig: MapConfig, - scheduler: SchedulerInterface, - pixelDensity: Float, - is3d: Boolean, - ): MapInterface { - val created = MapscoreMapInterface.create( - requireNotNull(graphicsFactory.asMapscore()), - requireNotNull(shaderFactory.asMapscore()), - requireNotNull(renderingContext.asMapscore()), - mapConfig, - requireNotNull(scheduler.asMapscore()), - pixelDensity, - is3d, - ) - return MapInterface(created) - } - - actual fun createWithOpenGl( - mapConfig: MapConfig, - scheduler: SchedulerInterface, - pixelDensity: Float, - is3d: Boolean, - ): MapInterface { - val created = MapscoreMapInterface.createWithOpenGl( - mapConfig, - requireNotNull(scheduler.asMapscore()), - pixelDensity, - is3d, - ) - return MapInterface(created) - } - } - - actual fun setCallbackHandler(callbackInterface: MapCallbackInterface?) { - val proxy = callbackInterface?.let { MapCallbackInterfaceProxy(it) } - map?.setCallbackHandler(proxy) - } - - actual fun getGraphicsObjectFactory(): GraphicsObjectFactoryInterface = - GraphicsObjectFactoryInterface(map?.getGraphicsObjectFactory()) - - actual fun getShaderFactory(): ShaderFactoryInterface = - ShaderFactoryInterface(map?.getShaderFactory()) - - actual fun getScheduler(): SchedulerInterface = - SchedulerInterface(map?.getScheduler()) - - actual fun getRenderingContext(): RenderingContextInterface = - RenderingContextInterface(map?.getRenderingContext()) - - actual fun getMapConfig(): MapConfig = requireNotNull(map?.getMapConfig()) - - actual fun getCoordinateConverterHelper(): CoordinateConversionHelperInterface = - CoordinateConversionHelperInterface(map?.getCoordinateConverterHelper()) - - actual fun setCamera(camera: MapCameraInterface) { - map?.setCamera(requireNotNull(camera.asMapscore())) - } - - actual fun getCamera(): MapCameraInterface = MapCameraInterface(map?.getCamera()) - - actual fun setTouchHandler(touchHandler: TouchHandlerInterface) { - map?.setTouchHandler(requireNotNull(touchHandler.asMapscore())) - } - - actual fun getTouchHandler(): TouchHandlerInterface = - TouchHandlerInterface(map?.getTouchHandler()) - - actual fun setPerformanceLoggers(performanceLoggers: List) { - val list = ArrayList(performanceLoggers.mapNotNull { it.asMapscore() }) - map?.setPerformanceLoggers(list) - } - - actual fun getPerformanceLoggers(): List = - map?.getPerformanceLoggers()?.map { PerformanceLoggerInterface(it) } ?: emptyList() - - actual fun getLayers(): List = - map?.getLayers()?.map { LayerInterface(it) } ?: emptyList() - - actual fun getLayersIndexed(): List = - map?.getLayersIndexed()?.map { IndexedLayerInterface(it) } ?: emptyList() - - actual fun addLayer(layer: LayerInterface) { - map?.addLayer(requireNotNull(layer.asMapscore())) - } - - actual fun insertLayerAt(layer: LayerInterface, atIndex: Int) { - map?.insertLayerAt(requireNotNull(layer.asMapscore()), atIndex) - } - - actual fun insertLayerAbove(layer: LayerInterface, above: LayerInterface) { - map?.insertLayerAbove(requireNotNull(layer.asMapscore()), requireNotNull(above.asMapscore())) - } - - actual fun insertLayerBelow(layer: LayerInterface, below: LayerInterface) { - map?.insertLayerBelow(requireNotNull(layer.asMapscore()), requireNotNull(below.asMapscore())) - } - - actual fun removeLayer(layer: LayerInterface) { - map?.removeLayer(requireNotNull(layer.asMapscore())) - } - - actual fun setViewportSize(size: Vec2I) { - map?.setViewportSize(size) - } - - actual fun setBackgroundColor(color: Color) { - map?.setBackgroundColor(color) - } - - actual fun is3d(): Boolean = map?.is3d() ?: false - - actual fun invalidate() { - map?.invalidate() - } - - actual fun resetIsInvalidated() { - map?.resetIsInvalidated() - } - - actual fun prepare() { - map?.prepare() - } - - actual fun getNeedsCompute(): Boolean = map?.getNeedsCompute() ?: false - - actual fun drawOffscreenFrame(target: RenderTargetInterface) { - map?.drawOffscreenFrame(requireNotNull(target.asMapscore())) - } - - actual fun drawFrame() { - map?.drawFrame() - } - - actual fun compute() { - map?.compute() - } - - actual fun resume() { - map?.resume() - } - - actual fun pause() { - map?.pause() - } - - actual fun destroy() { - map?.destroy() - } - - actual fun drawReadyFrame(bounds: RectCoord, paddingPc: Float, timeout: Float, callbacks: MapReadyCallbackInterface) { - val proxy = MapReadyCallbackInterfaceProxy(callbacks) - map?.drawReadyFrame(bounds, paddingPc, timeout, proxy) - } - - actual fun forceReload() { - map?.forceReload() - } -} - -private class MapCallbackInterfaceProxy( - private val handler: MapCallbackInterface, -) : MapscoreMapCallbackInterface() { - override fun invalidate() { - handler.invalidate() - } - - override fun onMapResumed() { - handler.onMapResumed() - } -} - -private class MapReadyCallbackInterfaceProxy( - private val handler: MapReadyCallbackInterface, -) : MapscoreMapReadyCallbackInterface() { - override fun stateDidUpdate(state: io.openmobilemaps.mapscore.shared.map.LayerReadyState) { - handler.stateDidUpdate(state.asShared()) - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt deleted file mode 100644 index 576386fa1..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt +++ /dev/null @@ -1,13 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface as MapscoreRasterLayerInterface - -actual open class MapRasterLayer actual constructor(nativeHandle: Any?) : LayerInterface( - (nativeHandle as? MapscoreRasterLayerInterface)?.asLayerInterface(), -) { - private val rasterLayer = nativeHandle as? MapscoreRasterLayerInterface - - actual constructor(layerInterface: Tiled2dMapRasterLayerInterface) : this(layerInterface.asMapscore()) - - internal fun rasterLayerInterface(): MapscoreRasterLayerInterface? = rasterLayer -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt deleted file mode 100644 index 77b28b59f..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt +++ /dev/null @@ -1,109 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapTiled2dMapLayerConfig as SharedLayerConfig -import io.openmobilemaps.mapscore.shared.map.coordinates.Coord as MapscoreCoord -import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface -import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig as MapscoreLayerConfig -import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo as MapscoreZoomInfo -import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo -import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings -import kotlin.math.pow - -class MapTiled2dMapLayerConfigImplementation( - private val config: SharedLayerConfig, -) : MapscoreLayerConfig() { - - private val coordinateConverter by lazy { - CoordinateConversionHelperInterface.independentInstance() - } - - override fun getCoordinateSystemIdentifier(): Int = config.coordinateSystemIdentifier - - override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { - val tilesPerAxis = 2.0.pow(zoom.toDouble()) - - val bounds = config.bounds - val wmMinX = bounds.topLeft.x - val wmMaxX = bounds.bottomRight.x - val wmMaxY = bounds.topLeft.y - val wmMinY = bounds.bottomRight.y - - val tileWidth = (wmMaxX - wmMinX) / tilesPerAxis - val tileHeight = (wmMaxY - wmMinY) / tilesPerAxis - - val wmMinTileX = wmMinX + x * tileWidth - val wmMaxTileX = wmMinX + (x + 1) * tileWidth - val wmMaxTileY = wmMaxY - y * tileHeight - val wmMinTileY = wmMaxY - (y + 1) * tileHeight - - val wmTopLeft = MapscoreCoord( - systemIdentifier = config.coordinateSystemIdentifier, - x = wmMinTileX, - y = wmMaxTileY, - z = 0.0, - ) - val wmBottomRight = MapscoreCoord( - systemIdentifier = config.coordinateSystemIdentifier, - x = wmMaxTileX, - y = wmMinTileY, - z = 0.0, - ) - - val lv95TopLeft = coordinateConverter.convert(config.bboxCoordinateSystemIdentifier, wmTopLeft) - val lv95BottomRight = coordinateConverter.convert(config.bboxCoordinateSystemIdentifier, wmBottomRight) - - val bbox = listOf( - lv95TopLeft.x, - lv95BottomRight.y, - lv95BottomRight.x, - lv95TopLeft.y, - ).joinToString(separator = ",") { "%.3f".format(it) } - - val width = config.tileWidth - val height = config.tileHeight - - return config.urlFormat - .replace("{bbox}", bbox, ignoreCase = true) - .replace("{width}", width.toString(), ignoreCase = true) - .replace("{height}", height.toString(), ignoreCase = true) - } - - override fun getZoomLevelInfos(): ArrayList = - ArrayList().apply { - for (zoom in config.minZoomLevel..config.maxZoomLevel) { - add(createZoomLevelInfo(zoom)) - } - } - - override fun getVirtualZoomLevelInfos(): ArrayList = - ArrayList().apply { - if (config.minZoomLevel > 0) { - for (zoom in 0 until config.minZoomLevel) { - add(createZoomLevelInfo(zoom)) - } - } - } - - override fun getZoomInfo(): MapscoreZoomInfo = config.zoomInfo - - override fun getLayerName(): String = config.layerName - - override fun getVectorSettings(): Tiled2dMapVectorSettings? = null - - override fun getBounds() = config.bounds - - private fun createZoomLevelInfo(zoomLevel: Int): Tiled2dMapZoomLevelInfo { - val tileCount = 2.0.pow(zoomLevel.toDouble()) - val zoom = config.baseZoom / tileCount - val width = (config.baseWidth / tileCount).toFloat() - return Tiled2dMapZoomLevelInfo( - zoom = zoom, - tileWidthLayerSystemUnits = width, - numTilesX = tileCount.toInt(), - numTilesY = tileCount.toInt(), - numTilesT = 1, - zoomLevelIdentifier = zoomLevel, - bounds = config.bounds, - ) - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt deleted file mode 100644 index 9d7e562a9..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ /dev/null @@ -1,64 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayer -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo as MapscoreFeatureInfo -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue as MapscoreFeatureInfoValue -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfo as SharedFeatureInfo -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapVectorLayerFeatureInfoValue as SharedFeatureInfoValue - -actual class MapVectorLayer actual constructor(nativeHandle: Any?) : LayerInterface( - (nativeHandle as? MapscoreVectorLayer)?.asLayerInterface(), -) { - private val layer = nativeHandle as? MapscoreVectorLayer - - actual constructor(layerInterface: Tiled2dMapVectorLayerInterface) : this(layerInterface.asMapscore()) - - actual fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) { - val proxy = delegate?.let { MapVectorLayerSelectionCallbackProxy(it) } - layer?.setSelectionDelegate(proxy) - } - - actual fun setGlobalState(state: Map) { - val mapped = HashMap() - state.forEach { (key, value) -> - mapped[key] = value.asMapscore() - } - layer?.setGlobalState(mapped) - } - - internal fun vectorLayerInterface(): MapscoreVectorLayer? = layer -} - -internal fun MapscoreFeatureInfo.asShared(): SharedFeatureInfo { - val props = HashMap() - for ((key, value) in properties) { - props[key] = value.asShared() - } - return SharedFeatureInfo( - identifier = identifier, - properties = props, - ) -} - -internal fun MapscoreFeatureInfoValue.asShared(): SharedFeatureInfoValue { - return SharedFeatureInfoValue( - stringVal = stringVal, - doubleVal = doubleVal, - intVal = intVal, - boolVal = boolVal, - colorVal = colorVal, - listFloatVal = listFloatVal, - listStringVal = listStringVal, - ) -} - -private fun SharedFeatureInfoValue.asMapscore(): MapscoreFeatureInfoValue = - MapscoreFeatureInfoValue( - stringVal, - doubleVal, - intVal, - boolVal, - colorVal, - listFloatVal, - listStringVal, - ) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt deleted file mode 100644 index c4e0c2410..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt +++ /dev/null @@ -1,20 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlinx.coroutines.CoroutineScope - -actual object MapVectorLayerLocalDataProviderFactory { - actual fun create( - dataProvider: MapDataProviderProtocol, - coroutineScope: CoroutineScope?, - ): Tiled2dMapVectorLayerLocalDataProviderInterface { - val scope = requireNotNull(coroutineScope) { - "CoroutineScope required for Android vector layer data provider" - } - return Tiled2dMapVectorLayerLocalDataProviderInterface( - MapDataProviderLocalDataProviderImplementation( - dataProvider = dataProvider, - coroutineScope = scope, - ), - ) - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt deleted file mode 100644 index 9890dd2aa..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt +++ /dev/null @@ -1,32 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface as MapscoreSelectionCallback -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo as MapscoreFeatureInfo - -actual class MapVectorLayerSelectionCallbackProxy actual constructor( - handler: MapVectorLayerSelectionCallback, -) : MapscoreSelectionCallback() { - actual val handler: MapVectorLayerSelectionCallback = handler - - override fun didSelectFeature( - featureInfo: MapscoreFeatureInfo, - layerIdentifier: String, - coord: Coord, - ): Boolean { - val shared = featureInfo.asShared() - return handler.didSelectFeature(shared, layerIdentifier, coord) - } - - override fun didMultiSelectLayerFeatures( - featureInfos: ArrayList, - layerIdentifier: String, - coord: Coord, - ): Boolean { - val sharedInfos = featureInfos.map { it.asShared() } - return handler.didMultiSelectLayerFeatures(sharedInfos, layerIdentifier, coord) - } - - override fun didClickBackgroundConfirmed(coord: Coord): Boolean { - return handler.didClickBackgroundConfirmed(coord) - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt deleted file mode 100644 index e12624fbb..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt +++ /dev/null @@ -1,22 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import android.view.View -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapInterface - -actual typealias PlatformMapView = View - -actual class MapViewWrapper actual constructor() { - private lateinit var viewInternal: View - private lateinit var mapInterfaceInternal: MapInterface - - actual val view: View - get() = viewInternal - - actual val mapInterface: MapInterface - get() = mapInterfaceInternal - - constructor(view: View, mapInterface: MapInterface) : this() { - viewInternal = view - mapInterfaceInternal = mapInterface - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt deleted file mode 100644 index ae437a9be..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt +++ /dev/null @@ -1,17 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.graphics.common.Vec2F as MapscoreVec2F -import io.openmobilemaps.mapscore.shared.graphics.common.Vec2I as MapscoreVec2I -import io.openmobilemaps.mapscore.shared.graphics.common.Vec3D as MapscoreVec3D -import io.openmobilemaps.mapscore.shared.graphics.common.RectI as MapscoreRectI -import io.openmobilemaps.mapscore.shared.map.MapConfig as MapscoreMapConfig -import io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem as MapscoreMapCoordinateSystem -import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo as MapscoreTiled2dMapZoomInfo - -actual typealias Vec2F = MapscoreVec2F -actual typealias Vec2I = MapscoreVec2I -actual typealias Vec3D = MapscoreVec3D -actual typealias RectI = MapscoreRectI -actual typealias MapConfig = MapscoreMapConfig -actual typealias MapCoordinateSystem = MapscoreMapCoordinateSystem -actual typealias Tiled2dMapZoomInfo = MapscoreTiled2dMapZoomInfo diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt deleted file mode 100644 index e1bc84bbb..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord as MapscoreRectCoord - -actual typealias RectCoord = MapscoreRectCoord diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt deleted file mode 100644 index dc454e97c..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt +++ /dev/null @@ -1,27 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface as MapscoreRasterLayerInterface -import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreLoaderInterface - -actual open class Tiled2dMapRasterLayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreRasterLayerInterface? = - nativeHandle as? MapscoreRasterLayerInterface - - actual companion object { - actual fun create( - layerConfig: MapTiled2dMapLayerConfig, - loaders: List, - ): Tiled2dMapRasterLayerInterface? { - val typedLoaders = ArrayList(loaders.size).apply { - loaders.forEach { add(requireNotNull(it.asMapscore())) } - } - val layer = MapscoreRasterLayerInterface.create( - MapTiled2dMapLayerConfigImplementation(layerConfig), - typedLoaders, - ) - return layer?.let { Tiled2dMapRasterLayerInterface(it) } - } - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt deleted file mode 100644 index 3872a20e1..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ /dev/null @@ -1,46 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface as MapscoreVectorLayerInterface -import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreLoaderInterface - -actual open class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreVectorLayerInterface? = - nativeHandle as? MapscoreVectorLayerInterface - - actual companion object { - actual fun createExplicitly( - layerName: String, - styleJson: String?, - localStyleJson: Boolean?, - loaders: List, - fontLoader: FontLoaderInterface?, - localDataProvider: Tiled2dMapVectorLayerLocalDataProviderInterface?, - customZoomInfo: Tiled2dMapZoomInfo?, - symbolDelegate: Tiled2dMapVectorLayerSymbolDelegateInterface?, - sourceUrlParams: Map?, - ): Tiled2dMapVectorLayerInterface? { - val typedLoaders = ArrayList(loaders.size).apply { - loaders.forEach { add(requireNotNull(it.asMapscore())) } - } - val typedFontLoader = fontLoader?.asMapscore() ?: return null - val typedLocalDataProvider = localDataProvider?.asMapscore() - val typedZoomInfo = customZoomInfo - val typedSymbolDelegate = symbolDelegate?.asMapscore() - val typedSourceUrlParams = sourceUrlParams?.let { HashMap(it) } - val layer = MapscoreVectorLayerInterface.createExplicitly( - layerName = layerName, - styleJson = styleJson, - localStyleJson = localStyleJson, - loaders = typedLoaders, - fontLoader = typedFontLoader, - localDataProvider = typedLocalDataProvider, - customZoomInfo = typedZoomInfo, - symbolDelegate = typedSymbolDelegate, - sourceUrlParams = typedSourceUrlParams, - ) - return Tiled2dMapVectorLayerInterface(layer) - } - } -} diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt deleted file mode 100644 index edf3d8804..000000000 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesAndroid.kt +++ /dev/null @@ -1,34 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface as MapscoreLocalDataProvider -import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface as MapscoreSymbolDelegate -import io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface as MapscoreFontLoader -import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface as MapscoreLoader - -actual open class LoaderInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreLoader? = - nativeHandle as? MapscoreLoader -} - -actual open class FontLoaderInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreFontLoader? = - nativeHandle as? MapscoreFontLoader -} - -actual open class Tiled2dMapVectorLayerLocalDataProviderInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreLocalDataProvider? = - nativeHandle as? MapscoreLocalDataProvider -} - -actual open class Tiled2dMapVectorLayerSymbolDelegateInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapscore(): MapscoreSymbolDelegate? = - nativeHandle as? MapscoreSymbolDelegate -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt new file mode 100644 index 000000000..81544d311 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt @@ -0,0 +1,3 @@ +package io.openmobilemaps.mapscore.kmp + +expect class KMDataRef diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt new file mode 100644 index 000000000..6e1c9d951 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt @@ -0,0 +1,3 @@ +package io.openmobilemaps.mapscore.kmp + +expect class KMFuture diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt new file mode 100644 index 000000000..7a39a67f7 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMAlphaInstancedShaderInterface constructor(nativeHandle: Any) { + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt new file mode 100644 index 000000000..6cd527143 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMAlphaShaderInterface constructor(nativeHandle: Any) { + + fun updateAlpha(value: Float) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt new file mode 100644 index 000000000..31dc1f008 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMAnchor { + CENTER, + LEFT, + RIGHT, + TOP, + BOTTOM, + TOP_LEFT, + TOP_RIGHT, + BOTTOM_LEFT, + BOTTOM_RIGHT, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt new file mode 100644 index 000000000..689432084 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMBlendMode { + NORMAL, + MULTIPLY, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt new file mode 100644 index 000000000..f5ab806c6 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -0,0 +1,25 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMBoundingBoxInterface constructor(nativeHandle: Any) { + + fun addPoint(p: KMCoord) + + fun asRectCoord(): KMRectCoord + + fun getCenter(): KMCoord + + fun getMin(): KMCoord + + fun getMax(): KMCoord + + fun getSystemIdentifier(): Int + + companion object + { + + fun create(systemIdentifier: Int): KMBoundingBoxInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt new file mode 100644 index 000000000..3b91e087e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt @@ -0,0 +1,24 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCamera3dConfig( + key: String, + allowUserInteraction: Boolean, + rotationSpeed: Float?, + animationDurationMs: Int, + minZoom: Float, + maxZoom: Float, + pitchInterpolationValues: KMCameraInterpolation, + verticalDisplacementInterpolationValues: KMCameraInterpolation, +) { + val key: String + val allowUserInteraction: Boolean + val rotationSpeed: Float? + val animationDurationMs: Int + val minZoom: Float + val maxZoom: Float + val pitchInterpolationValues: KMCameraInterpolation + val verticalDisplacementInterpolationValues: KMCameraInterpolation +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt new file mode 100644 index 000000000..5ec38e34b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCamera3dConfigFactory constructor(nativeHandle: Any) { + + companion object + { + + fun getBasicConfig(): KMCamera3dConfig + + fun getRestorConfig(): KMCamera3dConfig + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt new file mode 100644 index 000000000..e5cdbb0c3 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMCameraInterface { + + fun getVpMatrix(): ArrayList + + fun getScalingFactor(): Double + + fun getOrigin(): KMVec3D + + fun viewportSizeChanged() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt new file mode 100644 index 000000000..8cafebced --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCameraInterpolation( + stops: ArrayList, +) { + val stops: ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt new file mode 100644 index 000000000..4119e05bc --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCameraInterpolationValue( + stop: Float, + value: Float, +) { + val stop: Float + val value: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt new file mode 100644 index 000000000..281073774 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCircleD( + x: Double, + y: Double, + radius: Double, +) { + val x: Double + val y: Double + val radius: Double +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt new file mode 100644 index 000000000..387b4bd1a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCircleF( + x: Float, + y: Float, + radius: Float, +) { + val x: Float + val y: Float + val radius: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt new file mode 100644 index 000000000..549414bef --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCircleI( + x: Int, + y: Int, + radius: Int, +) { + val x: Int + val y: Int + val radius: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt new file mode 100644 index 000000000..ed0d82586 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMColor( + r: Float, + g: Float, + b: Float, + a: Float, +) { + val r: Float + val g: Float + val b: Float + val a: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt new file mode 100644 index 000000000..16d14834c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMColorCircleShaderInterface constructor(nativeHandle: Any) { + + fun setColor(red: Float, green: Float, blue: Float, alpha: Float) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt new file mode 100644 index 000000000..998e3e002 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMColorShaderInterface constructor(nativeHandle: Any) { + + fun setColor(red: Float, green: Float, blue: Float, alpha: Float) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt new file mode 100644 index 000000000..734145c8d --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from styling.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMColorStateList( + normal: KMColor, + highlighted: KMColor, +) { + val normal: KMColor + val highlighted: KMColor +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt new file mode 100644 index 000000000..533669006 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMComputeObjectInterface { + + fun compute(context: KMRenderingContextInterface, vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt new file mode 100644 index 000000000..549e4246a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMComputePassInterface { + + fun getComputeObjects(): ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt new file mode 100644 index 000000000..752b3b1b1 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCoord( + systemIdentifier: Int, + x: Double, + y: Double, + z: Double, +) { + val systemIdentifier: Int + val x: Double + val y: Double + val z: Double +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt new file mode 100644 index 000000000..60e855225 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCoordinateConversionHelperInterface constructor(nativeHandle: Any) { + + fun registerConverter(converter: KMCoordinateConverterInterface) + + fun convert(to: Int, coordinate: KMCoord): KMCoord + + fun convertRect(to: Int, rect: KMRectCoord): KMRectCoord + + fun convertRectToRenderSystem(rect: KMRectCoord): KMRectCoord + + fun convertQuad(to: Int, quad: KMQuadCoord): KMQuadCoord + + fun convertQuadToRenderSystem(quad: KMQuadCoord): KMQuadCoord + + fun convertToRenderSystem(coordinate: KMCoord): KMCoord + + companion object + { + + fun independentInstance(): KMCoordinateConversionHelperInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt new file mode 100644 index 000000000..2956b0b40 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMCoordinateConverterInterface { + + fun convert(coordinate: KMCoord): KMCoord + + fun getFrom(): Int + + fun getTo(): Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt new file mode 100644 index 000000000..dcc97530e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -0,0 +1,21 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCoordinateSystemFactory constructor(nativeHandle: Any) { + + companion object + { + + fun getEpsg2056System(): KMMapCoordinateSystem + + fun getEpsg3857System(): KMMapCoordinateSystem + + fun getEpsg4326System(): KMMapCoordinateSystem + + fun getEpsg21781System(): KMMapCoordinateSystem + + fun getUnitSphereSystem(): KMMapCoordinateSystem + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt new file mode 100644 index 000000000..5485a8258 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCoordinateSystemIdentifiers constructor(nativeHandle: Any) { + + companion object + { + + fun RENDERSYSTEM(): Int + + fun EPSG3857(): Int + + fun EPSG4326(): Int + + fun EPSG2056(): Int + + fun EPSG21781(): Int + + fun UnitSphere(): Int + + fun fromCrsIdentifier(identifier: String): Int + + fun unitToMeterFactor(coordinateSystemIdentifier: Int): Double + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt new file mode 100644 index 000000000..00437eaf5 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMCpuPerformanceLoggerInterface constructor(nativeHandle: Any) { + + fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface + + companion object + { + + fun create(): KMCpuPerformanceLoggerInterface + + fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMCpuPerformanceLoggerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt new file mode 100644 index 000000000..4320c4529 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMDataLoaderResult( + data: KMDataRef?, + etag: String?, + status: KMLoaderStatus, + errorCode: String?, +) { + val data: KMDataRef? + val etag: String? + val status: KMLoaderStatus + val errorCode: String? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt new file mode 100644 index 000000000..2a69dc801 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMDefaultTiled2dMapLayerConfigs constructor(nativeHandle: Any) { + + companion object + { + + fun webMercator(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig + + fun webMercatorCustom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo?, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig + + fun epsg4326(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig + + fun epsg4326Custom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt new file mode 100644 index 000000000..39f1ccbf9 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMDefaultTouchHandlerInterface constructor(nativeHandle: Any) { + + companion object + { + + fun create(scheduler: KMSchedulerInterface, density: Float): KMTouchHandlerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt new file mode 100644 index 000000000..3fa7c5d48 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMElevationInterpolationShaderInterface constructor(nativeHandle: Any) { + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt new file mode 100644 index 000000000..af1ba5302 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -0,0 +1,25 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMErrorManager constructor(nativeHandle: Any) { + + fun addTiledLayerError(error: KMTiledLayerError) + + fun removeError(url: String) + + fun removeAllErrorsForLayer(layerName: String) + + fun clearAllErrors() + + fun addErrorListener(listener: KMErrorManagerListener) + + fun removeErrorListener(listener: KMErrorManagerListener) + + companion object + { + + fun create(): KMErrorManager + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt new file mode 100644 index 000000000..88cbf4efc --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMErrorManagerListener { + + fun onTiledLayerErrorStateChanged(errors: ArrayList) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt new file mode 100644 index 000000000..a18507021 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from exception_logger.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMExceptionLoggerDelegateInterface { + + fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt new file mode 100644 index 000000000..961e12600 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from exception_logger.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMExceptionLoggerInterface constructor(nativeHandle: Any) { + + companion object + { + + fun setLoggerDelegate(delegate: KMExceptionLoggerDelegateInterface) + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt new file mode 100644 index 000000000..1a88f2b38 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMExecutionEnvironment { + IO, + COMPUTATION, + GRAPHICS, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt new file mode 100644 index 000000000..a2616cedf --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -0,0 +1,25 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMFeatureInfoValueFactory constructor(nativeHandle: Any) { + + companion object + { + + fun createString(value: String): KMVectorLayerFeatureInfoValue + + fun createDouble(value: Double): KMVectorLayerFeatureInfoValue + + fun createInt(value: Long): KMVectorLayerFeatureInfoValue + + fun createBool(value: Boolean): KMVectorLayerFeatureInfoValue + + fun createColor(value: KMColor): KMVectorLayerFeatureInfoValue + + fun createListFloat(value: ArrayList): KMVectorLayerFeatureInfoValue + + fun createListString(value: ArrayList): KMVectorLayerFeatureInfoValue + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt new file mode 100644 index 000000000..4a7403008 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMFont( + name: String, +) { + val name: String +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt new file mode 100644 index 000000000..a4e18af55 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMFontData( + info: KMFontWrapper, + glyphs: ArrayList, +) { + val info: KMFontWrapper + val glyphs: ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt new file mode 100644 index 000000000..86c68a856 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt @@ -0,0 +1,18 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMFontGlyph( + charCode: String, + advance: KMVec2D, + boundingBoxSize: KMVec2D, + bearing: KMVec2D, + uv: KMQuad2dD, +) { + val charCode: String + val advance: KMVec2D + val boundingBoxSize: KMVec2D + val bearing: KMVec2D + val uv: KMQuad2dD +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt new file mode 100644 index 000000000..fd3fd1bd6 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMFontLoaderInterface { + + fun loadFont(font: KMFont): KMFontLoaderResult +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt new file mode 100644 index 000000000..dfe50b4a1 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMFontLoaderResult( + imageData: KMTextureHolderInterface?, + fontData: KMFontData?, + status: KMLoaderStatus, +) { + val imageData: KMTextureHolderInterface? + val fontData: KMFontData? + val status: KMLoaderStatus +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt new file mode 100644 index 000000000..3124d1c50 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt @@ -0,0 +1,20 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMFontWrapper( + name: String, + lineHeight: Double, + base: Double, + bitmapSize: KMVec2D, + size: Double, + distanceRange: Double, +) { + val name: String + val lineHeight: Double + val base: Double + val bitmapSize: KMVec2D + val size: Double + val distanceRange: Double +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt new file mode 100644 index 000000000..e12bc4f46 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMFormattedStringEntry( + text: String, + scale: Float, +) { + val text: String + val scale: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt new file mode 100644 index 000000000..265c14b7d --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMGeoJsonFeatureParserInterface constructor(nativeHandle: Any) { + + fun parse(geoJson: String): ArrayList? + + fun parseWithPointGeometry(geoJson: String): ArrayList? + + fun parseWithLineGeometry(geoJson: String): ArrayList? + + companion object + { + + fun create(): KMGeoJsonFeatureParserInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt new file mode 100644 index 000000000..b713f040c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMGeoJsonHelperInterface constructor(nativeHandle: Any) { + + fun geoJsonStringFromFeatureInfo(point: KMGeoJsonPoint): String + + fun geoJsonStringFromFeatureInfos(points: ArrayList): String + + companion object + { + + fun independentInstance(): KMGeoJsonHelperInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt new file mode 100644 index 000000000..5fd899ee3 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMGeoJsonLine( + points: ArrayList, + featureInfo: KMVectorLayerFeatureInfo, +) { + val points: ArrayList + val featureInfo: KMVectorLayerFeatureInfo +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt new file mode 100644 index 000000000..126d9b241 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMGeoJsonPoint( + point: KMCoord, + featureInfo: KMVectorLayerFeatureInfo, +) { + val point: KMCoord + val featureInfo: KMVectorLayerFeatureInfo +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt new file mode 100644 index 000000000..6a1b4fd43 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMGlyphDescription( + frame: KMQuad2dD, + textureCoordinates: KMQuad2dD, +) { + val frame: KMQuad2dD + val textureCoordinates: KMQuad2dD +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt new file mode 100644 index 000000000..8241bdd4b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMGraphicsObjectFactoryInterface { + + fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface + + fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface + + fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface + + fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface + + fun createQuadStretchedInstanced(shader: KMShaderProgramInterface): KMQuad2dStretchedInstancedInterface + + fun createLineGroup(shader: KMShaderProgramInterface): KMLineGroup2dInterface + + fun createPolygonGroup(shader: KMShaderProgramInterface): KMPolygonGroup2dInterface + + fun createPolygonPatternGroup(shader: KMShaderProgramInterface): KMPolygonPatternGroup2dInterface + + fun createQuadMask(is3d: Boolean): KMQuad2dInterface + + fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface + + fun createText(shader: KMShaderProgramInterface): KMTextInterface + + fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt new file mode 100644 index 000000000..a6631895c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMGraphicsObjectInterface { + + fun isReady(): Boolean + + fun setup(context: KMRenderingContextInterface) + + fun clear() + + fun setIsInverseMasked(inversed: Boolean) + + fun setDebugLabel(label: String) + + fun render(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt new file mode 100644 index 000000000..9895bea80 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMIconFactory constructor(nativeHandle: Any) { + + companion object + { + + fun createIcon(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode): KMIconInfoInterface + + fun createIconWithAnchor(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode, iconAnchor: KMVec2F): KMIconInfoInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt new file mode 100644 index 000000000..22c5e4129 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMIconInfoInterface constructor(nativeHandle: Any) { + + fun getIdentifier(): String + + fun getTexture(): KMTextureHolderInterface + + fun setCoordinate(coord: KMCoord) + + fun getCoordinate(): KMCoord + + fun setIconSize(size: KMVec2F) + + fun getIconSize(): KMVec2F + + fun setType(scaleType: KMIconType) + + fun getType(): KMIconType + + fun getIconAnchor(): KMVec2F + + fun getBlendMode(): KMBlendMode +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt new file mode 100644 index 000000000..281eb1fa2 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMIconLayerCallbackInterface { + + fun onClickConfirmed(icons: ArrayList): Boolean + + fun onLongPress(icons: ArrayList): Boolean +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt new file mode 100644 index 000000000..b232a0ed7 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -0,0 +1,43 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMIconLayerInterface constructor(nativeHandle: Any) { + + fun setIcons(icons: ArrayList) + + fun getIcons(): ArrayList + + fun remove(icon: KMIconInfoInterface) + + fun removeList(icons: ArrayList) + + fun removeIdentifier(identifier: String) + + fun removeIdentifierList(identifiers: ArrayList) + + fun add(icon: KMIconInfoInterface) + + fun addList(icons: ArrayList) + + fun clear() + + fun setCallbackHandler(handler: KMIconLayerCallbackInterface) + + fun asLayerInterface(): KMLayerInterface + + fun invalidate() + + fun setLayerClickable(isLayerClickable: Boolean) + + fun setRenderPassIndex(index: Int) + + fun animateIconScale(identifier: String, from: Float, to: Float, duration: Float, repetitions: Int) + + companion object + { + + fun create(): KMIconLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt new file mode 100644 index 000000000..63245d5a5 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMIconTextFit { + NONE, + WIDTH, + HEIGHT, + BOTH, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt new file mode 100644 index 000000000..894c6bb0c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMIconType { + SCALE_INVARIANT, + ROTATION_INVARIANT, + INVARIANT, + FIXED, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt new file mode 100644 index 000000000..67089238f --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMIcosahedronInterface { + + fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + fun asGraphicsObject(): KMGraphicsObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt new file mode 100644 index 000000000..1ddad8fa9 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icosahedron.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMIcosahedronLayerCallbackInterface { + + fun getData(): KMFuture +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt new file mode 100644 index 000000000..2b09fafb9 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icosahedron.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMIcosahedronLayerInterface constructor(nativeHandle: Any) { + + fun asLayerInterface(): KMLayerInterface + + companion object + { + + fun create(callbackHandler: KMIcosahedronLayerCallbackInterface): KMIcosahedronLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt new file mode 100644 index 000000000..151457d39 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMIndexedLayerInterface { + + fun getLayerInterface(): KMLayerInterface + + fun getIndex(): Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt new file mode 100644 index 000000000..d54773662 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -0,0 +1,43 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMLayerInterface { + + fun setMaskingObject(maskingObject: KMMaskingObjectInterface?) + + fun update() + + fun buildRenderPasses(): ArrayList + + fun buildComputePasses(): ArrayList + + fun onAdded(mapInterface: KMMapInterface, layerIndex: Int) + + fun onRemoved() + + fun pause() + + fun resume() + + fun hide() + + fun show() + + fun setAlpha(alpha: Float) + + fun getAlpha(): Float + + fun setScissorRect(scissorRect: KMRectI?) + + fun isReadyToRenderOffscreen(): KMLayerReadyState + + fun enableAnimations(enabled: Boolean) + + fun setErrorManager(errorManager: KMErrorManager) + + fun forceReload() + + fun setPrimaryRenderTarget(target: KMRenderTargetInterface?) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt new file mode 100644 index 000000000..421589459 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from layer_object.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMLayerObjectInterface constructor(nativeHandle: Any) { + + fun update() + + fun getRenderConfig(): ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt new file mode 100644 index 000000000..6c74c345e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMLayerReadyState { + READY, + NOT_READY, + ERROR, + TIMEOUT_ERROR, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt new file mode 100644 index 000000000..5ed539e67 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMLineCapType { + BUTT, + ROUND, + SQUARE, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt new file mode 100644 index 000000000..37df20137 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMLineFactory constructor(nativeHandle: Any) { + + companion object + { + + fun createLine(identifier: String, coordinates: ArrayList, style: KMLineStyle): KMLineInfoInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt new file mode 100644 index 000000000..832dbb1da --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMLineGroup2dInterface { + + fun setLines(lines: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) + + fun asGraphicsObject(): KMGraphicsObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt new file mode 100644 index 000000000..2dc8fbe0d --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMLineGroupShaderInterface constructor(nativeHandle: Any) { + + fun setStyles(styles: KMSharedBytes) + + fun setDashingScaleFactor(factor: Float) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt new file mode 100644 index 000000000..1775ad6fc --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMLineInfoInterface constructor(nativeHandle: Any) { + + fun getIdentifier(): String + + fun getCoordinates(): ArrayList + + fun getStyle(): KMLineStyle +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt new file mode 100644 index 000000000..1b13972b4 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMLineJoinType { + BEVEL, + ROUND, + MITER, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt new file mode 100644 index 000000000..a06ab4467 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMLineLayerCallbackInterface { + + fun onLineClickConfirmed(line: KMLineInfoInterface) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt new file mode 100644 index 000000000..7e31b678b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -0,0 +1,37 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMLineLayerInterface constructor(nativeHandle: Any) { + + fun setLines(lines: ArrayList) + + fun getLines(): ArrayList + + fun remove(line: KMLineInfoInterface) + + fun add(line: KMLineInfoInterface) + + fun clear() + + fun setCallbackHandler(handler: KMLineLayerCallbackInterface) + + fun asLayerInterface(): KMLayerInterface + + fun invalidate() + + fun resetSelection() + + fun setSelected(selectedIds: HashSet) + + fun setLayerClickable(isLayerClickable: Boolean) + + fun setRenderPassIndex(index: Int) + + companion object + { + + fun create(): KMLineLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt new file mode 100644 index 000000000..0ed87181d --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt @@ -0,0 +1,36 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMLineStyle( + color: KMColorStateList, + gapColor: KMColorStateList, + opacity: Float, + blur: Float, + widthType: KMSizeType, + width: Float, + dashArray: ArrayList, + dashFade: Float, + dashAnimationSpeed: Float, + lineCap: KMLineCapType, + lineJoin: KMLineJoinType, + offset: Float, + dotted: Boolean, + dottedSkew: Float, +) { + val color: KMColorStateList + val gapColor: KMColorStateList + val opacity: Float + val blur: Float + val widthType: KMSizeType + val width: Float + val dashArray: ArrayList + val dashFade: Float + val dashAnimationSpeed: Float + val lineCap: KMLineCapType + val lineJoin: KMLineJoinType + val offset: Float + val dotted: Boolean + val dottedSkew: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt new file mode 100644 index 000000000..5174a8c33 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMLoaderInterface { + + fun loadTexture(url: String, etag: String?): KMTextureLoaderResult + + fun loadData(url: String, etag: String?): KMDataLoaderResult + + fun loadTextureAsync(url: String, etag: String?): KMFuture + + fun loadDataAsync(url: String, etag: String?): KMFuture + + fun cancel(url: String) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt new file mode 100644 index 000000000..d5c96d8c7 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMLoaderStatus { + OK, + NOOP, + ERROR_TIMEOUT, + ERROR_NETWORK, + ERROR_OTHER, + ERROR_400, + ERROR_404, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt new file mode 100644 index 000000000..cda2ed229 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMLoggerData( + id: String, + buckets: ArrayList, + bucketSizeMs: Int, + start: Long, + end: Long, + numSamples: Long, + average: Double, + variance: Double, + stdDeviation: Double, +) { + val id: String + val buckets: ArrayList + val bucketSizeMs: Int + val start: Long + val end: Long + val numSamples: Long + val average: Double + val variance: Double + val stdDeviation: Double +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt new file mode 100644 index 000000000..426c17bd9 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMMapCallbackInterface { + + fun invalidate() + + fun onMapResumed() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt new file mode 100644 index 000000000..477fbf407 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMMapCamera3dInterface constructor(nativeHandle: Any) { + + fun getCameraConfig(): KMCamera3dConfig + + fun setCameraConfig(config: KMCamera3dConfig, durationSeconds: Float?, targetZoom: Float?, targetCoordinate: KMCoord?) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt new file mode 100644 index 000000000..02630a0e2 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -0,0 +1,107 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMMapCameraInterface constructor(nativeHandle: Any) { + + fun freeze(freeze: Boolean) + + fun moveToCenterPositionZoom(centerPosition: KMCoord, zoom: Double, animated: Boolean) + + fun moveToCenterPosition(centerPosition: KMCoord, animated: Boolean) + + fun moveToBoundingBox(boundingBox: KMRectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) + + fun getCenterPosition(): KMCoord + + fun setZoom(zoom: Double, animated: Boolean) + + fun getZoom(): Double + + fun setRotation(angle: Float, animated: Boolean) + + fun getRotation(): Float + + fun setMinZoom(minZoom: Double) + + fun setMaxZoom(maxZoom: Double) + + fun getMinZoom(): Double + + fun getMaxZoom(): Double + + fun setBounds(bounds: KMRectCoord) + + fun getBounds(): KMRectCoord + + fun isInBounds(coords: KMCoord): Boolean + + fun setPaddingLeft(padding: Float) + + fun setPaddingRight(padding: Float) + + fun setPaddingTop(padding: Float) + + fun setPaddingBottom(padding: Float) + + fun getVisibleRect(): KMRectCoord + + fun getPaddingAdjustedVisibleRect(): KMRectCoord + + fun getScreenDensityPpi(): Float + + fun update() + + fun getInvariantModelMatrix(coordinate: KMCoord, scaleInvariant: Boolean, rotationInvariant: Boolean): ArrayList + + fun addListener(listener: KMMapCameraListenerInterface) + + fun removeListener(listener: KMMapCameraListenerInterface) + + fun notifyListenerBoundsChange() + + fun coordFromScreenPosition(posScreen: KMVec2F): KMCoord + + fun coordFromScreenPositionZoom(posScreen: KMVec2F, zoom: Float): KMCoord + + fun screenPosFromCoord(coord: KMCoord): KMVec2F + + fun screenPosFromCoordZoom(coord: KMCoord, zoom: Float): KMVec2F + + fun mapUnitsFromPixels(distancePx: Double): Double + + fun getScalingFactor(): Double + + fun coordIsVisibleOnScreen(coord: KMCoord, paddingPc: Float): Boolean + + fun setRotationEnabled(enabled: Boolean) + + fun setSnapToNorthEnabled(enabled: Boolean) + + fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) + + fun asCameraInterface(): KMCameraInterface + + fun getLastVpMatrixD(): ArrayList? + + fun getLastVpMatrix(): ArrayList? + + fun getLastInverseVpMatrix(): ArrayList? + + fun getLastVpMatrixViewBounds(): KMRectCoord? + + fun getLastVpMatrixRotation(): Float? + + fun getLastVpMatrixZoom(): Float? + + fun getLastCameraPosition(): KMVec3D? + + fun asMapCamera3d(): KMMapCamera3dInterface? + + companion object + { + + fun create(mapInterface: KMMapInterface, screenDensityPpi: Float, is3D: Boolean): KMMapCameraInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt new file mode 100644 index 000000000..7d09a791a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from camera.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMMapCameraListenerInterface { + + fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, zoom: Double) + + fun onRotationChanged(angle: Float) + + fun onMapInteraction() + + fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt new file mode 100644 index 000000000..595a6a65b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMMapConfig( + mapCoordinateSystem: KMMapCoordinateSystem, +) { + val mapCoordinateSystem: KMMapCoordinateSystem +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt new file mode 100644 index 000000000..595b49fe3 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMMapCoordinateSystem( + identifier: Int, + bounds: KMRectCoord, + unitToScreenMeterFactor: Float, +) { + val identifier: Int + val bounds: KMRectCoord + val unitToScreenMeterFactor: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt new file mode 100644 index 000000000..d7e7562e4 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -0,0 +1,85 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMMapInterface constructor(nativeHandle: Any) { + + fun setCallbackHandler(callbackInterface: KMMapCallbackInterface?) + + fun getGraphicsObjectFactory(): KMGraphicsObjectFactoryInterface + + fun getShaderFactory(): KMShaderFactoryInterface + + fun getScheduler(): KMSchedulerInterface + + fun getRenderingContext(): KMRenderingContextInterface + + fun getMapConfig(): KMMapConfig + + fun getCoordinateConverterHelper(): KMCoordinateConversionHelperInterface + + fun setCamera(camera: KMMapCameraInterface) + + fun getCamera(): KMMapCameraInterface + + fun setTouchHandler(touchHandler: KMTouchHandlerInterface) + + fun getTouchHandler(): KMTouchHandlerInterface + + fun setPerformanceLoggers(performanceLoggers: ArrayList) + + fun getPerformanceLoggers(): ArrayList + + fun getLayers(): ArrayList + + fun getLayersIndexed(): ArrayList + + fun addLayer(layer: KMLayerInterface) + + fun insertLayerAt(layer: KMLayerInterface, atIndex: Int) + + fun insertLayerAbove(layer: KMLayerInterface, above: KMLayerInterface) + + fun insertLayerBelow(layer: KMLayerInterface, below: KMLayerInterface) + + fun removeLayer(layer: KMLayerInterface) + + fun setViewportSize(size: KMVec2I) + + fun setBackgroundColor(color: KMColor) + + fun is3d(): Boolean + + fun invalidate() + + fun resetIsInvalidated() + + fun prepare() + + fun getNeedsCompute(): Boolean + + fun drawOffscreenFrame(target: KMRenderTargetInterface) + + fun drawFrame() + + fun compute() + + fun resume() + + fun pause() + + fun destroy() + + fun drawReadyFrame(bounds: KMRectCoord, paddingPc: Float, timeout: Float, callbacks: KMMapReadyCallbackInterface) + + fun forceReload() + + companion object + { + + fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface, mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface + + fun createWithOpenGl(mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt new file mode 100644 index 000000000..b117cb210 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMMapReadyCallbackInterface { + + fun stateDidUpdate(state: KMLayerReadyState) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt new file mode 100644 index 000000000..4463160ef --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from maps_core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMMapsCoreSharedModule constructor(nativeHandle: Any) { + + companion object + { + + fun version(): String + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt new file mode 100644 index 000000000..67c9d0f2c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMMaskingObjectInterface { + + fun asGraphicsObject(): KMGraphicsObjectInterface + + fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt new file mode 100644 index 000000000..1e47fa295 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMOpenGlPerformanceLoggerInterface constructor(nativeHandle: Any) { + + fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface + + companion object + { + + fun create(): KMOpenGlPerformanceLoggerInterface + + fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMOpenGlPerformanceLoggerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt new file mode 100644 index 000000000..52daa5025 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMOpenGlRenderTargetInterface { + + fun asRenderTargetInterface(): KMRenderTargetInterface + + fun setup(size: KMVec2I) + + fun clear() + + fun bindFramebuffer(renderingContext: KMRenderingContextInterface) + + fun unbindFramebuffer() + + fun getTextureId(): Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt new file mode 100644 index 000000000..161bbccd4 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -0,0 +1,25 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMOpenGlRenderingContextInterface { + + fun resume() + + fun pause() + + fun getCreateRenderTarget(name: String, textureFilter: KMTextureFilterType, clearColor: KMColor, usesDepthStencil: Boolean): KMOpenGlRenderTargetInterface + + fun deleteRenderTarget(name: String) + + fun getRenderTargets(): ArrayList + + fun getProgram(name: String): Int + + fun storeProgram(name: String, program: Int) + + fun getAspectRatio(): Float + + fun getDeltaTimeMs(): Long +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt new file mode 100644 index 000000000..b95922941 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt @@ -0,0 +1,21 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMPerformanceLoggerInterface { + + fun getLoggerName(): String + + fun startLog(id: String) + + fun endLog(id: String) + + fun getStatistics(id: String): KMLoggerData? + + fun getAllStatistics(): ArrayList + + fun resetData() + + fun setLoggingEnabled(enabled: Boolean) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt new file mode 100644 index 000000000..ad8b63ba5 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMPolygon2dInterface { + + fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + fun asGraphicsObject(): KMGraphicsObjectInterface + + fun asMaskingObject(): KMMaskingObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt new file mode 100644 index 000000000..426743ce5 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMPolygonCoord( + positions: ArrayList, + holes: ArrayList>, +) { + val positions: ArrayList + val holes: ArrayList> +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt new file mode 100644 index 000000000..fe7c3af07 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMPolygonGroup2dInterface { + + fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + fun asGraphicsObject(): KMGraphicsObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt new file mode 100644 index 000000000..c08848e48 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMPolygonGroupShaderInterface constructor(nativeHandle: Any) { + + fun setStyles(styles: KMSharedBytes) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt new file mode 100644 index 000000000..f347b7917 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMPolygonInfo( + identifier: String, + coordinates: KMPolygonCoord, + color: KMColor, + highlightColor: KMColor, +) { + val identifier: String + val coordinates: KMPolygonCoord + val color: KMColor + val highlightColor: KMColor +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt new file mode 100644 index 000000000..251d43f0e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMPolygonLayerCallbackInterface { + + fun onClickConfirmed(polygon: KMPolygonInfo): Boolean + + fun onClickUnconfirmed(polygon: KMPolygonInfo): Boolean +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt new file mode 100644 index 000000000..db3288a56 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -0,0 +1,35 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMPolygonLayerInterface constructor(nativeHandle: Any) { + + fun setPolygons(polygons: ArrayList, origin: KMVec3D) + + fun getPolygons(): ArrayList + + fun remove(polygon: KMPolygonInfo) + + fun add(polygon: KMPolygonInfo) + + fun addAll(polygons: ArrayList) + + fun clear() + + fun setCallbackHandler(handler: KMPolygonLayerCallbackInterface) + + fun asLayerInterface(): KMLayerInterface + + fun resetSelection() + + fun setLayerClickable(isLayerClickable: Boolean) + + fun setRenderPassIndex(index: Int) + + companion object + { + + fun create(): KMPolygonLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt new file mode 100644 index 000000000..550f6ce36 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMPolygonMaskObjectInterface constructor(nativeHandle: Any) { + + fun setPolygons(polygons: ArrayList, origin: KMVec3D) + + fun setPolygon(polygon: KMPolygonCoord, origin: KMVec3D) + + fun getPolygonObject(): KMPolygon2dInterface + + companion object + { + + fun create(graphicsObjectFactory: KMGraphicsObjectFactoryInterface, conversionHelper: KMCoordinateConversionHelperInterface, is3d: Boolean): KMPolygonMaskObjectInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt new file mode 100644 index 000000000..edc10913e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMPolygonPatternGroup2dInterface { + + fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + fun setOpacities(values: KMSharedBytes) + + fun setTextureCoordinates(values: KMSharedBytes) + + fun setScalingFactor(factor: Float) + + fun setScalingFactors(factor: KMVec2F) + + fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + fun removeTexture() + + fun asGraphicsObject(): KMGraphicsObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt new file mode 100644 index 000000000..2bf16d67c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMPolygonPatternGroupShaderInterface constructor(nativeHandle: Any) { + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt new file mode 100644 index 000000000..4a985bf6a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMPolygonStyle( + color: KMColor, + opacity: Float, +) { + val color: KMColor + val opacity: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt new file mode 100644 index 000000000..7618ef971 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMQuad2dD( + topLeft: KMVec2D, + topRight: KMVec2D, + bottomRight: KMVec2D, + bottomLeft: KMVec2D, +) { + val topLeft: KMVec2D + val topRight: KMVec2D + val bottomRight: KMVec2D + val bottomLeft: KMVec2D +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt new file mode 100644 index 000000000..fa17ac824 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMQuad2dInstancedInterface { + + fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + fun setInstanceCount(count: Int) + + fun setPositions(positions: KMSharedBytes) + + fun setScales(scales: KMSharedBytes) + + fun setRotations(rotations: KMSharedBytes) + + fun setAlphas(values: KMSharedBytes) + + fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + fun setPositionOffset(offsets: KMSharedBytes) + + fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + fun removeTexture() + + fun asGraphicsObject(): KMGraphicsObjectInterface + + fun asMaskingObject(): KMMaskingObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt new file mode 100644 index 000000000..864088dbb --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -0,0 +1,21 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMQuad2dInterface { + + fun setFrame(frame: KMQuad3dD, textureCoordinates: KMRectD, origin: KMVec3D, is3d: Boolean) + + fun setSubdivisionFactor(factor: Int) + + fun setMinMagFilter(filterType: KMTextureFilterType) + + fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + fun removeTexture() + + fun asGraphicsObject(): KMGraphicsObjectInterface + + fun asMaskingObject(): KMMaskingObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt new file mode 100644 index 000000000..f315f3183 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMQuad2dStretchedInstancedInterface { + + fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + fun setInstanceCount(count: Int) + + fun setPositions(positions: KMSharedBytes) + + fun setScales(scales: KMSharedBytes) + + fun setRotations(rotations: KMSharedBytes) + + fun setAlphas(values: KMSharedBytes) + + fun setStretchInfos(values: KMSharedBytes) + + fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + fun removeTexture() + + fun asGraphicsObject(): KMGraphicsObjectInterface + + fun asMaskingObject(): KMMaskingObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt new file mode 100644 index 000000000..e75a62574 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMQuad3dD( + topLeft: KMVec3D, + topRight: KMVec3D, + bottomRight: KMVec3D, + bottomLeft: KMVec3D, +) { + val topLeft: KMVec3D + val topRight: KMVec3D + val bottomRight: KMVec3D + val bottomLeft: KMVec3D +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt new file mode 100644 index 000000000..43fc0f4c4 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMQuadCoord( + topLeft: KMCoord, + topRight: KMCoord, + bottomRight: KMCoord, + bottomLeft: KMCoord, +) { + val topLeft: KMCoord + val topRight: KMCoord + val bottomRight: KMCoord + val bottomLeft: KMCoord +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt new file mode 100644 index 000000000..b8f9e6fdd --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRasterShaderInterface constructor(nativeHandle: Any) { + + fun setStyle(style: KMRasterShaderStyle) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt new file mode 100644 index 000000000..c8a319b49 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRasterShaderStyle( + opacity: Float, + brightnessMin: Float, + brightnessMax: Float, + contrast: Float, + saturation: Float, + gamma: Float, + brightnessShift: Float, +) { + val opacity: Float + val brightnessMin: Float + val brightnessMax: Float + val contrast: Float + val saturation: Float + val gamma: Float + val brightnessShift: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt new file mode 100644 index 000000000..2d5a4c5df --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRectCoord( + topLeft: KMCoord, + bottomRight: KMCoord, +) { + val topLeft: KMCoord + val bottomRight: KMCoord +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt new file mode 100644 index 000000000..641bb7436 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRectD( + x: Double, + y: Double, + width: Double, + height: Double, +) { + val x: Double + val y: Double + val width: Double + val height: Double +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt new file mode 100644 index 000000000..040102dfb --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRectF( + x: Float, + y: Float, + width: Float, + height: Float, +) { + val x: Float + val y: Float + val width: Float + val height: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt new file mode 100644 index 000000000..76b55183a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRectI( + x: Int, + y: Int, + width: Int, + height: Int, +) { + val x: Int + val y: Int + val width: Int + val height: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt new file mode 100644 index 000000000..a8ef7ba46 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRectanglePacker constructor(nativeHandle: Any) { + + companion object + { + + fun pack(rectangles: HashMap, maxPageSize: KMVec2I, spacing: Int): ArrayList + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt new file mode 100644 index 000000000..9879f4564 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRectanglePackerPage( + uvs: HashMap, +) { + val uvs: HashMap +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt new file mode 100644 index 000000000..61496e5ae --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from layer_object.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRenderConfigInterface constructor(nativeHandle: Any) { + + fun getGraphicsObject(): KMGraphicsObjectInterface + + fun getRenderIndex(): Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt new file mode 100644 index 000000000..b61c89c97 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRenderLineDescription( + positions: ArrayList, + styleIndex: Int, +) { + val positions: ArrayList + val styleIndex: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt new file mode 100644 index 000000000..036b32593 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMRenderObjectInterface { + + fun getGraphicsObject(): KMGraphicsObjectInterface + + fun hasCustomModelMatrix(): Boolean + + fun isScreenSpaceCoords(): Boolean + + fun getCustomModelMatrix(): ArrayList + + fun setHidden(hidden: Boolean) + + fun isHidden(): Boolean +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt new file mode 100644 index 000000000..c2f758384 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRenderPassConfig( + renderPassIndex: Int, + isPassMasked: Boolean, + renderTarget: KMRenderTargetInterface?, +) { + val renderPassIndex: Int + val isPassMasked: Boolean + val renderTarget: KMRenderTargetInterface? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt new file mode 100644 index 000000000..52844cd74 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMRenderPassInterface { + + fun getRenderObjects(): ArrayList + + fun addRenderObject(renderObject: KMRenderObjectInterface) + + fun getRenderPassConfig(): KMRenderPassConfig + + fun getMaskingObject(): KMMaskingObjectInterface? + + fun getScissoringRect(): KMRectI? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt new file mode 100644 index 000000000..223e3217f --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMRenderTargetInterface { + + fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt new file mode 100644 index 000000000..4509d227e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMRenderVerticesDescription( + vertices: ArrayList, + styleIndex: Int, +) { + val vertices: ArrayList + val styleIndex: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt new file mode 100644 index 000000000..b3c51e8f3 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMRendererInterface { + + fun addToRenderQueue(renderPass: KMRenderPassInterface) + + fun addToComputeQueue(computePass: KMComputePassInterface) + + fun drawFrame(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface, target: KMRenderTargetInterface?) + + fun compute(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt new file mode 100644 index 000000000..23dea0893 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMRenderingContextInterface { + + fun onSurfaceCreated() + + fun setViewportSize(size: KMVec2I) + + fun getViewportSize(): KMVec2I + + fun setBackgroundColor(color: KMColor) + + fun setCulling(mode: KMRenderingCullMode) + + fun setupDrawFrame(vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) + + fun preRenderStencilMask() + + fun postRenderStencilMask() + + fun applyScissorRect(scissorRect: KMRectI?) + + fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt new file mode 100644 index 000000000..23507151b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMRenderingCullMode { + FRONT, + BACK, + NONE, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt new file mode 100644 index 000000000..9989d3a0c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from reverse_geocoder.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMReverseGeocoderInterface constructor(nativeHandle: Any) { + + fun reverseGeocode(coord: KMCoord, thresholdMeters: Long): ArrayList + + fun reverseGeocodeClosest(coord: KMCoord, thresholdMeters: Long): KMVectorLayerFeatureCoordInfo? + + companion object + { + + fun create(loader: KMLoaderInterface, tileUrlTemplate: String, zoomLevel: Int): KMReverseGeocoderInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt new file mode 100644 index 000000000..12df7950b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMSceneCallbackInterface { + + fun invalidate() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt new file mode 100644 index 000000000..8613f4e76 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -0,0 +1,39 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMSceneInterface constructor(nativeHandle: Any) { + + fun setCallbackHandler(callbackInterface: KMSceneCallbackInterface) + + fun setCamera(camera: KMCameraInterface) + + fun getCamera(): KMCameraInterface + + fun getRenderer(): KMRendererInterface + + fun getRenderingContext(): KMRenderingContextInterface + + fun getGraphicsFactory(): KMGraphicsObjectFactoryInterface + + fun getShaderFactory(): KMShaderFactoryInterface + + fun prepare() + + fun drawFrame(target: KMRenderTargetInterface?) + + fun compute() + + fun clear() + + fun invalidate() + + companion object + { + + fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface): KMSceneInterface + + fun createWithOpenGl(): KMSceneInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt new file mode 100644 index 000000000..13334dda2 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMSchedulerGraphicsTaskCallbacks constructor(nativeHandle: Any) { + + fun requestGraphicsTaskExecution() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt new file mode 100644 index 000000000..35bff3149 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMSchedulerInterface { + + fun addTask(task: KMTaskInterface) + + fun addTasks(tasks: ArrayList) + + fun removeTask(id: String) + + fun clear() + + fun pause() + + fun resume() + + fun destroy() + + fun hasSeparateGraphicsInvocation(): Boolean + + fun runGraphicsTasks(): Boolean + + fun setSchedulerGraphicsTaskCallbacks(callbacks: KMSchedulerGraphicsTaskCallbacks) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt new file mode 100644 index 000000000..5fb91243a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -0,0 +1,57 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMShaderFactoryInterface { + + fun createAlphaShader(): KMAlphaShaderInterface + + fun createUnitSphereAlphaShader(): KMAlphaShaderInterface + + fun createAlphaInstancedShader(): KMAlphaInstancedShaderInterface + + fun createUnitSphereAlphaInstancedShader(): KMAlphaInstancedShaderInterface + + fun createLineGroupShader(): KMLineGroupShaderInterface + + fun createUnitSphereLineGroupShader(): KMLineGroupShaderInterface + + fun createSimpleLineGroupShader(): KMLineGroupShaderInterface + + fun createUnitSphereSimpleLineGroupShader(): KMLineGroupShaderInterface + + fun createUnitSphereColorShader(): KMColorShaderInterface + + fun createColorShader(): KMColorShaderInterface + + fun createColorCircleShader(): KMColorCircleShaderInterface + + fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface + + fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): KMPolygonGroupShaderInterface + + fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): KMPolygonPatternGroupShaderInterface + + fun createTextShader(): KMTextShaderInterface + + fun createTextInstancedShader(): KMTextInstancedShaderInterface + + fun createUnitSphereTextInstancedShader(): KMTextInstancedShaderInterface + + fun createRasterShader(): KMRasterShaderInterface + + fun createUnitSphereRasterShader(): KMRasterShaderInterface + + fun createStretchShader(): KMStretchShaderInterface + + fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface + + fun createIcosahedronColorShader(): KMColorShaderInterface + + fun createSphereEffectShader(): KMSphereEffectShaderInterface + + fun createSkySphereShader(): KMSkySphereShaderInterface + + fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt new file mode 100644 index 000000000..07ea17875 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMShaderProgramInterface constructor(nativeHandle: Any) { + + fun getProgramName(): String + + fun setupProgram(context: KMRenderingContextInterface) + + fun preRender(context: KMRenderingContextInterface, isScreenSpaceCoords: Boolean) + + fun setBlendMode(blendMode: KMBlendMode) + + fun usesModelMatrix(): Boolean +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt new file mode 100644 index 000000000..5323e4d38 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMSharedBytes( + address: Long, + elementCount: Int, + bytesPerElement: Int, +) { + val address: Long + val elementCount: Int + val bytesPerElement: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt new file mode 100644 index 000000000..5e39241e9 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from styling.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMSizeType { + SCREEN_PIXEL, + MAP_UNIT, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt new file mode 100644 index 000000000..c1d4b231b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -0,0 +1,17 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from sky_sphere.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMSkySphereLayerInterface constructor(nativeHandle: Any) { + + fun asLayerInterface(): KMLayerInterface + + fun setTexture(texture: KMTextureHolderInterface) + + companion object + { + + fun create(): KMSkySphereLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt new file mode 100644 index 000000000..082c12480 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMSkySphereShaderInterface constructor(nativeHandle: Any) { + + fun asShaderProgramInterface(): KMShaderProgramInterface + + fun setCameraProperties(inverseVP: ArrayList, cameraPosition: KMVec3D) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt new file mode 100644 index 000000000..88b1dbf51 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from sphere_effect.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMSphereEffectLayerInterface constructor(nativeHandle: Any) { + + fun asLayerInterface(): KMLayerInterface + + companion object + { + + fun create(): KMSphereEffectLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt new file mode 100644 index 000000000..d487e1e1d --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMSphereEffectShaderInterface constructor(nativeHandle: Any) { + + fun asShaderProgramInterface(): KMShaderProgramInterface + + fun setEllipse(coefficients: KMSharedBytes) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt new file mode 100644 index 000000000..e80fbf611 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMStretchInstancedShaderInterface constructor(nativeHandle: Any) { + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt new file mode 100644 index 000000000..ce27fc530 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMStretchShaderInfo( + scaleX: Float, + stretchX0Begin: Float, + stretchX0End: Float, + stretchX1Begin: Float, + stretchX1End: Float, + scaleY: Float, + stretchY0Begin: Float, + stretchY0End: Float, + stretchY1Begin: Float, + stretchY1End: Float, + uv: KMRectD, +) { + val scaleX: Float + val stretchX0Begin: Float + val stretchX0End: Float + val stretchX1Begin: Float + val stretchX1End: Float + val scaleY: Float + val stretchY0Begin: Float + val stretchY0End: Float + val stretchY1Begin: Float + val stretchY1End: Float + val uv: KMRectD +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt new file mode 100644 index 000000000..479f2f737 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMStretchShaderInterface constructor(nativeHandle: Any) { + + fun updateAlpha(value: Float) + + fun updateStretchInfo(info: KMStretchShaderInfo) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt new file mode 100644 index 000000000..94c681412 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMSymbolAlignment { + MAP, + VIEWPORT, + AUTO, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt new file mode 100644 index 000000000..1c2aeca40 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMSymbolZOrder { + AUTO, + VIEWPORT_Y, + SOURCE, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt new file mode 100644 index 000000000..aef9e5cc6 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTaskConfig( + id: String, + delay: Long, + priority: KMTaskPriority, + executionEnvironment: KMExecutionEnvironment, +) { + val id: String + val delay: Long + val priority: KMTaskPriority + val executionEnvironment: KMExecutionEnvironment +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt new file mode 100644 index 000000000..8e886427f --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTaskInterface { + + fun getConfig(): KMTaskConfig + + fun run() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt new file mode 100644 index 000000000..507a25188 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMTaskPriority { + HIGH, + NORMAL, + LOW, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt new file mode 100644 index 000000000..0af7b6d1f --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTextDescription( + glyphs: ArrayList, +) { + val glyphs: ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt new file mode 100644 index 000000000..b2403530f --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTextFactory constructor(nativeHandle: Any) { + + companion object + { + + fun createText(text: ArrayList, coordinate: KMCoord, font: KMFont, textAnchor: KMAnchor, textJustify: KMTextJustify): KMTextInfoInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt new file mode 100644 index 000000000..6a1e0377a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt @@ -0,0 +1,21 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTextInfoInterface { + + fun getText(): ArrayList + + fun getCoordinate(): KMCoord + + fun getFont(): KMFont + + fun getTextAnchor(): KMAnchor + + fun getTextJustify(): KMTextJustify + + fun getSymbolPlacement(): KMTextSymbolPlacement + + fun getLineCoordinates(): ArrayList? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt new file mode 100644 index 000000000..b810ad74e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -0,0 +1,33 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTextInstancedInterface { + + fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + fun setInstanceCount(count: Int) + + fun setPositions(positions: KMSharedBytes) + + fun setReferencePositions(positions: KMSharedBytes) + + fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + fun setScales(scales: KMSharedBytes) + + fun setRotations(rotations: KMSharedBytes) + + fun setAlphas(alphas: KMSharedBytes) + + fun setStyleIndices(indices: KMSharedBytes) + + fun setStyles(values: KMSharedBytes) + + fun loadFont(context: KMRenderingContextInterface, fontData: KMFontData, fontMsdfTexture: KMTextureHolderInterface) + + fun removeTexture() + + fun asGraphicsObject(): KMGraphicsObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt new file mode 100644 index 000000000..900775089 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTextInstancedShaderInterface constructor(nativeHandle: Any) { + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt new file mode 100644 index 000000000..1f10c7370 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTextInterface { + + fun setTextsShared(vertices: KMSharedBytes, indices: KMSharedBytes) + + fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + fun removeTexture() + + fun asGraphicsObject(): KMGraphicsObjectInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt new file mode 100644 index 000000000..19922bf71 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMTextJustify { + AUTO, + LEFT, + CENTER, + RIGHT, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt new file mode 100644 index 000000000..66e3334ef --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTextLayerInterface constructor(nativeHandle: Any) { + + fun setTexts(texts: ArrayList) + + fun asLayerInterface(): KMLayerInterface + + fun invalidate() + + companion object + { + + fun create(fontLoader: KMFontLoaderInterface): KMTextLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt new file mode 100644 index 000000000..00c3e724b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTextShaderInterface constructor(nativeHandle: Any) { + + fun setColor(color: KMColor) + + fun setOpacity(opacity: Float) + + fun setHaloColor(color: KMColor, width: Float, blur: Float) + + fun asShaderProgramInterface(): KMShaderProgramInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt new file mode 100644 index 000000000..9d1d5e766 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMTextSymbolPlacement { + POINT, + LINE, + LINE_CENTER, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt new file mode 100644 index 000000000..a3d5379d8 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTextureAtlas( + uvMap: HashMap, + texture: KMTextureHolderInterface?, +) { + val uvMap: HashMap + val texture: KMTextureHolderInterface? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt new file mode 100644 index 000000000..745560371 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMTextureFilterType { + NEAREST, + LINEAR, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt new file mode 100644 index 000000000..442b56e4e --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt @@ -0,0 +1,19 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTextureHolderInterface { + + fun getImageWidth(): Int + + fun getImageHeight(): Int + + fun getTextureWidth(): Int + + fun getTextureHeight(): Int + + fun attachToGraphics(): Int + + fun clearFromGraphics() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt new file mode 100644 index 000000000..3507977d2 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -0,0 +1,16 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTextureLoaderResult( + data: KMTextureHolderInterface?, + etag: String?, + status: KMLoaderStatus, + errorCode: String?, +) { + val data: KMTextureHolderInterface? + val etag: String? + val status: KMLoaderStatus + val errorCode: String? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt new file mode 100644 index 000000000..52e166542 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMThreadPoolScheduler constructor(nativeHandle: Any) { + + companion object + { + + fun create(): KMSchedulerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt new file mode 100644 index 000000000..1d14b9d05 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTiled2dMapLayerConfig { + + fun getCoordinateSystemIdentifier(): Int + + fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String + + fun getZoomLevelInfos(): ArrayList + + fun getVirtualZoomLevelInfos(): ArrayList + + fun getZoomInfo(): KMTiled2dMapZoomInfo + + fun getLayerName(): String + + fun getVectorSettings(): KMTiled2dMapVectorSettings? + + fun getBounds(): KMRectCoord? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt new file mode 100644 index 000000000..59faab1f1 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_raster_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTiled2dMapRasterLayerCallbackInterface { + + fun onClickConfirmed(coord: KMCoord): Boolean + + fun onLongPress(coord: KMCoord): Boolean +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt new file mode 100644 index 000000000..c2b13456b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -0,0 +1,53 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_raster_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiled2dMapRasterLayerInterface constructor(nativeHandle: Any) { + + fun asLayerInterface(): KMLayerInterface + + fun setCallbackHandler(handler: KMTiled2dMapRasterLayerCallbackInterface) + + fun getCallbackHandler(): KMTiled2dMapRasterLayerCallbackInterface? + + fun removeCallbackHandler() + + fun setAlpha(alpha: Float) + + fun getAlpha(): Float + + fun setStyle(style: KMRasterShaderStyle) + + fun getStyle(): KMRasterShaderStyle + + fun setMinMagFilter(filterType: KMTextureFilterType) + + fun setMinZoomLevelIdentifier(value: Int?) + + fun getMinZoomLevelIdentifier(): Int? + + fun setMaxZoomLevelIdentifier(value: Int?) + + fun getMaxZoomLevelIdentifier(): Int? + + fun setT(t: Int) + + fun setReadyStateListener(listener: KMTiled2dMapReadyStateListener?) + + fun getConfig(): KMTiled2dMapLayerConfig + + fun set3dSubdivisionFactor(factor: Int) + + fun setBlendMode(blendMode: KMBlendMode) + + companion object + { + + fun createWithMask(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, mask: KMMaskingObjectInterface): KMTiled2dMapRasterLayerInterface + + fun createWithShader(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, shader: KMShaderProgramInterface): KMTiled2dMapRasterLayerInterface + + fun create(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList): KMTiled2dMapRasterLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt new file mode 100644 index 000000000..6270c393c --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTiled2dMapReadyStateListener { + + fun stateUpdate(state: KMLayerReadyState) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt new file mode 100644 index 000000000..71b1f3259 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiled2dMapSourceInterface constructor(nativeHandle: Any) { + + fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, curT: Int, zoom: Double) + + fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) + + fun setMinZoomLevelIdentifier(value: Int?) + + fun getMinZoomLevelIdentifier(): Int? + + fun setMaxZoomLevelIdentifier(value: Int?) + + fun getMaxZoomLevelIdentifier(): Int? + + fun pause() + + fun resume() + + fun isReadyToRenderOffscreen(): KMLayerReadyState + + fun setErrorManager(errorManager: KMErrorManager) + + fun forceReload() + + fun notifyTilesUpdates() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt new file mode 100644 index 000000000..52f6e4fe4 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiled2dMapVectorAssetInfo( + featureIdentifiersUv: HashMap, + texture: KMTextureHolderInterface?, +) { + val featureIdentifiersUv: HashMap + val texture: KMTextureHolderInterface? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt new file mode 100644 index 000000000..bd21222ff --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -0,0 +1,43 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiled2dMapVectorLayerInterface constructor(nativeHandle: Any) { + + fun setSelectionDelegate(selectionDelegate: KMTiled2dMapVectorLayerSelectionCallbackInterface?) + + fun asLayerInterface(): KMLayerInterface + + fun setMinZoomLevelIdentifier(value: Int?) + + fun getMinZoomLevelIdentifier(): Int? + + fun setMaxZoomLevelIdentifier(value: Int?) + + fun getMaxZoomLevelIdentifier(): Int? + + fun getStyleMetadataJson(): String? + + fun setFeatureState(identifier: String, properties: HashMap) + + fun setGlobalState(properties: HashMap) + + fun getVisiblePointFeatureContexts(paddingPc: Float, sourceLayer: String?): ArrayList + + fun setReadyStateListener(listener: KMTiled2dMapReadyStateListener?) + + fun reloadDataSource(sourceName: String) + + fun reloadLocalDataSource(sourceName: String, geoJson: String) + + fun performClick(coord: KMCoord) + + companion object + { + + fun createFromStyleJson(layerName: String, styleJsonUrl: String, loaders: ArrayList, fontLoader: KMFontLoaderInterface): KMTiled2dMapVectorLayerInterface + + fun createExplicitly(layerName: String, styleJson: String?, localStyleJson: Boolean?, loaders: ArrayList, fontLoader: KMFontLoaderInterface, localDataProvider: KMTiled2dMapVectorLayerLocalDataProviderInterface?, customZoomInfo: KMTiled2dMapZoomInfo?, symbolDelegate: KMTiled2dMapVectorLayerSymbolDelegateInterface?, sourceUrlParams: HashMap?): KMTiled2dMapVectorLayerInterface + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt new file mode 100644 index 000000000..6eb0054bf --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTiled2dMapVectorLayerLocalDataProviderInterface { + + fun getStyleJson(): String? + + fun loadSpriteAsync(spriteId: String, url: String, scale: Int): KMFuture + + fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): KMFuture + + fun loadGeojson(sourceName: String, url: String): KMFuture +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt new file mode 100644 index 000000000..19923d524 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTiled2dMapVectorLayerSelectionCallbackInterface { + + fun didSelectFeature(featureInfo: KMVectorLayerFeatureInfo, layerIdentifier: String, coord: KMCoord): Boolean + + fun didMultiSelectLayerFeatures(featureInfos: ArrayList, layerIdentifier: String, coord: KMCoord): Boolean + + fun didClickBackgroundConfirmed(coord: KMCoord): Boolean +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt new file mode 100644 index 000000000..b1940f147 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTiled2dMapVectorLayerSymbolDelegateInterface { + + fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt new file mode 100644 index 000000000..901efd179 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiled2dMapVectorSettings( + tileOrigin: KMTiled2dMapVectorTileOrigin, +) { + val tileOrigin: KMTiled2dMapVectorTileOrigin +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt new file mode 100644 index 000000000..1e448e22a --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMTiled2dMapVectorTileOrigin { + TOP_LEFT, + BOTTOM_LEFT, + TOP_RIGHT, + BOTTOM_RIGHT, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt new file mode 100644 index 000000000..d00a6db92 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiled2dMapZoomInfo( + zoomLevelScaleFactor: Float, + numDrawPreviousLayers: Int, + numDrawPreviousOrLaterTLayers: Int, + adaptScaleToScreen: Boolean, + maskTile: Boolean, + underzoom: Boolean, + overzoom: Boolean, +) { + val zoomLevelScaleFactor: Float + val numDrawPreviousLayers: Int + val numDrawPreviousOrLaterTLayers: Int + val adaptScaleToScreen: Boolean + val maskTile: Boolean + val underzoom: Boolean + val overzoom: Boolean +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt new file mode 100644 index 000000000..685ce0037 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiled2dMapZoomLevelInfo( + zoom: Double, + tileWidthLayerSystemUnits: Float, + numTilesX: Int, + numTilesY: Int, + numTilesT: Int, + zoomLevelIdentifier: Int, + bounds: KMRectCoord, +) { + val zoom: Double + val tileWidthLayerSystemUnits: Float + val numTilesX: Int + val numTilesY: Int + val numTilesT: Int + val zoomLevelIdentifier: Int + val bounds: KMRectCoord +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt new file mode 100644 index 000000000..5885f6e42 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt @@ -0,0 +1,20 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTiledLayerError( + status: KMLoaderStatus, + errorCode: String?, + layerName: String, + url: String, + isRecoverable: Boolean, + bounds: KMRectCoord?, +) { + val status: KMLoaderStatus + val errorCode: String? + val layerName: String + val url: String + val isRecoverable: Boolean + val bounds: KMRectCoord? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt new file mode 100644 index 000000000..5213c54d1 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt @@ -0,0 +1,11 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMTouchAction { + DOWN, + MOVE, + UP, + CANCEL, +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt new file mode 100644 index 000000000..b77b56136 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMTouchEvent( + pointers: ArrayList, + touchAction: KMTouchAction, +) { + val pointers: ArrayList + val touchAction: KMTouchAction +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt new file mode 100644 index 000000000..289b107fd --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -0,0 +1,15 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTouchHandlerInterface { + + fun onTouchEvent(touchEvent: KMTouchEvent) + + fun insertListener(listener: KMTouchInterface, index: Int) + + fun addListener(listener: KMTouchInterface) + + fun removeListener(listener: KMTouchInterface) +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt new file mode 100644 index 000000000..15b9cc7b8 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +expect interface KMTouchInterface { + + fun onTouchDown(posScreen: KMVec2F): Boolean + + fun onClickUnconfirmed(posScreen: KMVec2F): Boolean + + fun onClickConfirmed(posScreen: KMVec2F): Boolean + + fun onDoubleClick(posScreen: KMVec2F): Boolean + + fun onLongPress(posScreen: KMVec2F): Boolean + + fun onMove(deltaScreen: KMVec2F, confirmed: Boolean, doubleClick: Boolean): Boolean + + fun onMoveComplete(): Boolean + + fun onOneFingerDoubleClickMoveComplete(): Boolean + + fun onTwoFingerClick(posScreen1: KMVec2F, posScreen2: KMVec2F): Boolean + + fun onTwoFingerMove(posScreenOld: ArrayList, posScreenNew: ArrayList): Boolean + + fun onTwoFingerMoveComplete(): Boolean + + fun clearTouch() +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt new file mode 100644 index 000000000..2581ee186 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVec2D( + x: Double, + y: Double, +) { + val x: Double + val y: Double +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt new file mode 100644 index 000000000..3d116b29b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVec2F( + x: Float, + y: Float, +) { + val x: Float + val y: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt new file mode 100644 index 000000000..62bf1c352 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVec2I( + x: Int, + y: Int, +) { + val x: Int + val y: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt new file mode 100644 index 000000000..b3059252b --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVec3D( + x: Double, + y: Double, + z: Double, +) { + val x: Double + val y: Double + val z: Double +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt new file mode 100644 index 000000000..70a5cf4fc --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVec3F( + x: Float, + y: Float, + z: Float, +) { + val x: Float + val y: Float + val z: Float +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt new file mode 100644 index 000000000..a26a6acc4 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVec3I( + x: Int, + y: Int, + z: Int, +) { + val x: Int + val y: Int + val z: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt new file mode 100644 index 000000000..88af0f6cb --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVectorLayerFeatureCoordInfo( + featureInfo: KMVectorLayerFeatureInfo, + coordinates: KMCoord, +) { + val featureInfo: KMVectorLayerFeatureInfo + val coordinates: KMCoord +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt new file mode 100644 index 000000000..748fd9179 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVectorLayerFeatureInfo( + identifier: String, + properties: HashMap, +) { + val identifier: String + val properties: HashMap +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt new file mode 100644 index 000000000..8a31473be --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMVectorLayerFeatureInfoValue( + stringVal: String?, + doubleVal: Double?, + intVal: Long?, + boolVal: Boolean?, + colorVal: KMColor?, + listFloatVal: ArrayList?, + listStringVal: ArrayList?, +) { + val stringVal: String? + val doubleVal: Double? + val intVal: Long? + val boolVal: Boolean? + val colorVal: KMColor? + val listFloatVal: ArrayList? + val listStringVal: ArrayList? +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt new file mode 100644 index 000000000..5d5e5ffe3 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMWmtsCapabilitiesResource constructor(nativeHandle: Any) { + + fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? + + fun createLayerTimed(identifier: String, tileLoaders: ArrayList, numT: Int): KMTiled2dMapRasterLayerInterface? + + fun createLayerWithZoomInfo(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapRasterLayerInterface? + + fun createLayerWithZoomInfoTimed(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapRasterLayerInterface? + + fun createLayerConfig(identifier: String): KMTiled2dMapLayerConfig? + + fun createLayerConfigTimed(identifier: String, numT: Int): KMTiled2dMapLayerConfig? + + fun createLayerConfigWithZoomInfo(identifier: String, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapLayerConfig? + + fun createLayerConfigWithZoomInfoTimed(identifier: String, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapLayerConfig? + + fun getAllLayers(): ArrayList + + companion object + { + + fun create(xml: String): KMWmtsCapabilitiesResource + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt new file mode 100644 index 000000000..d4c730812 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt @@ -0,0 +1,24 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMWmtsLayerDescription( + identifier: String, + title: String?, + abstractText: String?, + dimensions: ArrayList, + bounds: KMRectCoord?, + tileMatrixSetLink: String, + resourceTemplate: String, + resourceFormat: String, +) { + val identifier: String + val title: String? + val abstractText: String? + val dimensions: ArrayList + val bounds: KMRectCoord? + val tileMatrixSetLink: String + val resourceTemplate: String + val resourceFormat: String +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt new file mode 100644 index 000000000..e221e8890 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMWmtsLayerDimension( + identifier: String, + defaultValue: String, + values: ArrayList, +) { + val identifier: String + val defaultValue: String + val values: ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt new file mode 100644 index 000000000..55d095181 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt @@ -0,0 +1,24 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMWmtsTileMatrix( + identifier: String, + scaleDenominator: Double, + topLeftCornerX: Double, + topLeftCornerY: Double, + tileWidth: Int, + tileHeight: Int, + matrixWidth: Int, + matrixHeight: Int, +) { + val identifier: String + val scaleDenominator: Double + val topLeftCornerX: Double + val topLeftCornerY: Double + val tileWidth: Int + val tileHeight: Int + val matrixWidth: Int + val matrixHeight: Int +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt new file mode 100644 index 000000000..19d9db0f3 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt @@ -0,0 +1,14 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMWmtsTileMatrixSet( + identifier: String, + coordinateSystemIdentifier: Int, + matrices: ArrayList, +) { + val identifier: String + val coordinateSystemIdentifier: Int + val matrices: ArrayList +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt new file mode 100644 index 000000000..bdfbf2876 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -0,0 +1,13 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +expect class KMWmtsTiled2dMapLayerConfigFactory constructor(nativeHandle: Any) { + + companion object + { + + fun create(wmtsLayerConfiguration: KMWmtsLayerDescription, zoomLevelInfo: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, coordinateSystemIdentifier: Int, matrixSetIdentifier: String): KMTiled2dMapLayerConfig + } +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt new file mode 100644 index 000000000..c0dc45807 --- /dev/null +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp + +expect object KMMapInterfaceBridge { + fun wrap(nativeHandle: Any): KMMapInterface +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt deleted file mode 100644 index 20575874f..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfig.kt +++ /dev/null @@ -1,44 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class CameraInterpolationValue( - stop: Float, - value: Float, -) { - val stop: Float - val value: Float -} - -expect class CameraInterpolation( - stops: List, -) { - val stops: List -} - -expect class Camera3dConfig( - key: String, - allowUserInteraction: Boolean, - rotationSpeed: Float?, - animationDurationMs: Int, - minZoom: Float, - maxZoom: Float, - pitchInterpolationValues: CameraInterpolation, - verticalDisplacementInterpolationValues: CameraInterpolation, -) { - val key: String - val allowUserInteraction: Boolean - val rotationSpeed: Float? - val animationDurationMs: Int - val minZoom: Float - val maxZoom: Float - val pitchInterpolationValues: CameraInterpolation - val verticalDisplacementInterpolationValues: CameraInterpolation -} - -expect open class Camera3dConfigFactory constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - companion object { - fun getBasicConfig(): Camera3dConfig - fun getRestorConfig(): Camera3dConfig - } -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt deleted file mode 100644 index 3bbc3d415..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt +++ /dev/null @@ -1,13 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class Color( - r: Float, - g: Float, - b: Float, - a: Float, -) { - val r: Float - val g: Float - val b: Float - val a: Float -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt deleted file mode 100644 index 0cf764b13..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt +++ /dev/null @@ -1,13 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class Coord( - systemIdentifier: Int, - x: Double, - y: Double, - z: Double, -) { - val systemIdentifier: Int - val x: Double - val y: Double - val z: Double -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt deleted file mode 100644 index cf179a89f..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterface.kt +++ /dev/null @@ -1,8 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class IndexedLayerInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - fun getLayerInterface(): LayerInterface - fun getIndex(): Int -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt deleted file mode 100644 index 583e32425..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterface.kt +++ /dev/null @@ -1,29 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class LayerInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - fun setMaskingObject(maskingObject: MaskingObjectInterface?) - fun update() - fun buildRenderPasses(): List - fun buildComputePasses(): List - fun onAdded(mapInterface: MapInterface, layerIndex: Int) - fun onRemoved() - fun pause() - fun resume() - fun hide() - fun show() - - fun setAlpha(alpha: Float) - fun getAlpha(): Float - - fun setScissorRect(scissorRect: RectI?) - - fun isReadyToRenderOffscreen(): LayerReadyState - fun enableAnimations(enabled: Boolean) - - fun setErrorManager(errorManager: ErrorManager) - fun forceReload() - - fun setPrimaryRenderTarget(target: RenderTargetInterface?) -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt deleted file mode 100644 index d6a87b956..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCallbacks.kt +++ /dev/null @@ -1,17 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -interface MapCallbackInterface { - fun invalidate() - fun onMapResumed() -} - -interface MapReadyCallbackInterface { - fun stateDidUpdate(state: LayerReadyState) -} - -enum class LayerReadyState { - READY, - NOT_READY, - ERROR, - TIMEOUT_ERROR, -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt deleted file mode 100644 index 031db77ba..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCamera3dInterface.kt +++ /dev/null @@ -1,14 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class MapCamera3dInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - fun getCameraConfig(): Camera3dConfig - - fun setCameraConfig( - config: Camera3dConfig, - durationSeconds: Float?, - targetZoom: Float?, - targetCoordinate: Coord?, - ) -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt deleted file mode 100644 index 2578fd9d2..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterface.kt +++ /dev/null @@ -1,77 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class MapCameraInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - companion object { - fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface - } - - fun freeze(freeze: Boolean) - - fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) - fun moveToCenterPosition(centerPosition: Coord, animated: Boolean) - fun moveToBoundingBox(boundingBox: RectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) - fun getCenterPosition(): Coord - - fun setZoom(zoom: Double, animated: Boolean) - fun getZoom(): Double - - fun setRotation(angle: Float, animated: Boolean) - fun getRotation(): Float - - fun setMinZoom(minZoom: Double) - fun setMaxZoom(maxZoom: Double) - - fun getMinZoom(): Double - fun getMaxZoom(): Double - - fun setBounds(bounds: RectCoord) - fun getBounds(): RectCoord - fun isInBounds(coords: Coord): Boolean - - fun setPaddingLeft(padding: Float) - fun setPaddingRight(padding: Float) - fun setPaddingTop(padding: Float) - fun setPaddingBottom(padding: Float) - - fun getVisibleRect(): RectCoord - fun getPaddingAdjustedVisibleRect(): RectCoord - - fun getScreenDensityPpi(): Float - - fun update() - - fun getInvariantModelMatrix(coordinate: Coord, scaleInvariant: Boolean, rotationInvariant: Boolean): List - - fun addListener(listener: MapCameraListenerInterface) - fun removeListener(listener: MapCameraListenerInterface) - fun notifyListenerBoundsChange() - - fun coordFromScreenPosition(posScreen: Vec2F): Coord - fun coordFromScreenPositionZoom(posScreen: Vec2F, zoom: Float): Coord - - fun screenPosFromCoord(coord: Coord): Vec2F - fun screenPosFromCoordZoom(coord: Coord, zoom: Float): Vec2F - - fun mapUnitsFromPixels(distancePx: Double): Double - fun getScalingFactor(): Double - - fun coordIsVisibleOnScreen(coord: Coord, paddingPc: Float): Boolean - - fun setRotationEnabled(enabled: Boolean) - fun setSnapToNorthEnabled(enabled: Boolean) - fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) - - fun asCameraInterface(): CameraInterface - - fun getLastVpMatrixD(): List? - fun getLastVpMatrix(): List? - fun getLastInverseVpMatrix(): List? - fun getLastVpMatrixViewBounds(): RectCoord? - fun getLastVpMatrixRotation(): Float? - fun getLastVpMatrixZoom(): Float? - fun getLastCameraPosition(): Vec3D? - - fun asMapCamera3d(): MapCamera3dInterface? -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt deleted file mode 100644 index c30069c84..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraListenerInterface.kt +++ /dev/null @@ -1,19 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -interface MapCameraListenerInterface { - fun onVisibleBoundsChanged(visibleBounds: RectCoord, zoom: Double) - fun onRotationChanged(angle: Float) - fun onMapInteraction() - fun onCameraChange( - viewMatrix: List, - projectionMatrix: List, - origin: Vec3D, - verticalFov: Float, - horizontalFov: Float, - width: Float, - height: Float, - focusPointAltitude: Float, - focusPointPosition: Coord, - zoom: Float, - ) -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt deleted file mode 100644 index b16a0eedc..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapConfig.kt +++ /dev/null @@ -1,7 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class MapConfig( - mapCoordinateSystem: MapCoordinateSystem, -) { - val mapCoordinateSystem: MapCoordinateSystem -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt deleted file mode 100644 index b1e06995e..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoordinateSystem.kt +++ /dev/null @@ -1,11 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class MapCoordinateSystem( - identifier: Int, - bounds: RectCoord, - unitToScreenMeterFactor: Float, -) { - val identifier: Int - val bounds: RectCoord - val unitToScreenMeterFactor: Float -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt deleted file mode 100644 index eb3724df6..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect object MapCoreInterop { - fun moveToCenter(coord: Coord) -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt deleted file mode 100644 index 1ac2aa10c..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypes.kt +++ /dev/null @@ -1,53 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class GraphicsObjectFactoryInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class ShaderFactoryInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class RenderingContextInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class SchedulerInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class TouchHandlerInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class PerformanceLoggerInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class CoordinateConversionHelperInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class RenderTargetInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class RenderPassInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class ComputePassInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class MaskingObjectInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class ErrorManager constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class CameraInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt deleted file mode 100644 index 79bad348d..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderProtocol.kt +++ /dev/null @@ -1,8 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -interface MapDataProviderProtocol { - fun getStyleJson(): String? - suspend fun loadGeojson(resourcePath: String, url: String): ByteArray? - suspend fun loadSpriteAsync(resourcePath: String, url: String, scale: Int): ByteArray? - suspend fun loadSpriteJsonAsync(resourcePath: String, url: String, scale: Int): ByteArray? -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt deleted file mode 100644 index abc9a977c..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactory.kt +++ /dev/null @@ -1,24 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlinx.coroutines.CoroutineScope - -expect abstract class MapFactory constructor( - platformContext: Any? = null, - coroutineScope: CoroutineScope? = null, - lifecycle: Any? = null, -) { - abstract fun createVectorLayer( - layerName: String, - dataProvider: MapDataProviderProtocol, - ): MapVectorLayer? - abstract fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? - abstract fun createGpsLayer(): MapGpsLayer? - - companion object { - fun create( - platformContext: Any? = null, - coroutineScope: CoroutineScope? = null, - lifecycle: Any? = null, - ): MapFactory - } -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt deleted file mode 100644 index 631c618ec..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayer.kt +++ /dev/null @@ -1,15 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode - -expect abstract class MapGpsLayer constructor(nativeHandle: Any? = null) : LayerInterface { - abstract fun setMode(mode: GpsMode) - abstract fun getMode(): GpsMode - abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - abstract fun notifyPermissionGranted() - abstract fun lastLocation(): Coord? - - companion object { - fun create(platformContext: Any? = null, lifecycle: Any? = null): MapGpsLayer? - } -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt deleted file mode 100644 index b970694aa..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterface.kt +++ /dev/null @@ -1,72 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class MapInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - companion object { - fun create( - graphicsFactory: GraphicsObjectFactoryInterface, - shaderFactory: ShaderFactoryInterface, - renderingContext: RenderingContextInterface, - mapConfig: MapConfig, - scheduler: SchedulerInterface, - pixelDensity: Float, - is3d: Boolean, - ): MapInterface - - fun createWithOpenGl( - mapConfig: MapConfig, - scheduler: SchedulerInterface, - pixelDensity: Float, - is3d: Boolean, - ): MapInterface - } - - fun setCallbackHandler(callbackInterface: MapCallbackInterface?) - - fun getGraphicsObjectFactory(): GraphicsObjectFactoryInterface - fun getShaderFactory(): ShaderFactoryInterface - fun getScheduler(): SchedulerInterface - fun getRenderingContext(): RenderingContextInterface - fun getMapConfig(): MapConfig - fun getCoordinateConverterHelper(): CoordinateConversionHelperInterface - - fun setCamera(camera: MapCameraInterface) - fun getCamera(): MapCameraInterface - - fun setTouchHandler(touchHandler: TouchHandlerInterface) - fun getTouchHandler(): TouchHandlerInterface - - fun setPerformanceLoggers(performanceLoggers: List) - fun getPerformanceLoggers(): List - - fun getLayers(): List - fun getLayersIndexed(): List - - fun addLayer(layer: LayerInterface) - fun insertLayerAt(layer: LayerInterface, atIndex: Int) - fun insertLayerAbove(layer: LayerInterface, above: LayerInterface) - fun insertLayerBelow(layer: LayerInterface, below: LayerInterface) - - fun removeLayer(layer: LayerInterface) - - fun setViewportSize(size: Vec2I) - fun setBackgroundColor(color: Color) - - fun is3d(): Boolean - - fun invalidate() - fun resetIsInvalidated() - fun prepare() - fun getNeedsCompute(): Boolean - - fun drawOffscreenFrame(target: RenderTargetInterface) - fun drawFrame() - fun compute() - fun resume() - fun pause() - fun destroy() - - fun drawReadyFrame(bounds: RectCoord, paddingPc: Float, timeout: Float, callbacks: MapReadyCallbackInterface) - fun forceReload() -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt deleted file mode 100644 index 2a7c7e59c..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayer.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class MapRasterLayer constructor(nativeHandle: Any? = null) : LayerInterface { - constructor(layerInterface: Tiled2dMapRasterLayerInterface) -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt deleted file mode 100644 index 3e7c8e09d..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfig.kt +++ /dev/null @@ -1,34 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class Tiled2dMapZoomInfo( - zoomLevelScaleFactor: Float, - numDrawPreviousLayers: Int, - numDrawPreviousOrLaterTLayers: Int, - adaptScaleToScreen: Boolean, - maskTile: Boolean, - underzoom: Boolean, - overzoom: Boolean, -) { - val zoomLevelScaleFactor: Float - val numDrawPreviousLayers: Int - val numDrawPreviousOrLaterTLayers: Int - val adaptScaleToScreen: Boolean - val maskTile: Boolean - val underzoom: Boolean - val overzoom: Boolean -} - -data class MapTiled2dMapLayerConfig( - val layerName: String, - val urlFormat: String, - val zoomInfo: Tiled2dMapZoomInfo, - val minZoomLevel: Int, - val maxZoomLevel: Int, - val coordinateSystemIdentifier: Int, - val bboxCoordinateSystemIdentifier: Int, - val bounds: RectCoord, - val baseZoom: Double, - val baseWidth: Double, - val tileWidth: Int = 512, - val tileHeight: Int = 512, -) diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt deleted file mode 100644 index de5af5934..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayer.kt +++ /dev/null @@ -1,7 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class MapVectorLayer constructor(nativeHandle: Any? = null) : LayerInterface { - constructor(layerInterface: Tiled2dMapVectorLayerInterface) - fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) - fun setGlobalState(state: Map) -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt deleted file mode 100644 index 8b3d44d6a..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerFeatureInfo.kt +++ /dev/null @@ -1,16 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -data class MapVectorLayerFeatureInfo( - val identifier: String, - val properties: HashMap, -) - -data class MapVectorLayerFeatureInfoValue( - val stringVal: String? = null, - val doubleVal: Double? = null, - val intVal: Long? = null, - val boolVal: Boolean? = null, - val colorVal: Color? = null, - val listFloatVal: ArrayList? = null, - val listStringVal: ArrayList? = null, -) diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt deleted file mode 100644 index 9243c4b3b..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt +++ /dev/null @@ -1,10 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlinx.coroutines.CoroutineScope - -expect object MapVectorLayerLocalDataProviderFactory { - fun create( - dataProvider: MapDataProviderProtocol, - coroutineScope: CoroutineScope? = null, - ): Tiled2dMapVectorLayerLocalDataProviderInterface -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt deleted file mode 100644 index f2b3913c1..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallback.kt +++ /dev/null @@ -1,15 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -interface MapVectorLayerSelectionCallback { - fun didSelectFeature(featureInfo: MapVectorLayerFeatureInfo, layerIdentifier: String, coord: Coord): Boolean - fun didMultiSelectLayerFeatures( - featureInfos: List, - layerIdentifier: String, - coord: Coord, - ): Boolean - fun didClickBackgroundConfirmed(coord: Coord): Boolean -} - -expect class MapVectorLayerSelectionCallbackProxy(handler: MapVectorLayerSelectionCallback) { - val handler: MapVectorLayerSelectionCallback -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt deleted file mode 100644 index 33bfa52fd..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt +++ /dev/null @@ -1,10 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import io.openmobilemaps.mapscore.kmp.feature.map.interop.MapInterface - -expect class PlatformMapView - -expect class MapViewWrapper() { - val view: PlatformMapView - val mapInterface: MapInterface -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt deleted file mode 100644 index ea3365679..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt +++ /dev/null @@ -1,9 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class RectCoord( - topLeft: Coord, - bottomRight: Coord, -) { - val topLeft: Coord - val bottomRight: Coord -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt deleted file mode 100644 index 40871bda3..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectI.kt +++ /dev/null @@ -1,13 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class RectI( - x: Int, - y: Int, - width: Int, - height: Int, -) { - val x: Int - val y: Int - val width: Int - val height: Int -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt deleted file mode 100644 index f77668962..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt +++ /dev/null @@ -1,12 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class Tiled2dMapRasterLayerInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - companion object { - fun create( - layerConfig: MapTiled2dMapLayerConfig, - loaders: List, - ): Tiled2dMapRasterLayerInterface? - } -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt deleted file mode 100644 index 92ecaf0e3..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ /dev/null @@ -1,19 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class Tiled2dMapVectorLayerInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - - companion object { - fun createExplicitly( - layerName: String, - styleJson: String?, - localStyleJson: Boolean?, - loaders: List, - fontLoader: FontLoaderInterface?, - localDataProvider: Tiled2dMapVectorLayerLocalDataProviderInterface?, - customZoomInfo: Tiled2dMapZoomInfo?, - symbolDelegate: Tiled2dMapVectorLayerSymbolDelegateInterface?, - sourceUrlParams: Map?, - ): Tiled2dMapVectorLayerInterface? - } -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt deleted file mode 100644 index 15ae7e092..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypes.kt +++ /dev/null @@ -1,17 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect open class LoaderInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class FontLoaderInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class Tiled2dMapVectorLayerLocalDataProviderInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} - -expect open class Tiled2dMapVectorLayerSymbolDelegateInterface constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt deleted file mode 100644 index f2fe14ccb..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2F.kt +++ /dev/null @@ -1,9 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class Vec2F( - x: Float, - y: Float, -) { - val x: Float - val y: Float -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt deleted file mode 100644 index b27537d90..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec2I.kt +++ /dev/null @@ -1,9 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class Vec2I( - x: Int, - y: Int, -) { - val x: Int - val y: Int -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt deleted file mode 100644 index 7eab76974..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Vec3D.kt +++ /dev/null @@ -1,11 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -expect class Vec3D( - x: Double, - y: Double, - z: Double, -) { - val x: Double - val y: Double - val z: Double -} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt deleted file mode 100644 index 53b1c4d28..000000000 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/model/GpsMode.kt +++ /dev/null @@ -1,7 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.model - -enum class GpsMode { - DISABLED, - STANDARD, - FOLLOW, -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt new file mode 100644 index 000000000..8915a8ad9 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt @@ -0,0 +1,6 @@ +package io.openmobilemaps.mapscore.kmp + +actual typealias KMDataRef = platform.Foundation.NSData + +internal fun KMDataRef.asPlatform(): platform.Foundation.NSData = this +internal fun platform.Foundation.NSData.asKmp(): KMDataRef = this diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt new file mode 100644 index 000000000..79cfcc226 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt @@ -0,0 +1,18 @@ +package io.openmobilemaps.mapscore.kmp + +actual class KMFuture { + internal val native: MapCoreSharedModule.DJFuture? + + constructor() { + native = null + } + + constructor(native: MapCoreSharedModule.DJFuture) { + this.native = native + } +} + +internal fun KMFuture.asPlatform(): MapCoreSharedModule.DJFuture = + requireNotNull(native) + +internal fun MapCoreSharedModule.DJFuture.asKmp(): KMFuture = KMFuture(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt new file mode 100644 index 000000000..d91ef2748 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMAlphaInstancedShaderInterface", exact = true) +actual class KMAlphaInstancedShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMAlphaInstancedShaderInterface.asPlatform(): MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt new file mode 100644 index 000000000..f6f67c043 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMAlphaShaderInterface", exact = true) +actual class KMAlphaShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol + + actual fun updateAlpha(value: Float) { + native.updateAlpha(value) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMAlphaShaderInterface.asPlatform(): MapCoreSharedModule.MCAlphaShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCAlphaShaderInterfaceProtocol.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt new file mode 100644 index 000000000..f9cebe618 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt @@ -0,0 +1,42 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMAnchor", exact = true) +actual enum class KMAnchor(val rawValue: Long) { + CENTER(0L), + LEFT(1L), + RIGHT(2L), + TOP(3L), + BOTTOM(4L), + TOP_LEFT(5L), + TOP_RIGHT(6L), + BOTTOM_LEFT(7L), + BOTTOM_RIGHT(8L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCAnchor): KMAnchor { + val raw = value.toLong() + return when (raw) { + 0L -> KMAnchor.CENTER + 1L -> KMAnchor.LEFT + 2L -> KMAnchor.RIGHT + 3L -> KMAnchor.TOP + 4L -> KMAnchor.BOTTOM + 5L -> KMAnchor.TOP_LEFT + 6L -> KMAnchor.TOP_RIGHT + 7L -> KMAnchor.BOTTOM_LEFT + 8L -> KMAnchor.BOTTOM_RIGHT + else -> throw IllegalArgumentException("Unknown KMAnchor value: " + raw) + } + } + } +} + +internal fun KMAnchor.asPlatform(): MapCoreSharedModule.MCAnchor = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt new file mode 100644 index 000000000..5811c9606 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt @@ -0,0 +1,28 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMBlendMode", exact = true) +actual enum class KMBlendMode(val rawValue: Long) { + NORMAL(0L), + MULTIPLY(1L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCBlendMode): KMBlendMode { + val raw = value.toLong() + return when (raw) { + 0L -> KMBlendMode.NORMAL + 1L -> KMBlendMode.MULTIPLY + else -> throw IllegalArgumentException("Unknown KMBlendMode value: " + raw) + } + } + } +} + +internal fun KMBlendMode.asPlatform(): MapCoreSharedModule.MCBlendMode = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt new file mode 100644 index 000000000..a87572bf4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -0,0 +1,56 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMBoundingBoxInterface", exact = true) +actual class KMBoundingBoxInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCBoundingBoxInterface + + actual fun addPoint(p: KMCoord) { + native.addPoint(p.asPlatform()) + } + + actual fun asRectCoord(): KMRectCoord { + val result = native.asRectCoord() + return (result as MapCoreSharedModule.MCRectCoord).asKmp() + } + + actual fun getCenter(): KMCoord { + val result = native.getCenter() + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun getMin(): KMCoord { + val result = native.getMin() + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun getMax(): KMCoord { + val result = native.getMax() + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun getSystemIdentifier(): Int { + val result = native.getSystemIdentifier() + return result + } + + actual companion object + { + + actual fun create(systemIdentifier: Int): KMBoundingBoxInterface { + val result = MapCoreSharedModule.MCBoundingBoxInterface.create(systemIdentifier) + return requireNotNull((result as MapCoreSharedModule.MCBoundingBoxInterface)).asKmp() + } + } +} + +internal fun KMBoundingBoxInterface.asPlatform(): MapCoreSharedModule.MCBoundingBoxInterface = nativeHandle as MapCoreSharedModule.MCBoundingBoxInterface +internal fun MapCoreSharedModule.MCBoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt new file mode 100644 index 000000000..edae771f3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCamera3dConfig", exact = true) +actual class KMCamera3dConfig actual constructor( + key: String, + allowUserInteraction: Boolean, + rotationSpeed: Float?, + animationDurationMs: Int, + minZoom: Float, + maxZoom: Float, + pitchInterpolationValues: KMCameraInterpolation, + verticalDisplacementInterpolationValues: KMCameraInterpolation, +) { + actual val key: String = key + actual val allowUserInteraction: Boolean = allowUserInteraction + actual val rotationSpeed: Float? = rotationSpeed + actual val animationDurationMs: Int = animationDurationMs + actual val minZoom: Float = minZoom + actual val maxZoom: Float = maxZoom + actual val pitchInterpolationValues: KMCameraInterpolation = pitchInterpolationValues + actual val verticalDisplacementInterpolationValues: KMCameraInterpolation = verticalDisplacementInterpolationValues +} + +internal fun KMCamera3dConfig.asPlatform(): MapCoreSharedModule.MCCamera3dConfig = MapCoreSharedModule.MCCamera3dConfig( + key = key, + allowUserInteraction = allowUserInteraction, + rotationSpeed = rotationSpeed?.let { platform.Foundation.NSNumber(float = it) }, + animationDurationMs = animationDurationMs, + minZoom = minZoom, + maxZoom = maxZoom, + pitchInterpolationValues = pitchInterpolationValues.asPlatform(), + verticalDisplacementInterpolationValues = verticalDisplacementInterpolationValues.asPlatform(), +) +internal fun MapCoreSharedModule.MCCamera3dConfig.asKmp(): KMCamera3dConfig = KMCamera3dConfig( + key = this.key, + allowUserInteraction = this.allowUserInteraction, + rotationSpeed = this.rotationSpeed?.let { (it as platform.Foundation.NSNumber).floatValue }, + animationDurationMs = this.animationDurationMs, + minZoom = this.minZoom, + maxZoom = this.maxZoom, + pitchInterpolationValues = (this.pitchInterpolationValues as MapCoreSharedModule.MCCameraInterpolation).asKmp(), + verticalDisplacementInterpolationValues = (this.verticalDisplacementInterpolationValues as MapCoreSharedModule.MCCameraInterpolation).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt new file mode 100644 index 000000000..4a922d212 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCamera3dConfigFactory", exact = true) +actual class KMCamera3dConfigFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCCamera3dConfigFactory + + actual companion object + { + + actual fun getBasicConfig(): KMCamera3dConfig { + val result = MapCoreSharedModule.MCCamera3dConfigFactory.getBasicConfig() + return (result as MapCoreSharedModule.MCCamera3dConfig).asKmp() + } + + actual fun getRestorConfig(): KMCamera3dConfig { + val result = MapCoreSharedModule.MCCamera3dConfigFactory.getRestorConfig() + return (result as MapCoreSharedModule.MCCamera3dConfig).asKmp() + } + } +} + +internal fun KMCamera3dConfigFactory.asPlatform(): MapCoreSharedModule.MCCamera3dConfigFactory = nativeHandle as MapCoreSharedModule.MCCamera3dConfigFactory +internal fun MapCoreSharedModule.MCCamera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt new file mode 100644 index 000000000..8bc89a4fe --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt @@ -0,0 +1,74 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCameraInterface", exact = true) +actual interface KMCameraInterface +{ + + actual fun getVpMatrix(): ArrayList + + actual fun getScalingFactor(): Double + + actual fun getOrigin(): KMVec3D + + actual fun viewportSizeChanged() +} + +private class KMCameraInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCCameraInterfaceProtocol) : KMCameraInterface +{ + + override fun getVpMatrix(): ArrayList { + val result = nativeHandle.getVpMatrix() + return ArrayList(((result as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })) + } + + override fun getScalingFactor(): Double { + val result = nativeHandle.getScalingFactor() + return result + } + + override fun getOrigin(): KMVec3D { + val result = nativeHandle.getOrigin() + return (result as MapCoreSharedModule.MCVec3D).asKmp() + } + + override fun viewportSizeChanged() { + nativeHandle.viewportSizeChanged() + } +} + +private class KMCameraInterfacePlatformProxy(private val delegate: KMCameraInterface) : NSObject(), MapCoreSharedModule.MCCameraInterfaceProtocol +{ + + override fun getVpMatrix(): List<*> { + val result = delegate.getVpMatrix() + return ArrayList(result.map { platform.Foundation.NSNumber(float = it) }) + } + + override fun getScalingFactor(): Double { + val result = delegate.getScalingFactor() + return result + } + + override fun getOrigin(): MapCoreSharedModule.MCVec3D { + val result = delegate.getOrigin() + return result.asPlatform() + } + + override fun viewportSizeChanged() { + delegate.viewportSizeChanged() + } +} + +internal fun KMCameraInterface.asPlatform(): MapCoreSharedModule.MCCameraInterfaceProtocol = when (this) { + is KMCameraInterfacePlatformWrapper -> this.nativeHandle + else -> KMCameraInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCCameraInterfaceProtocol.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt new file mode 100644 index 000000000..a37ad02cd --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCameraInterpolation", exact = true) +actual class KMCameraInterpolation actual constructor( + stops: ArrayList, +) { + actual val stops: ArrayList = stops +} + +internal fun KMCameraInterpolation.asPlatform(): MapCoreSharedModule.MCCameraInterpolation = MapCoreSharedModule.MCCameraInterpolation( + stops = ArrayList(stops.map { it.asPlatform() }), +) +internal fun MapCoreSharedModule.MCCameraInterpolation.asKmp(): KMCameraInterpolation = KMCameraInterpolation( + stops = ArrayList(((this.stops as? List<*>)?.map { (it as MapCoreSharedModule.MCCameraInterpolationValue).asKmp() } ?: (0 until (this.stops as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.stops as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCameraInterpolationValue).asKmp() })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt new file mode 100644 index 000000000..cc2746685 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCameraInterpolationValue", exact = true) +actual class KMCameraInterpolationValue actual constructor( + stop: Float, + value: Float, +) { + actual val stop: Float = stop + actual val value: Float = value +} + +internal fun KMCameraInterpolationValue.asPlatform(): MapCoreSharedModule.MCCameraInterpolationValue = MapCoreSharedModule.MCCameraInterpolationValue( + stop = stop, + value = value, +) +internal fun MapCoreSharedModule.MCCameraInterpolationValue.asKmp(): KMCameraInterpolationValue = KMCameraInterpolationValue( + stop = this.stop, + value = this.value, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt new file mode 100644 index 000000000..6f2eaab5b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCircleD", exact = true) +actual class KMCircleD actual constructor( + x: Double, + y: Double, + radius: Double, +) { + actual val x: Double = x + actual val y: Double = y + actual val radius: Double = radius +} + +internal fun KMCircleD.asPlatform(): MapCoreSharedModule.MCCircleD = MapCoreSharedModule.MCCircleD( + x = x, + y = y, + radius = radius, +) +internal fun MapCoreSharedModule.MCCircleD.asKmp(): KMCircleD = KMCircleD( + x = this.x, + y = this.y, + radius = this.radius, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt new file mode 100644 index 000000000..d1a1bbd5e --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCircleF", exact = true) +actual class KMCircleF actual constructor( + x: Float, + y: Float, + radius: Float, +) { + actual val x: Float = x + actual val y: Float = y + actual val radius: Float = radius +} + +internal fun KMCircleF.asPlatform(): MapCoreSharedModule.MCCircleF = MapCoreSharedModule.MCCircleF( + x = x, + y = y, + radius = radius, +) +internal fun MapCoreSharedModule.MCCircleF.asKmp(): KMCircleF = KMCircleF( + x = this.x, + y = this.y, + radius = this.radius, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt new file mode 100644 index 000000000..375fcfdd9 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCircleI", exact = true) +actual class KMCircleI actual constructor( + x: Int, + y: Int, + radius: Int, +) { + actual val x: Int = x + actual val y: Int = y + actual val radius: Int = radius +} + +internal fun KMCircleI.asPlatform(): MapCoreSharedModule.MCCircleI = MapCoreSharedModule.MCCircleI( + x = x, + y = y, + radius = radius, +) +internal fun MapCoreSharedModule.MCCircleI.asKmp(): KMCircleI = KMCircleI( + x = this.x, + y = this.y, + radius = this.radius, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt new file mode 100644 index 000000000..452015136 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMColor", exact = true) +actual class KMColor actual constructor( + r: Float, + g: Float, + b: Float, + a: Float, +) { + actual val r: Float = r + actual val g: Float = g + actual val b: Float = b + actual val a: Float = a +} + +internal fun KMColor.asPlatform(): MapCoreSharedModule.MCColor = MapCoreSharedModule.MCColor( + r = r, + g = g, + b = b, + a = a, +) +internal fun MapCoreSharedModule.MCColor.asKmp(): KMColor = KMColor( + r = this.r, + g = this.g, + b = this.b, + a = this.a, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt new file mode 100644 index 000000000..6eab7bee3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMColorCircleShaderInterface", exact = true) +actual class KMColorCircleShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol + + actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { + native.setColor(red, green, blue, alpha) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMColorCircleShaderInterface.asPlatform(): MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt new file mode 100644 index 000000000..91e505709 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMColorShaderInterface", exact = true) +actual class KMColorShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCColorShaderInterfaceProtocol + + actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { + native.setColor(red, green, blue, alpha) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMColorShaderInterface.asPlatform(): MapCoreSharedModule.MCColorShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCColorShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCColorShaderInterfaceProtocol.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt new file mode 100644 index 000000000..8c425f900 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from styling.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMColorStateList", exact = true) +actual class KMColorStateList actual constructor( + normal: KMColor, + highlighted: KMColor, +) { + actual val normal: KMColor = normal + actual val highlighted: KMColor = highlighted +} + +internal fun KMColorStateList.asPlatform(): MapCoreSharedModule.MCColorStateList = MapCoreSharedModule.MCColorStateList( + normal = normal.asPlatform(), + highlighted = highlighted.asPlatform(), +) +internal fun MapCoreSharedModule.MCColorStateList.asKmp(): KMColorStateList = KMColorStateList( + normal = (this.normal as MapCoreSharedModule.MCColor).asKmp(), + highlighted = (this.highlighted as MapCoreSharedModule.MCColor).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt new file mode 100644 index 000000000..5a5b4709a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMComputeObjectInterface", exact = true) +actual interface KMComputeObjectInterface +{ + + actual fun compute(context: KMRenderingContextInterface, vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) +} + +private class KMComputeObjectInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCComputeObjectInterfaceProtocol) : KMComputeObjectInterface +{ + + override fun compute(context: KMRenderingContextInterface, vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) { + nativeHandle.compute(context.asPlatform(), vpMatrix, origin.asPlatform(), screenPixelAsRealMeterFactor) + } +} + +private class KMComputeObjectInterfacePlatformProxy(private val delegate: KMComputeObjectInterface) : NSObject(), MapCoreSharedModule.MCComputeObjectInterfaceProtocol +{ + + override fun compute(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, vpMatrix: Long, origin: MapCoreSharedModule.MCVec3D, screenPixelAsRealMeterFactor: Double) { + delegate.compute(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), vpMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), screenPixelAsRealMeterFactor) + } +} + +internal fun KMComputeObjectInterface.asPlatform(): MapCoreSharedModule.MCComputeObjectInterfaceProtocol = when (this) { + is KMComputeObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMComputeObjectInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCComputeObjectInterfaceProtocol.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt new file mode 100644 index 000000000..b7dfcff5d --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMComputePassInterface", exact = true) +actual interface KMComputePassInterface +{ + + actual fun getComputeObjects(): ArrayList +} + +private class KMComputePassInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCComputePassInterfaceProtocol) : KMComputePassInterface +{ + + override fun getComputeObjects(): ArrayList { + val result = nativeHandle.getComputeObjects() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCComputeObjectInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCComputeObjectInterfaceProtocol)).asKmp() })) + } +} + +private class KMComputePassInterfacePlatformProxy(private val delegate: KMComputePassInterface) : NSObject(), MapCoreSharedModule.MCComputePassInterfaceProtocol +{ + + override fun getComputeObjects(): List<*> { + val result = delegate.getComputeObjects() + return ArrayList(result.map { it.asPlatform() }) + } +} + +internal fun KMComputePassInterface.asPlatform(): MapCoreSharedModule.MCComputePassInterfaceProtocol = when (this) { + is KMComputePassInterfacePlatformWrapper -> this.nativeHandle + else -> KMComputePassInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCComputePassInterfaceProtocol.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt new file mode 100644 index 000000000..159d32240 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCoord", exact = true) +actual class KMCoord actual constructor( + systemIdentifier: Int, + x: Double, + y: Double, + z: Double, +) { + actual val systemIdentifier: Int = systemIdentifier + actual val x: Double = x + actual val y: Double = y + actual val z: Double = z +} + +internal fun KMCoord.asPlatform(): MapCoreSharedModule.MCCoord = MapCoreSharedModule.MCCoord( + systemIdentifier = systemIdentifier, + x = x, + y = y, + z = z, +) +internal fun MapCoreSharedModule.MCCoord.asKmp(): KMCoord = KMCoord( + systemIdentifier = this.systemIdentifier, + x = this.x, + y = this.y, + z = this.z, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt new file mode 100644 index 000000000..b685c0269 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -0,0 +1,61 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCoordinateConversionHelperInterface", exact = true) +actual class KMCoordinateConversionHelperInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCCoordinateConversionHelperInterface + + actual fun registerConverter(converter: KMCoordinateConverterInterface) { + native.registerConverter(converter.asPlatform()) + } + + actual fun convert(to: Int, coordinate: KMCoord): KMCoord { + val result = native.convert(to, coordinate.asPlatform()) + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun convertRect(to: Int, rect: KMRectCoord): KMRectCoord { + val result = native.convertRect(to, rect.asPlatform()) + return (result as MapCoreSharedModule.MCRectCoord).asKmp() + } + + actual fun convertRectToRenderSystem(rect: KMRectCoord): KMRectCoord { + val result = native.convertRectToRenderSystem(rect.asPlatform()) + return (result as MapCoreSharedModule.MCRectCoord).asKmp() + } + + actual fun convertQuad(to: Int, quad: KMQuadCoord): KMQuadCoord { + val result = native.convertQuad(to, quad.asPlatform()) + return (result as MapCoreSharedModule.MCQuadCoord).asKmp() + } + + actual fun convertQuadToRenderSystem(quad: KMQuadCoord): KMQuadCoord { + val result = native.convertQuadToRenderSystem(quad.asPlatform()) + return (result as MapCoreSharedModule.MCQuadCoord).asKmp() + } + + actual fun convertToRenderSystem(coordinate: KMCoord): KMCoord { + val result = native.convertToRenderSystem(coordinate.asPlatform()) + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual companion object + { + + actual fun independentInstance(): KMCoordinateConversionHelperInterface { + val result = MapCoreSharedModule.MCCoordinateConversionHelperInterface.independentInstance() + return requireNotNull((result as MapCoreSharedModule.MCCoordinateConversionHelperInterface)).asKmp() + } + } +} + +internal fun KMCoordinateConversionHelperInterface.asPlatform(): MapCoreSharedModule.MCCoordinateConversionHelperInterface = nativeHandle as MapCoreSharedModule.MCCoordinateConversionHelperInterface +internal fun MapCoreSharedModule.MCCoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt new file mode 100644 index 000000000..4f10b6eb3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt @@ -0,0 +1,64 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCoordinateConverterInterface", exact = true) +actual interface KMCoordinateConverterInterface +{ + + actual fun convert(coordinate: KMCoord): KMCoord + + actual fun getFrom(): Int + + actual fun getTo(): Int +} + +private class KMCoordinateConverterInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCCoordinateConverterInterfaceProtocol) : KMCoordinateConverterInterface +{ + + override fun convert(coordinate: KMCoord): KMCoord { + val result = nativeHandle.convert(coordinate.asPlatform()) + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + override fun getFrom(): Int { + val result = nativeHandle.getFrom() + return result + } + + override fun getTo(): Int { + val result = nativeHandle.getTo() + return result + } +} + +private class KMCoordinateConverterInterfacePlatformProxy(private val delegate: KMCoordinateConverterInterface) : NSObject(), MapCoreSharedModule.MCCoordinateConverterInterfaceProtocol +{ + + override fun convert(coordinate: MapCoreSharedModule.MCCoord): MapCoreSharedModule.MCCoord { + val result = delegate.convert((coordinate as MapCoreSharedModule.MCCoord).asKmp()) + return result.asPlatform() + } + + override fun getFrom(): Int { + val result = delegate.getFrom() + return result + } + + override fun getTo(): Int { + val result = delegate.getTo() + return result + } +} + +internal fun KMCoordinateConverterInterface.asPlatform(): MapCoreSharedModule.MCCoordinateConverterInterfaceProtocol = when (this) { + is KMCoordinateConverterInterfacePlatformWrapper -> this.nativeHandle + else -> KMCoordinateConverterInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCCoordinateConverterInterfaceProtocol.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt new file mode 100644 index 000000000..c791f82e7 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -0,0 +1,47 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCoordinateSystemFactory", exact = true) +actual class KMCoordinateSystemFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCCoordinateSystemFactory + + actual companion object + { + + actual fun getEpsg2056System(): KMMapCoordinateSystem { + val result = MapCoreSharedModule.MCCoordinateSystemFactory.getEpsg2056System() + return (result as MapCoreSharedModule.MCMapCoordinateSystem).asKmp() + } + + actual fun getEpsg3857System(): KMMapCoordinateSystem { + val result = MapCoreSharedModule.MCCoordinateSystemFactory.getEpsg3857System() + return (result as MapCoreSharedModule.MCMapCoordinateSystem).asKmp() + } + + actual fun getEpsg4326System(): KMMapCoordinateSystem { + val result = MapCoreSharedModule.MCCoordinateSystemFactory.getEpsg4326System() + return (result as MapCoreSharedModule.MCMapCoordinateSystem).asKmp() + } + + actual fun getEpsg21781System(): KMMapCoordinateSystem { + val result = MapCoreSharedModule.MCCoordinateSystemFactory.getEpsg21781System() + return (result as MapCoreSharedModule.MCMapCoordinateSystem).asKmp() + } + + actual fun getUnitSphereSystem(): KMMapCoordinateSystem { + val result = MapCoreSharedModule.MCCoordinateSystemFactory.getUnitSphereSystem() + return (result as MapCoreSharedModule.MCMapCoordinateSystem).asKmp() + } + } +} + +internal fun KMCoordinateSystemFactory.asPlatform(): MapCoreSharedModule.MCCoordinateSystemFactory = nativeHandle as MapCoreSharedModule.MCCoordinateSystemFactory +internal fun MapCoreSharedModule.MCCoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt new file mode 100644 index 000000000..947f36c5f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -0,0 +1,62 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCoordinateSystemIdentifiers", exact = true) +actual class KMCoordinateSystemIdentifiers actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCCoordinateSystemIdentifiers + + actual companion object + { + + actual fun RENDERSYSTEM(): Int { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.RENDERSYSTEM() + return result + } + + actual fun EPSG3857(): Int { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.EPSG3857() + return result + } + + actual fun EPSG4326(): Int { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.EPSG4326() + return result + } + + actual fun EPSG2056(): Int { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.EPSG2056() + return result + } + + actual fun EPSG21781(): Int { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.EPSG21781() + return result + } + + actual fun UnitSphere(): Int { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.UnitSphere() + return result + } + + actual fun fromCrsIdentifier(identifier: String): Int { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.fromCrsIdentifier(identifier) + return result + } + + actual fun unitToMeterFactor(coordinateSystemIdentifier: Int): Double { + val result = MapCoreSharedModule.MCCoordinateSystemIdentifiers.unitToMeterFactor(coordinateSystemIdentifier) + return result + } + } +} + +internal fun KMCoordinateSystemIdentifiers.asPlatform(): MapCoreSharedModule.MCCoordinateSystemIdentifiers = nativeHandle as MapCoreSharedModule.MCCoordinateSystemIdentifiers +internal fun MapCoreSharedModule.MCCoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt new file mode 100644 index 000000000..fbc26e539 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -0,0 +1,37 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMCpuPerformanceLoggerInterface", exact = true) +actual class KMCpuPerformanceLoggerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCCpuPerformanceLoggerInterface + + actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { + val result = native.asPerformanceLoggerInterface() + return requireNotNull((result as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() + } + + actual companion object + { + + actual fun create(): KMCpuPerformanceLoggerInterface { + val result = MapCoreSharedModule.MCCpuPerformanceLoggerInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCCpuPerformanceLoggerInterface)).asKmp() + } + + actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMCpuPerformanceLoggerInterface { + val result = MapCoreSharedModule.MCCpuPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) + return requireNotNull((result as MapCoreSharedModule.MCCpuPerformanceLoggerInterface)).asKmp() + } + } +} + +internal fun KMCpuPerformanceLoggerInterface.asPlatform(): MapCoreSharedModule.MCCpuPerformanceLoggerInterface = nativeHandle as MapCoreSharedModule.MCCpuPerformanceLoggerInterface +internal fun MapCoreSharedModule.MCCpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt new file mode 100644 index 000000000..28a91e49a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMDataLoaderResult", exact = true) +actual class KMDataLoaderResult actual constructor( + data: KMDataRef?, + etag: String?, + status: KMLoaderStatus, + errorCode: String?, +) { + actual val data: KMDataRef? = data + actual val etag: String? = etag + actual val status: KMLoaderStatus = status + actual val errorCode: String? = errorCode +} + +internal fun KMDataLoaderResult.asPlatform(): MapCoreSharedModule.MCDataLoaderResult = MapCoreSharedModule.MCDataLoaderResult( + data = data?.let { it.asPlatform() }, + etag = etag?.let { it }, + status = status.asPlatform(), + errorCode = errorCode?.let { it }, +) +internal fun MapCoreSharedModule.MCDataLoaderResult.asKmp(): KMDataLoaderResult = KMDataLoaderResult( + data = this.data?.let { (it as platform.Foundation.NSData).asKmp() }, + etag = this.etag?.let { (it as String) }, + status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), + errorCode = this.errorCode?.let { (it as String) }, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt new file mode 100644 index 000000000..218e5672c --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -0,0 +1,42 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMDefaultTiled2dMapLayerConfigs", exact = true) +actual class KMDefaultTiled2dMapLayerConfigs actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs + + actual companion object + { + + actual fun webMercator(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { + val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.webMercator(layerName, urlFormat) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + } + + actual fun webMercatorCustom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo?, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { + val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.webMercatorCustom(layerName, urlFormat, zoomInfo?.let { it.asPlatform() }, minZoomLevel, maxZoomLevel) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + } + + actual fun epsg4326(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { + val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.epsg4326(layerName, urlFormat) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + } + + actual fun epsg4326Custom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { + val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.epsg4326Custom(layerName, urlFormat, zoomInfo.asPlatform(), minZoomLevel, maxZoomLevel) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + } + } +} + +internal fun KMDefaultTiled2dMapLayerConfigs.asPlatform(): MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs = nativeHandle as MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs +internal fun MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt new file mode 100644 index 000000000..de04d7a47 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMDefaultTouchHandlerInterface", exact = true) +actual class KMDefaultTouchHandlerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCDefaultTouchHandlerInterface + + actual companion object + { + + actual fun create(scheduler: KMSchedulerInterface, density: Float): KMTouchHandlerInterface { + val result = MapCoreSharedModule.MCDefaultTouchHandlerInterface.create(scheduler.asPlatform(), density) + return requireNotNull((result as MapCoreSharedModule.MCTouchHandlerInterfaceProtocol)).asKmp() + } + } +} + +internal fun KMDefaultTouchHandlerInterface.asPlatform(): MapCoreSharedModule.MCDefaultTouchHandlerInterface = nativeHandle as MapCoreSharedModule.MCDefaultTouchHandlerInterface +internal fun MapCoreSharedModule.MCDefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt new file mode 100644 index 000000000..24c9e5fd1 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMElevationInterpolationShaderInterface", exact = true) +actual class KMElevationInterpolationShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMElevationInterpolationShaderInterface.asPlatform(): MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt new file mode 100644 index 000000000..b1db6be59 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -0,0 +1,51 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMErrorManager", exact = true) +actual class KMErrorManager actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCErrorManager + + actual fun addTiledLayerError(error: KMTiledLayerError) { + native.addTiledLayerError(error.asPlatform()) + } + + actual fun removeError(url: String) { + native.removeError(url) + } + + actual fun removeAllErrorsForLayer(layerName: String) { + native.removeAllErrorsForLayer(layerName) + } + + actual fun clearAllErrors() { + native.clearAllErrors() + } + + actual fun addErrorListener(listener: KMErrorManagerListener) { + native.addErrorListener(listener.asPlatform()) + } + + actual fun removeErrorListener(listener: KMErrorManagerListener) { + native.removeErrorListener(listener.asPlatform()) + } + + actual companion object + { + + actual fun create(): KMErrorManager { + val result = MapCoreSharedModule.MCErrorManager.create() + return requireNotNull((result as MapCoreSharedModule.MCErrorManager)).asKmp() + } + } +} + +internal fun KMErrorManager.asPlatform(): MapCoreSharedModule.MCErrorManager = nativeHandle as MapCoreSharedModule.MCErrorManager +internal fun MapCoreSharedModule.MCErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt new file mode 100644 index 000000000..1551cbfed --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMErrorManagerListener", exact = true) +actual interface KMErrorManagerListener +{ + + actual fun onTiledLayerErrorStateChanged(errors: ArrayList) +} + +private class KMErrorManagerListenerPlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCErrorManagerListenerProtocol) : KMErrorManagerListener +{ + + override fun onTiledLayerErrorStateChanged(errors: ArrayList) { + nativeHandle.onTiledLayerErrorStateChanged(ArrayList(errors.map { it.asPlatform() })) + } +} + +private class KMErrorManagerListenerPlatformProxy(private val delegate: KMErrorManagerListener) : NSObject(), MapCoreSharedModule.MCErrorManagerListenerProtocol +{ + + override fun onTiledLayerErrorStateChanged(errors: List<*>) { + delegate.onTiledLayerErrorStateChanged(ArrayList(((errors as? List<*>)?.map { (it as MapCoreSharedModule.MCTiledLayerError).asKmp() } ?: (0 until (errors as platform.Foundation.NSArray).count.toInt()).map { idx -> ((errors as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCTiledLayerError).asKmp() }))) + } +} + +internal fun KMErrorManagerListener.asPlatform(): MapCoreSharedModule.MCErrorManagerListenerProtocol = when (this) { + is KMErrorManagerListenerPlatformWrapper -> this.nativeHandle + else -> KMErrorManagerListenerPlatformProxy(this) +} +internal fun MapCoreSharedModule.MCErrorManagerListenerProtocol.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt new file mode 100644 index 000000000..5982d7723 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from exception_logger.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMExceptionLoggerDelegateInterface", exact = true) +actual interface KMExceptionLoggerDelegateInterface +{ + + actual fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) +} + +private class KMExceptionLoggerDelegateInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol) : KMExceptionLoggerDelegateInterface +{ + + override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { + nativeHandle.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), function, file, line) + } +} + +private class KMExceptionLoggerDelegateInterfacePlatformProxy(private val delegate: KMExceptionLoggerDelegateInterface) : NSObject(), MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol +{ + + override fun logMessage(errorDomain: String, code: Int, customValues: Map, function: String, file: String, line: Int) { + delegate.logMessage(errorDomain, code, HashMap(((customValues as? Map<*, *>)?.map { (it.key as String) to (it.value as String) }?.toMap() ?: run { val e = (customValues as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((customValues as platform.Foundation.NSDictionary).objectForKey(key) as String) } })), function, file, line) + } +} + +internal fun KMExceptionLoggerDelegateInterface.asPlatform(): MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol = when (this) { + is KMExceptionLoggerDelegateInterfacePlatformWrapper -> this.nativeHandle + else -> KMExceptionLoggerDelegateInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt new file mode 100644 index 000000000..e85189edf --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from exception_logger.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMExceptionLoggerInterface", exact = true) +actual class KMExceptionLoggerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCExceptionLoggerInterface + + actual companion object + { + + actual fun setLoggerDelegate(delegate: KMExceptionLoggerDelegateInterface) { + MapCoreSharedModule.MCExceptionLoggerInterface.setLoggerDelegate(delegate.asPlatform()) + } + } +} + +internal fun KMExceptionLoggerInterface.asPlatform(): MapCoreSharedModule.MCExceptionLoggerInterface = nativeHandle as MapCoreSharedModule.MCExceptionLoggerInterface +internal fun MapCoreSharedModule.MCExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt new file mode 100644 index 000000000..482537836 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMExecutionEnvironment", exact = true) +actual enum class KMExecutionEnvironment(val rawValue: Long) { + IO(0L), + COMPUTATION(1L), + GRAPHICS(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCExecutionEnvironment): KMExecutionEnvironment { + val raw = value.toLong() + return when (raw) { + 0L -> KMExecutionEnvironment.IO + 1L -> KMExecutionEnvironment.COMPUTATION + 2L -> KMExecutionEnvironment.GRAPHICS + else -> throw IllegalArgumentException("Unknown KMExecutionEnvironment value: " + raw) + } + } + } +} + +internal fun KMExecutionEnvironment.asPlatform(): MapCoreSharedModule.MCExecutionEnvironment = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt new file mode 100644 index 000000000..3e17f90e5 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -0,0 +1,57 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFeatureInfoValueFactory", exact = true) +actual class KMFeatureInfoValueFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCFeatureInfoValueFactory + + actual companion object + { + + actual fun createString(value: String): KMVectorLayerFeatureInfoValue { + val result = MapCoreSharedModule.MCFeatureInfoValueFactory.createString(value) + return (result as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() + } + + actual fun createDouble(value: Double): KMVectorLayerFeatureInfoValue { + val result = MapCoreSharedModule.MCFeatureInfoValueFactory.createDouble(value) + return (result as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() + } + + actual fun createInt(value: Long): KMVectorLayerFeatureInfoValue { + val result = MapCoreSharedModule.MCFeatureInfoValueFactory.createInt(value) + return (result as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() + } + + actual fun createBool(value: Boolean): KMVectorLayerFeatureInfoValue { + val result = MapCoreSharedModule.MCFeatureInfoValueFactory.createBool(value) + return (result as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() + } + + actual fun createColor(value: KMColor): KMVectorLayerFeatureInfoValue { + val result = MapCoreSharedModule.MCFeatureInfoValueFactory.createColor(value.asPlatform()) + return (result as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() + } + + actual fun createListFloat(value: ArrayList): KMVectorLayerFeatureInfoValue { + val result = MapCoreSharedModule.MCFeatureInfoValueFactory.createListFloat(ArrayList(value.map { platform.Foundation.NSNumber(float = it) })) + return (result as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() + } + + actual fun createListString(value: ArrayList): KMVectorLayerFeatureInfoValue { + val result = MapCoreSharedModule.MCFeatureInfoValueFactory.createListString(ArrayList(value.map { it })) + return (result as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() + } + } +} + +internal fun KMFeatureInfoValueFactory.asPlatform(): MapCoreSharedModule.MCFeatureInfoValueFactory = nativeHandle as MapCoreSharedModule.MCFeatureInfoValueFactory +internal fun MapCoreSharedModule.MCFeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt new file mode 100644 index 000000000..65c1e2c60 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFont", exact = true) +actual class KMFont actual constructor( + name: String, +) { + actual val name: String = name +} + +internal fun KMFont.asPlatform(): MapCoreSharedModule.MCFont = MapCoreSharedModule.MCFont( + name = name, +) +internal fun MapCoreSharedModule.MCFont.asKmp(): KMFont = KMFont( + name = this.name, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt new file mode 100644 index 000000000..21d32864d --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFontData", exact = true) +actual class KMFontData actual constructor( + info: KMFontWrapper, + glyphs: ArrayList, +) { + actual val info: KMFontWrapper = info + actual val glyphs: ArrayList = glyphs +} + +internal fun KMFontData.asPlatform(): MapCoreSharedModule.MCFontData = MapCoreSharedModule.MCFontData( + info = info.asPlatform(), + glyphs = ArrayList(glyphs.map { it.asPlatform() }), +) +internal fun MapCoreSharedModule.MCFontData.asKmp(): KMFontData = KMFontData( + info = (this.info as MapCoreSharedModule.MCFontWrapper).asKmp(), + glyphs = ArrayList(((this.glyphs as? List<*>)?.map { (it as MapCoreSharedModule.MCFontGlyph).asKmp() } ?: (0 until (this.glyphs as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.glyphs as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCFontGlyph).asKmp() })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt new file mode 100644 index 000000000..0393a3c29 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFontGlyph", exact = true) +actual class KMFontGlyph actual constructor( + charCode: String, + advance: KMVec2D, + boundingBoxSize: KMVec2D, + bearing: KMVec2D, + uv: KMQuad2dD, +) { + actual val charCode: String = charCode + actual val advance: KMVec2D = advance + actual val boundingBoxSize: KMVec2D = boundingBoxSize + actual val bearing: KMVec2D = bearing + actual val uv: KMQuad2dD = uv +} + +internal fun KMFontGlyph.asPlatform(): MapCoreSharedModule.MCFontGlyph = MapCoreSharedModule.MCFontGlyph( + charCode = charCode, + advance = advance.asPlatform(), + boundingBoxSize = boundingBoxSize.asPlatform(), + bearing = bearing.asPlatform(), + uv = uv.asPlatform(), +) +internal fun MapCoreSharedModule.MCFontGlyph.asKmp(): KMFontGlyph = KMFontGlyph( + charCode = this.charCode, + advance = (this.advance as MapCoreSharedModule.MCVec2D).asKmp(), + boundingBoxSize = (this.boundingBoxSize as MapCoreSharedModule.MCVec2D).asKmp(), + bearing = (this.bearing as MapCoreSharedModule.MCVec2D).asKmp(), + uv = (this.uv as MapCoreSharedModule.MCQuad2dD).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt new file mode 100644 index 000000000..93a326547 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFontLoaderInterface", exact = true) +actual interface KMFontLoaderInterface +{ + + actual fun loadFont(font: KMFont): KMFontLoaderResult +} + +private class KMFontLoaderInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCFontLoaderInterfaceProtocol) : KMFontLoaderInterface +{ + + override fun loadFont(font: KMFont): KMFontLoaderResult { + val result = nativeHandle.loadFont(font.asPlatform()) + return (result as MapCoreSharedModule.MCFontLoaderResult).asKmp() + } +} + +private class KMFontLoaderInterfacePlatformProxy(private val delegate: KMFontLoaderInterface) : NSObject(), MapCoreSharedModule.MCFontLoaderInterfaceProtocol +{ + + override fun loadFont(font: MapCoreSharedModule.MCFont): MapCoreSharedModule.MCFontLoaderResult { + val result = delegate.loadFont((font as MapCoreSharedModule.MCFont).asKmp()) + return result.asPlatform() + } +} + +internal fun KMFontLoaderInterface.asPlatform(): MapCoreSharedModule.MCFontLoaderInterfaceProtocol = when (this) { + is KMFontLoaderInterfacePlatformWrapper -> this.nativeHandle + else -> KMFontLoaderInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCFontLoaderInterfaceProtocol.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt new file mode 100644 index 000000000..0e0c54ae4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFontLoaderResult", exact = true) +actual class KMFontLoaderResult actual constructor( + imageData: KMTextureHolderInterface?, + fontData: KMFontData?, + status: KMLoaderStatus, +) { + actual val imageData: KMTextureHolderInterface? = imageData + actual val fontData: KMFontData? = fontData + actual val status: KMLoaderStatus = status +} + +internal fun KMFontLoaderResult.asPlatform(): MapCoreSharedModule.MCFontLoaderResult = MapCoreSharedModule.MCFontLoaderResult( + imageData = imageData?.let { it.asPlatform() }, + fontData = fontData?.let { it.asPlatform() }, + status = status.asPlatform(), +) +internal fun MapCoreSharedModule.MCFontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( + imageData = this.imageData?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, + fontData = this.fontData?.let { (it as MapCoreSharedModule.MCFontData).asKmp() }, + status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt new file mode 100644 index 000000000..808b1fd2e --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt @@ -0,0 +1,42 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFontWrapper", exact = true) +actual class KMFontWrapper actual constructor( + name: String, + lineHeight: Double, + base: Double, + bitmapSize: KMVec2D, + size: Double, + distanceRange: Double, +) { + actual val name: String = name + actual val lineHeight: Double = lineHeight + actual val base: Double = base + actual val bitmapSize: KMVec2D = bitmapSize + actual val size: Double = size + actual val distanceRange: Double = distanceRange +} + +internal fun KMFontWrapper.asPlatform(): MapCoreSharedModule.MCFontWrapper = MapCoreSharedModule.MCFontWrapper( + name = name, + lineHeight = lineHeight, + base = base, + bitmapSize = bitmapSize.asPlatform(), + size = size, + distanceRange = distanceRange, +) +internal fun MapCoreSharedModule.MCFontWrapper.asKmp(): KMFontWrapper = KMFontWrapper( + name = this.name, + lineHeight = this.lineHeight, + base = this.base, + bitmapSize = (this.bitmapSize as MapCoreSharedModule.MCVec2D).asKmp(), + size = this.size, + distanceRange = this.distanceRange, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt new file mode 100644 index 000000000..138715337 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMFormattedStringEntry", exact = true) +actual class KMFormattedStringEntry actual constructor( + text: String, + scale: Float, +) { + actual val text: String = text + actual val scale: Float = scale +} + +internal fun KMFormattedStringEntry.asPlatform(): MapCoreSharedModule.MCFormattedStringEntry = MapCoreSharedModule.MCFormattedStringEntry( + text = text, + scale = scale, +) +internal fun MapCoreSharedModule.MCFormattedStringEntry.asKmp(): KMFormattedStringEntry = KMFormattedStringEntry( + text = this.text, + scale = this.scale, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt new file mode 100644 index 000000000..dd58cd226 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -0,0 +1,42 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMGeoJsonFeatureParserInterface", exact = true) +actual class KMGeoJsonFeatureParserInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCGeoJsonFeatureParserInterface + + actual fun parse(geoJson: String): ArrayList? { + val result = native.parse(geoJson) + return result?.let { ArrayList(((it as? List<*>)?.map { (it as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp() } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp() })) } + } + + actual fun parseWithPointGeometry(geoJson: String): ArrayList? { + val result = native.parseWithPointGeometry(geoJson) + return result?.let { ArrayList(((it as? List<*>)?.map { (it as MapCoreSharedModule.MCGeoJsonPoint).asKmp() } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCGeoJsonPoint).asKmp() })) } + } + + actual fun parseWithLineGeometry(geoJson: String): ArrayList? { + val result = native.parseWithLineGeometry(geoJson) + return result?.let { ArrayList(((it as? List<*>)?.map { (it as MapCoreSharedModule.MCGeoJsonLine).asKmp() } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCGeoJsonLine).asKmp() })) } + } + + actual companion object + { + + actual fun create(): KMGeoJsonFeatureParserInterface { + val result = MapCoreSharedModule.MCGeoJsonFeatureParserInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCGeoJsonFeatureParserInterface)).asKmp() + } + } +} + +internal fun KMGeoJsonFeatureParserInterface.asPlatform(): MapCoreSharedModule.MCGeoJsonFeatureParserInterface = nativeHandle as MapCoreSharedModule.MCGeoJsonFeatureParserInterface +internal fun MapCoreSharedModule.MCGeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt new file mode 100644 index 000000000..cc99836c5 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -0,0 +1,37 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMGeoJsonHelperInterface", exact = true) +actual class KMGeoJsonHelperInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCGeoJsonHelperInterface + + actual fun geoJsonStringFromFeatureInfo(point: KMGeoJsonPoint): String { + val result = native.geoJsonStringFromFeatureInfo(point.asPlatform()) + return result + } + + actual fun geoJsonStringFromFeatureInfos(points: ArrayList): String { + val result = native.geoJsonStringFromFeatureInfos(ArrayList(points.map { it.asPlatform() })) + return result + } + + actual companion object + { + + actual fun independentInstance(): KMGeoJsonHelperInterface { + val result = MapCoreSharedModule.MCGeoJsonHelperInterface.independentInstance() + return requireNotNull((result as MapCoreSharedModule.MCGeoJsonHelperInterface)).asKmp() + } + } +} + +internal fun KMGeoJsonHelperInterface.asPlatform(): MapCoreSharedModule.MCGeoJsonHelperInterface = nativeHandle as MapCoreSharedModule.MCGeoJsonHelperInterface +internal fun MapCoreSharedModule.MCGeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt new file mode 100644 index 000000000..b5b356131 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMGeoJsonLine", exact = true) +actual class KMGeoJsonLine actual constructor( + points: ArrayList, + featureInfo: KMVectorLayerFeatureInfo, +) { + actual val points: ArrayList = points + actual val featureInfo: KMVectorLayerFeatureInfo = featureInfo +} + +internal fun KMGeoJsonLine.asPlatform(): MapCoreSharedModule.MCGeoJsonLine = MapCoreSharedModule.MCGeoJsonLine( + points = ArrayList(points.map { it.asPlatform() }), + featureInfo = featureInfo.asPlatform(), +) +internal fun MapCoreSharedModule.MCGeoJsonLine.asKmp(): KMGeoJsonLine = KMGeoJsonLine( + points = ArrayList(((this.points as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (this.points as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.points as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })), + featureInfo = (this.featureInfo as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt new file mode 100644 index 000000000..8f3893eaf --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from geo_json_parser.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMGeoJsonPoint", exact = true) +actual class KMGeoJsonPoint actual constructor( + point: KMCoord, + featureInfo: KMVectorLayerFeatureInfo, +) { + actual val point: KMCoord = point + actual val featureInfo: KMVectorLayerFeatureInfo = featureInfo +} + +internal fun KMGeoJsonPoint.asPlatform(): MapCoreSharedModule.MCGeoJsonPoint = MapCoreSharedModule.MCGeoJsonPoint( + point = point.asPlatform(), + featureInfo = featureInfo.asPlatform(), +) +internal fun MapCoreSharedModule.MCGeoJsonPoint.asKmp(): KMGeoJsonPoint = KMGeoJsonPoint( + point = (this.point as MapCoreSharedModule.MCCoord).asKmp(), + featureInfo = (this.featureInfo as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt new file mode 100644 index 000000000..a9df8f8b2 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMGlyphDescription", exact = true) +actual class KMGlyphDescription actual constructor( + frame: KMQuad2dD, + textureCoordinates: KMQuad2dD, +) { + actual val frame: KMQuad2dD = frame + actual val textureCoordinates: KMQuad2dD = textureCoordinates +} + +internal fun KMGlyphDescription.asPlatform(): MapCoreSharedModule.MCGlyphDescription = MapCoreSharedModule.MCGlyphDescription( + frame = frame.asPlatform(), + textureCoordinates = textureCoordinates.asPlatform(), +) +internal fun MapCoreSharedModule.MCGlyphDescription.asKmp(): KMGlyphDescription = KMGlyphDescription( + frame = (this.frame as MapCoreSharedModule.MCQuad2dD).asKmp(), + textureCoordinates = (this.textureCoordinates as MapCoreSharedModule.MCQuad2dD).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt new file mode 100644 index 000000000..fbdd7990c --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -0,0 +1,172 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMGraphicsObjectFactoryInterface", exact = true) +actual interface KMGraphicsObjectFactoryInterface +{ + + actual fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface + + actual fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface + + actual fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface + + actual fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface + + actual fun createQuadStretchedInstanced(shader: KMShaderProgramInterface): KMQuad2dStretchedInstancedInterface + + actual fun createLineGroup(shader: KMShaderProgramInterface): KMLineGroup2dInterface + + actual fun createPolygonGroup(shader: KMShaderProgramInterface): KMPolygonGroup2dInterface + + actual fun createPolygonPatternGroup(shader: KMShaderProgramInterface): KMPolygonPatternGroup2dInterface + + actual fun createQuadMask(is3d: Boolean): KMQuad2dInterface + + actual fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface + + actual fun createText(shader: KMShaderProgramInterface): KMTextInterface + + actual fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface +} + +private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol) : KMGraphicsObjectFactoryInterface +{ + + override fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface { + val result = nativeHandle.createQuad(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCQuad2dInterfaceProtocol)).asKmp() + } + + override fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface { + val result = nativeHandle.createPolygon(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + } + + override fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface { + val result = nativeHandle.createIcosahedronObject(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCIcosahedronInterfaceProtocol)).asKmp() + } + + override fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface { + val result = nativeHandle.createQuadInstanced(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol)).asKmp() + } + + override fun createQuadStretchedInstanced(shader: KMShaderProgramInterface): KMQuad2dStretchedInstancedInterface { + val result = nativeHandle.createQuadStretchedInstanced(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol)).asKmp() + } + + override fun createLineGroup(shader: KMShaderProgramInterface): KMLineGroup2dInterface { + val result = nativeHandle.createLineGroup(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCLineGroup2dInterfaceProtocol)).asKmp() + } + + override fun createPolygonGroup(shader: KMShaderProgramInterface): KMPolygonGroup2dInterface { + val result = nativeHandle.createPolygonGroup(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol)).asKmp() + } + + override fun createPolygonPatternGroup(shader: KMShaderProgramInterface): KMPolygonPatternGroup2dInterface { + val result = nativeHandle.createPolygonPatternGroup(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol)).asKmp() + } + + override fun createQuadMask(is3d: Boolean): KMQuad2dInterface { + val result = nativeHandle.createQuadMask(is3d) + return requireNotNull((result as MapCoreSharedModule.MCQuad2dInterfaceProtocol)).asKmp() + } + + override fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface { + val result = nativeHandle.createPolygonMask(is3d) + return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + } + + override fun createText(shader: KMShaderProgramInterface): KMTextInterface { + val result = nativeHandle.createText(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCTextInterfaceProtocol)).asKmp() + } + + override fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface { + val result = nativeHandle.createTextInstanced(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCTextInstancedInterfaceProtocol)).asKmp() + } +} + +private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate: KMGraphicsObjectFactoryInterface) : NSObject(), MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol +{ + + override fun createQuad(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dInterfaceProtocol? { + val result = delegate.createQuad(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createPolygon(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygon2dInterfaceProtocol? { + val result = delegate.createPolygon(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createIcosahedronObject(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCIcosahedronInterfaceProtocol? { + val result = delegate.createIcosahedronObject(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createQuadInstanced(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol? { + val result = delegate.createQuadInstanced(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createQuadStretchedInstanced(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol? { + val result = delegate.createQuadStretchedInstanced(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createLineGroup(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCLineGroup2dInterfaceProtocol? { + val result = delegate.createLineGroup(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createPolygonGroup(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol? { + val result = delegate.createPolygonGroup(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createPolygonPatternGroup(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol? { + val result = delegate.createPolygonPatternGroup(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createQuadMask(is3d: Boolean): MapCoreSharedModule.MCQuad2dInterfaceProtocol? { + val result = delegate.createQuadMask(is3d) + return result.asPlatform() + } + + override fun createPolygonMask(is3d: Boolean): MapCoreSharedModule.MCPolygon2dInterfaceProtocol? { + val result = delegate.createPolygonMask(is3d) + return result.asPlatform() + } + + override fun createText(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCTextInterfaceProtocol? { + val result = delegate.createText(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + + override fun createTextInstanced(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCTextInstancedInterfaceProtocol? { + val result = delegate.createTextInstanced(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } +} + +internal fun KMGraphicsObjectFactoryInterface.asPlatform(): MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol = when (this) { + is KMGraphicsObjectFactoryInterfacePlatformWrapper -> this.nativeHandle + else -> KMGraphicsObjectFactoryInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt new file mode 100644 index 000000000..41bbe112b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -0,0 +1,90 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMGraphicsObjectInterface", exact = true) +actual interface KMGraphicsObjectInterface +{ + + actual fun isReady(): Boolean + + actual fun setup(context: KMRenderingContextInterface) + + actual fun clear() + + actual fun setIsInverseMasked(inversed: Boolean) + + actual fun setDebugLabel(label: String) + + actual fun render(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) +} + +private class KMGraphicsObjectInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol) : KMGraphicsObjectInterface +{ + + override fun isReady(): Boolean { + val result = nativeHandle.isReady() + return result + } + + override fun setup(context: KMRenderingContextInterface) { + nativeHandle.setup(context.asPlatform()) + } + + override fun clear() { + nativeHandle.clear() + } + + override fun setIsInverseMasked(inversed: Boolean) { + nativeHandle.setIsInverseMasked(inversed) + } + + override fun setDebugLabel(label: String) { + nativeHandle.setDebugLabel(label) + } + + override fun render(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + nativeHandle.render(context.asPlatform(), renderPass.asPlatform(), vpMatrix, mMatrix, origin.asPlatform(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGraphicsObjectInterface) : NSObject(), MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol +{ + + override fun isReady(): Boolean { + val result = delegate.isReady() + return result + } + + override fun setup(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?) { + delegate.setup(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp()) + } + + override fun clear() { + delegate.clear() + } + + override fun setIsInverseMasked(inversed: Boolean) { + delegate.setIsInverseMasked(inversed) + } + + override fun setDebugLabel(label: String) { + delegate.setDebugLabel(label) + } + + override fun render(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, renderPass: MapCoreSharedModule.MCRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: MapCoreSharedModule.MCVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + delegate.render(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), (renderPass as MapCoreSharedModule.MCRenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +internal fun KMGraphicsObjectInterface.asPlatform(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol = when (this) { + is KMGraphicsObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMGraphicsObjectInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt new file mode 100644 index 000000000..8f19e568b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIconFactory", exact = true) +actual class KMIconFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCIconFactory + + actual companion object + { + + actual fun createIcon(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode): KMIconInfoInterface { + val result = MapCoreSharedModule.MCIconFactory.createIcon(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCIconInfoInterface)).asKmp() + } + + actual fun createIconWithAnchor(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode, iconAnchor: KMVec2F): KMIconInfoInterface { + val result = MapCoreSharedModule.MCIconFactory.createIconWithAnchor(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform(), iconAnchor.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCIconInfoInterface)).asKmp() + } + } +} + +internal fun KMIconFactory.asPlatform(): MapCoreSharedModule.MCIconFactory = nativeHandle as MapCoreSharedModule.MCIconFactory +internal fun MapCoreSharedModule.MCIconFactory.asKmp(): KMIconFactory = KMIconFactory(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt new file mode 100644 index 000000000..2505693f7 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -0,0 +1,65 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIconInfoInterface", exact = true) +actual class KMIconInfoInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCIconInfoInterface + + actual fun getIdentifier(): String { + val result = native.getIdentifier() + return result + } + + actual fun getTexture(): KMTextureHolderInterface { + val result = native.getTexture() + return requireNotNull((result as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() + } + + actual fun setCoordinate(coord: KMCoord) { + native.setCoordinate(coord.asPlatform()) + } + + actual fun getCoordinate(): KMCoord { + val result = native.getCoordinate() + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun setIconSize(size: KMVec2F) { + native.setIconSize(size.asPlatform()) + } + + actual fun getIconSize(): KMVec2F { + val result = native.getIconSize() + return (result as MapCoreSharedModule.MCVec2F).asKmp() + } + + actual fun setType(scaleType: KMIconType) { + native.setType(scaleType.asPlatform()) + } + + actual fun getType(): KMIconType { + val result = native.getType() + return KMIconType.fromPlatform((result as MapCoreSharedModule.MCIconType)) + } + + actual fun getIconAnchor(): KMVec2F { + val result = native.getIconAnchor() + return (result as MapCoreSharedModule.MCVec2F).asKmp() + } + + actual fun getBlendMode(): KMBlendMode { + val result = native.getBlendMode() + return KMBlendMode.fromPlatform((result as MapCoreSharedModule.MCBlendMode)) + } +} + +internal fun KMIconInfoInterface.asPlatform(): MapCoreSharedModule.MCIconInfoInterface = nativeHandle as MapCoreSharedModule.MCIconInfoInterface +internal fun MapCoreSharedModule.MCIconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt new file mode 100644 index 000000000..a64660674 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -0,0 +1,52 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIconLayerCallbackInterface", exact = true) +actual interface KMIconLayerCallbackInterface +{ + + actual fun onClickConfirmed(icons: ArrayList): Boolean + + actual fun onLongPress(icons: ArrayList): Boolean +} + +private class KMIconLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCIconLayerCallbackInterfaceProtocol) : KMIconLayerCallbackInterface +{ + + override fun onClickConfirmed(icons: ArrayList): Boolean { + val result = nativeHandle.onClickConfirmed(ArrayList(icons.map { it.asPlatform() })) + return result + } + + override fun onLongPress(icons: ArrayList): Boolean { + val result = nativeHandle.onLongPress(ArrayList(icons.map { it.asPlatform() })) + return result + } +} + +private class KMIconLayerCallbackInterfacePlatformProxy(private val delegate: KMIconLayerCallbackInterface) : NSObject(), MapCoreSharedModule.MCIconLayerCallbackInterfaceProtocol +{ + + override fun onClickConfirmed(icons: List<*>): Boolean { + val result = delegate.onClickConfirmed(ArrayList(((icons as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIconInfoInterface)).asKmp() } ?: (0 until (icons as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((icons as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface)).asKmp() }))) + return result + } + + override fun onLongPress(icons: List<*>): Boolean { + val result = delegate.onLongPress(ArrayList(((icons as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIconInfoInterface)).asKmp() } ?: (0 until (icons as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((icons as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface)).asKmp() }))) + return result + } +} + +internal fun KMIconLayerCallbackInterface.asPlatform(): MapCoreSharedModule.MCIconLayerCallbackInterfaceProtocol = when (this) { + is KMIconLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMIconLayerCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCIconLayerCallbackInterfaceProtocol.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt new file mode 100644 index 000000000..f1b7eb34f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -0,0 +1,89 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIconLayerInterface", exact = true) +actual class KMIconLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCIconLayerInterface + + actual fun setIcons(icons: ArrayList) { + native.setIcons(ArrayList(icons.map { it.asPlatform() })) + } + + actual fun getIcons(): ArrayList { + val result = native.getIcons() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIconInfoInterface)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface)).asKmp() })) + } + + actual fun remove(icon: KMIconInfoInterface) { + native.remove(icon.asPlatform()) + } + + actual fun removeList(icons: ArrayList) { + native.removeList(ArrayList(icons.map { it.asPlatform() })) + } + + actual fun removeIdentifier(identifier: String) { + native.removeIdentifier(identifier) + } + + actual fun removeIdentifierList(identifiers: ArrayList) { + native.removeIdentifierList(ArrayList(identifiers.map { it })) + } + + actual fun add(icon: KMIconInfoInterface) { + native.add(icon.asPlatform()) + } + + actual fun addList(icons: ArrayList) { + native.addList(ArrayList(icons.map { it.asPlatform() })) + } + + actual fun clear() { + native.clear() + } + + actual fun setCallbackHandler(handler: KMIconLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual fun invalidate() { + native.invalidate() + } + + actual fun setLayerClickable(isLayerClickable: Boolean) { + native.setLayerClickable(isLayerClickable) + } + + actual fun setRenderPassIndex(index: Int) { + native.setRenderPassIndex(index) + } + + actual fun animateIconScale(identifier: String, from: Float, to: Float, duration: Float, repetitions: Int) { + native.animateIconScale(identifier, from, to, duration, repetitions) + } + + actual companion object + { + + actual fun create(): KMIconLayerInterface { + val result = MapCoreSharedModule.MCIconLayerInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCIconLayerInterface)).asKmp() + } + } +} + +internal fun KMIconLayerInterface.asPlatform(): MapCoreSharedModule.MCIconLayerInterface = nativeHandle as MapCoreSharedModule.MCIconLayerInterface +internal fun MapCoreSharedModule.MCIconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt new file mode 100644 index 000000000..8024bee3d --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIconTextFit", exact = true) +actual enum class KMIconTextFit(val rawValue: Long) { + NONE(0L), + WIDTH(1L), + HEIGHT(2L), + BOTH(3L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCIconTextFit): KMIconTextFit { + val raw = value.toLong() + return when (raw) { + 0L -> KMIconTextFit.NONE + 1L -> KMIconTextFit.WIDTH + 2L -> KMIconTextFit.HEIGHT + 3L -> KMIconTextFit.BOTH + else -> throw IllegalArgumentException("Unknown KMIconTextFit value: " + raw) + } + } + } +} + +internal fun KMIconTextFit.asPlatform(): MapCoreSharedModule.MCIconTextFit = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt new file mode 100644 index 000000000..83939aad7 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIconType", exact = true) +actual enum class KMIconType(val rawValue: Long) { + SCALE_INVARIANT(0L), + ROTATION_INVARIANT(1L), + INVARIANT(2L), + FIXED(3L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCIconType): KMIconType { + val raw = value.toLong() + return when (raw) { + 0L -> KMIconType.SCALE_INVARIANT + 1L -> KMIconType.ROTATION_INVARIANT + 2L -> KMIconType.INVARIANT + 3L -> KMIconType.FIXED + else -> throw IllegalArgumentException("Unknown KMIconType value: " + raw) + } + } + } +} + +internal fun KMIconType.asPlatform(): MapCoreSharedModule.MCIconType = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt new file mode 100644 index 000000000..0a30f22e8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIcosahedronInterface", exact = true) +actual interface KMIcosahedronInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMIcosahedronInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCIcosahedronInterfaceProtocol) : KMIcosahedronInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } +} + +private class KMIcosahedronInterfacePlatformProxy(private val delegate: KMIcosahedronInterface) : NSObject(), MapCoreSharedModule.MCIcosahedronInterfaceProtocol +{ + + override fun setVertices(vertices: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes, origin: MapCoreSharedModule.MCVec3D) { + delegate.setVertices((vertices as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp()) + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMIcosahedronInterface.asPlatform(): MapCoreSharedModule.MCIcosahedronInterfaceProtocol = when (this) { + is KMIcosahedronInterfacePlatformWrapper -> this.nativeHandle + else -> KMIcosahedronInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCIcosahedronInterfaceProtocol.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt new file mode 100644 index 000000000..2ea8d5ea3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icosahedron.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIcosahedronLayerCallbackInterface", exact = true) +actual interface KMIcosahedronLayerCallbackInterface +{ + + actual fun getData(): KMFuture +} + +private class KMIcosahedronLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCIcosahedronLayerCallbackInterfaceProtocol) : KMIcosahedronLayerCallbackInterface +{ + + override fun getData(): KMFuture { + val result = nativeHandle.getData() + return (result as MapCoreSharedModule.DJFuture).asKmp() + } +} + +private class KMIcosahedronLayerCallbackInterfacePlatformProxy(private val delegate: KMIcosahedronLayerCallbackInterface) : NSObject(), MapCoreSharedModule.MCIcosahedronLayerCallbackInterfaceProtocol +{ + + override fun getData(): MapCoreSharedModule.DJFuture { + val result = delegate.getData() + return result.asPlatform() + } +} + +internal fun KMIcosahedronLayerCallbackInterface.asPlatform(): MapCoreSharedModule.MCIcosahedronLayerCallbackInterfaceProtocol = when (this) { + is KMIcosahedronLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMIcosahedronLayerCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCIcosahedronLayerCallbackInterfaceProtocol.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt new file mode 100644 index 000000000..980a03b54 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from icosahedron.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIcosahedronLayerInterface", exact = true) +actual class KMIcosahedronLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCIcosahedronLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual companion object + { + + actual fun create(callbackHandler: KMIcosahedronLayerCallbackInterface): KMIcosahedronLayerInterface { + val result = MapCoreSharedModule.MCIcosahedronLayerInterface.create(callbackHandler.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCIcosahedronLayerInterface)).asKmp() + } + } +} + +internal fun KMIcosahedronLayerInterface.asPlatform(): MapCoreSharedModule.MCIcosahedronLayerInterface = nativeHandle as MapCoreSharedModule.MCIcosahedronLayerInterface +internal fun MapCoreSharedModule.MCIcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt new file mode 100644 index 000000000..f14fbb2f4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -0,0 +1,52 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMIndexedLayerInterface", exact = true) +actual interface KMIndexedLayerInterface +{ + + actual fun getLayerInterface(): KMLayerInterface + + actual fun getIndex(): Int +} + +private class KMIndexedLayerInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCIndexedLayerInterfaceProtocol) : KMIndexedLayerInterface +{ + + override fun getLayerInterface(): KMLayerInterface { + val result = nativeHandle.getLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + override fun getIndex(): Int { + val result = nativeHandle.getIndex() + return result + } +} + +private class KMIndexedLayerInterfacePlatformProxy(private val delegate: KMIndexedLayerInterface) : NSObject(), MapCoreSharedModule.MCIndexedLayerInterfaceProtocol +{ + + override fun getLayerInterface(): MapCoreSharedModule.MCLayerInterfaceProtocol? { + val result = delegate.getLayerInterface() + return result.asPlatform() + } + + override fun getIndex(): Int { + val result = delegate.getIndex() + return result + } +} + +internal fun KMIndexedLayerInterface.asPlatform(): MapCoreSharedModule.MCIndexedLayerInterfaceProtocol = when (this) { + is KMIndexedLayerInterfacePlatformWrapper -> this.nativeHandle + else -> KMIndexedLayerInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCIndexedLayerInterfaceProtocol.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt new file mode 100644 index 000000000..4e7784882 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -0,0 +1,216 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLayerInterface", exact = true) +actual interface KMLayerInterface +{ + + actual fun setMaskingObject(maskingObject: KMMaskingObjectInterface?) + + actual fun update() + + actual fun buildRenderPasses(): ArrayList + + actual fun buildComputePasses(): ArrayList + + actual fun onAdded(mapInterface: KMMapInterface, layerIndex: Int) + + actual fun onRemoved() + + actual fun pause() + + actual fun resume() + + actual fun hide() + + actual fun show() + + actual fun setAlpha(alpha: Float) + + actual fun getAlpha(): Float + + actual fun setScissorRect(scissorRect: KMRectI?) + + actual fun isReadyToRenderOffscreen(): KMLayerReadyState + + actual fun enableAnimations(enabled: Boolean) + + actual fun setErrorManager(errorManager: KMErrorManager) + + actual fun forceReload() + + actual fun setPrimaryRenderTarget(target: KMRenderTargetInterface?) +} + +private class KMLayerInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCLayerInterfaceProtocol) : KMLayerInterface +{ + + override fun setMaskingObject(maskingObject: KMMaskingObjectInterface?) { + nativeHandle.setMaskingObject(maskingObject?.let { it.asPlatform() }) + } + + override fun update() { + nativeHandle.update() + } + + override fun buildRenderPasses(): ArrayList { + val result = nativeHandle.buildRenderPasses() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCRenderPassInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderPassInterfaceProtocol)).asKmp() })) + } + + override fun buildComputePasses(): ArrayList { + val result = nativeHandle.buildComputePasses() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCComputePassInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCComputePassInterfaceProtocol)).asKmp() })) + } + + override fun onAdded(mapInterface: KMMapInterface, layerIndex: Int) { + nativeHandle.onAdded(mapInterface.asPlatform(), layerIndex) + } + + override fun onRemoved() { + nativeHandle.onRemoved() + } + + override fun pause() { + nativeHandle.pause() + } + + override fun resume() { + nativeHandle.resume() + } + + override fun hide() { + nativeHandle.hide() + } + + override fun show() { + nativeHandle.show() + } + + override fun setAlpha(alpha: Float) { + nativeHandle.setAlpha(alpha) + } + + override fun getAlpha(): Float { + val result = nativeHandle.getAlpha() + return result + } + + override fun setScissorRect(scissorRect: KMRectI?) { + nativeHandle.setScissorRect(scissorRect?.let { it.asPlatform() }) + } + + override fun isReadyToRenderOffscreen(): KMLayerReadyState { + val result = nativeHandle.isReadyToRenderOffscreen() + return KMLayerReadyState.fromPlatform((result as MapCoreSharedModule.MCLayerReadyState)) + } + + override fun enableAnimations(enabled: Boolean) { + nativeHandle.enableAnimations(enabled) + } + + override fun setErrorManager(errorManager: KMErrorManager) { + nativeHandle.setErrorManager(errorManager.asPlatform()) + } + + override fun forceReload() { + nativeHandle.forceReload() + } + + override fun setPrimaryRenderTarget(target: KMRenderTargetInterface?) { + nativeHandle.setPrimaryRenderTarget(target?.let { it.asPlatform() }) + } +} + +private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterface) : NSObject(), MapCoreSharedModule.MCLayerInterfaceProtocol +{ + + override fun setMaskingObject(maskingObject: MapCoreSharedModule.MCMaskingObjectInterfaceProtocol?) { + delegate.setMaskingObject(maskingObject?.let { requireNotNull((it as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() }) + } + + override fun update() { + delegate.update() + } + + override fun buildRenderPasses(): List<*> { + val result = delegate.buildRenderPasses() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun buildComputePasses(): List<*> { + val result = delegate.buildComputePasses() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun onAdded(mapInterface: MapCoreSharedModule.MCMapInterface?, layerIndex: Int) { + delegate.onAdded(requireNotNull((mapInterface as MapCoreSharedModule.MCMapInterface)).asKmp(), layerIndex) + } + + override fun onRemoved() { + delegate.onRemoved() + } + + override fun pause() { + delegate.pause() + } + + override fun resume() { + delegate.resume() + } + + override fun hide() { + delegate.hide() + } + + override fun show() { + delegate.show() + } + + override fun setAlpha(alpha: Float) { + delegate.setAlpha(alpha) + } + + override fun getAlpha(): Float { + val result = delegate.getAlpha() + return result + } + + override fun setScissorRect(scissorRect: MapCoreSharedModule.MCRectI?) { + delegate.setScissorRect(scissorRect?.let { (it as MapCoreSharedModule.MCRectI).asKmp() }) + } + + override fun isReadyToRenderOffscreen(): MapCoreSharedModule.MCLayerReadyState { + val result = delegate.isReadyToRenderOffscreen() + return result.asPlatform() + } + + override fun enableAnimations(enabled: Boolean) { + delegate.enableAnimations(enabled) + } + + override fun setErrorManager(errorManager: MapCoreSharedModule.MCErrorManager?) { + delegate.setErrorManager(requireNotNull((errorManager as MapCoreSharedModule.MCErrorManager)).asKmp()) + } + + override fun forceReload() { + delegate.forceReload() + } + + override fun setPrimaryRenderTarget(target: MapCoreSharedModule.MCRenderTargetInterfaceProtocol?) { + delegate.setPrimaryRenderTarget(target?.let { requireNotNull((it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() }) + } +} + +internal fun KMLayerInterface.asPlatform(): MapCoreSharedModule.MCLayerInterfaceProtocol = when (this) { + is KMLayerInterfacePlatformWrapper -> this.nativeHandle + else -> KMLayerInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCLayerInterfaceProtocol.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt new file mode 100644 index 000000000..0049ba57b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from layer_object.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLayerObjectInterface", exact = true) +actual class KMLayerObjectInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCLayerObjectInterface + + actual fun update() { + native.update() + } + + actual fun getRenderConfig(): ArrayList { + val result = native.getRenderConfig() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCRenderConfigInterface)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderConfigInterface)).asKmp() })) + } +} + +internal fun KMLayerObjectInterface.asPlatform(): MapCoreSharedModule.MCLayerObjectInterface = nativeHandle as MapCoreSharedModule.MCLayerObjectInterface +internal fun MapCoreSharedModule.MCLayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt new file mode 100644 index 000000000..e4ba6e998 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLayerReadyState", exact = true) +actual enum class KMLayerReadyState(val rawValue: Long) { + READY(0L), + NOT_READY(1L), + ERROR(2L), + TIMEOUT_ERROR(3L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCLayerReadyState): KMLayerReadyState { + val raw = value.toLong() + return when (raw) { + 0L -> KMLayerReadyState.READY + 1L -> KMLayerReadyState.NOT_READY + 2L -> KMLayerReadyState.ERROR + 3L -> KMLayerReadyState.TIMEOUT_ERROR + else -> throw IllegalArgumentException("Unknown KMLayerReadyState value: " + raw) + } + } + } +} + +internal fun KMLayerReadyState.asPlatform(): MapCoreSharedModule.MCLayerReadyState = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt new file mode 100644 index 000000000..5807d5ff0 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineCapType", exact = true) +actual enum class KMLineCapType(val rawValue: Long) { + BUTT(0L), + ROUND(1L), + SQUARE(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCLineCapType): KMLineCapType { + val raw = value.toLong() + return when (raw) { + 0L -> KMLineCapType.BUTT + 1L -> KMLineCapType.ROUND + 2L -> KMLineCapType.SQUARE + else -> throw IllegalArgumentException("Unknown KMLineCapType value: " + raw) + } + } + } +} + +internal fun KMLineCapType.asPlatform(): MapCoreSharedModule.MCLineCapType = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt new file mode 100644 index 000000000..52488f100 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineFactory", exact = true) +actual class KMLineFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCLineFactory + + actual companion object + { + + actual fun createLine(identifier: String, coordinates: ArrayList, style: KMLineStyle): KMLineInfoInterface { + val result = MapCoreSharedModule.MCLineFactory.createLine(identifier, ArrayList(coordinates.map { it.asPlatform() }), style.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCLineInfoInterface)).asKmp() + } + } +} + +internal fun KMLineFactory.asPlatform(): MapCoreSharedModule.MCLineFactory = nativeHandle as MapCoreSharedModule.MCLineFactory +internal fun MapCoreSharedModule.MCLineFactory.asKmp(): KMLineFactory = KMLineFactory(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt new file mode 100644 index 000000000..08226005f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineGroup2dInterface", exact = true) +actual interface KMLineGroup2dInterface +{ + + actual fun setLines(lines: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMLineGroup2dInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCLineGroup2dInterfaceProtocol) : KMLineGroup2dInterface +{ + + override fun setLines(lines: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setLines(lines.asPlatform(), indices.asPlatform(), origin.asPlatform(), is3d) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } +} + +private class KMLineGroup2dInterfacePlatformProxy(private val delegate: KMLineGroup2dInterface) : NSObject(), MapCoreSharedModule.MCLineGroup2dInterfaceProtocol +{ + + override fun setLines(lines: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes, origin: MapCoreSharedModule.MCVec3D, is3d: Boolean) { + delegate.setLines((lines as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp(), is3d) + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMLineGroup2dInterface.asPlatform(): MapCoreSharedModule.MCLineGroup2dInterfaceProtocol = when (this) { + is KMLineGroup2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMLineGroup2dInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCLineGroup2dInterfaceProtocol.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt new file mode 100644 index 000000000..1d13459b8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineGroupShaderInterface", exact = true) +actual class KMLineGroupShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol + + actual fun setStyles(styles: KMSharedBytes) { + native.setStyles(styles.asPlatform()) + } + + actual fun setDashingScaleFactor(factor: Float) { + native.setDashingScaleFactor(factor) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMLineGroupShaderInterface.asPlatform(): MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt new file mode 100644 index 000000000..50c993ead --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -0,0 +1,33 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineInfoInterface", exact = true) +actual class KMLineInfoInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCLineInfoInterface + + actual fun getIdentifier(): String { + val result = native.getIdentifier() + return result + } + + actual fun getCoordinates(): ArrayList { + val result = native.getCoordinates() + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })) + } + + actual fun getStyle(): KMLineStyle { + val result = native.getStyle() + return (result as MapCoreSharedModule.MCLineStyle).asKmp() + } +} + +internal fun KMLineInfoInterface.asPlatform(): MapCoreSharedModule.MCLineInfoInterface = nativeHandle as MapCoreSharedModule.MCLineInfoInterface +internal fun MapCoreSharedModule.MCLineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt new file mode 100644 index 000000000..e5d21e10f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineJoinType", exact = true) +actual enum class KMLineJoinType(val rawValue: Long) { + BEVEL(0L), + ROUND(1L), + MITER(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCLineJoinType): KMLineJoinType { + val raw = value.toLong() + return when (raw) { + 0L -> KMLineJoinType.BEVEL + 1L -> KMLineJoinType.ROUND + 2L -> KMLineJoinType.MITER + else -> throw IllegalArgumentException("Unknown KMLineJoinType value: " + raw) + } + } + } +} + +internal fun KMLineJoinType.asPlatform(): MapCoreSharedModule.MCLineJoinType = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt new file mode 100644 index 000000000..56098e5f3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineLayerCallbackInterface", exact = true) +actual interface KMLineLayerCallbackInterface +{ + + actual fun onLineClickConfirmed(line: KMLineInfoInterface) +} + +private class KMLineLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCLineLayerCallbackInterfaceProtocol) : KMLineLayerCallbackInterface +{ + + override fun onLineClickConfirmed(line: KMLineInfoInterface) { + nativeHandle.onLineClickConfirmed(line.asPlatform()) + } +} + +private class KMLineLayerCallbackInterfacePlatformProxy(private val delegate: KMLineLayerCallbackInterface) : NSObject(), MapCoreSharedModule.MCLineLayerCallbackInterfaceProtocol +{ + + override fun onLineClickConfirmed(line: MapCoreSharedModule.MCLineInfoInterface?) { + delegate.onLineClickConfirmed(requireNotNull((line as MapCoreSharedModule.MCLineInfoInterface)).asKmp()) + } +} + +internal fun KMLineLayerCallbackInterface.asPlatform(): MapCoreSharedModule.MCLineLayerCallbackInterfaceProtocol = when (this) { + is KMLineLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMLineLayerCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCLineLayerCallbackInterfaceProtocol.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt new file mode 100644 index 000000000..6f06a5a58 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -0,0 +1,77 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineLayerInterface", exact = true) +actual class KMLineLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCLineLayerInterface + + actual fun setLines(lines: ArrayList) { + native.setLines(ArrayList(lines.map { it.asPlatform() })) + } + + actual fun getLines(): ArrayList { + val result = native.getLines() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCLineInfoInterface)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCLineInfoInterface)).asKmp() })) + } + + actual fun remove(line: KMLineInfoInterface) { + native.remove(line.asPlatform()) + } + + actual fun add(line: KMLineInfoInterface) { + native.add(line.asPlatform()) + } + + actual fun clear() { + native.clear() + } + + actual fun setCallbackHandler(handler: KMLineLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual fun invalidate() { + native.invalidate() + } + + actual fun resetSelection() { + native.resetSelection() + } + + actual fun setSelected(selectedIds: HashSet) { + native.setSelected(HashSet(selectedIds.map { it })) + } + + actual fun setLayerClickable(isLayerClickable: Boolean) { + native.setLayerClickable(isLayerClickable) + } + + actual fun setRenderPassIndex(index: Int) { + native.setRenderPassIndex(index) + } + + actual companion object + { + + actual fun create(): KMLineLayerInterface { + val result = MapCoreSharedModule.MCLineLayerInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCLineLayerInterface)).asKmp() + } + } +} + +internal fun KMLineLayerInterface.asPlatform(): MapCoreSharedModule.MCLineLayerInterface = nativeHandle as MapCoreSharedModule.MCLineLayerInterface +internal fun MapCoreSharedModule.MCLineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt new file mode 100644 index 000000000..7a45c8746 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt @@ -0,0 +1,74 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from line.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLineStyle", exact = true) +actual class KMLineStyle actual constructor( + color: KMColorStateList, + gapColor: KMColorStateList, + opacity: Float, + blur: Float, + widthType: KMSizeType, + width: Float, + dashArray: ArrayList, + dashFade: Float, + dashAnimationSpeed: Float, + lineCap: KMLineCapType, + lineJoin: KMLineJoinType, + offset: Float, + dotted: Boolean, + dottedSkew: Float, +) { + actual val color: KMColorStateList = color + actual val gapColor: KMColorStateList = gapColor + actual val opacity: Float = opacity + actual val blur: Float = blur + actual val widthType: KMSizeType = widthType + actual val width: Float = width + actual val dashArray: ArrayList = dashArray + actual val dashFade: Float = dashFade + actual val dashAnimationSpeed: Float = dashAnimationSpeed + actual val lineCap: KMLineCapType = lineCap + actual val lineJoin: KMLineJoinType = lineJoin + actual val offset: Float = offset + actual val dotted: Boolean = dotted + actual val dottedSkew: Float = dottedSkew +} + +internal fun KMLineStyle.asPlatform(): MapCoreSharedModule.MCLineStyle = MapCoreSharedModule.MCLineStyle( + color = color.asPlatform(), + gapColor = gapColor.asPlatform(), + opacity = opacity, + blur = blur, + widthType = widthType.asPlatform(), + width = width, + dashArray = ArrayList(dashArray.map { platform.Foundation.NSNumber(float = it) }), + dashFade = dashFade, + dashAnimationSpeed = dashAnimationSpeed, + lineCap = lineCap.asPlatform(), + lineJoin = lineJoin.asPlatform(), + offset = offset, + dotted = dotted, + dottedSkew = dottedSkew, +) +internal fun MapCoreSharedModule.MCLineStyle.asKmp(): KMLineStyle = KMLineStyle( + color = (this.color as MapCoreSharedModule.MCColorStateList).asKmp(), + gapColor = (this.gapColor as MapCoreSharedModule.MCColorStateList).asKmp(), + opacity = this.opacity, + blur = this.blur, + widthType = KMSizeType.fromPlatform((this.widthType as MapCoreSharedModule.MCSizeType)), + width = this.width, + dashArray = ArrayList(((this.dashArray as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (this.dashArray as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.dashArray as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })), + dashFade = this.dashFade, + dashAnimationSpeed = this.dashAnimationSpeed, + lineCap = KMLineCapType.fromPlatform((this.lineCap as MapCoreSharedModule.MCLineCapType)), + lineJoin = KMLineJoinType.fromPlatform((this.lineJoin as MapCoreSharedModule.MCLineJoinType)), + offset = this.offset, + dotted = this.dotted, + dottedSkew = this.dottedSkew, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt new file mode 100644 index 000000000..238f78422 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -0,0 +1,86 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLoaderInterface", exact = true) +actual interface KMLoaderInterface +{ + + actual fun loadTexture(url: String, etag: String?): KMTextureLoaderResult + + actual fun loadData(url: String, etag: String?): KMDataLoaderResult + + actual fun loadTextureAsync(url: String, etag: String?): KMFuture + + actual fun loadDataAsync(url: String, etag: String?): KMFuture + + actual fun cancel(url: String) +} + +private class KMLoaderInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCLoaderInterfaceProtocol) : KMLoaderInterface +{ + + override fun loadTexture(url: String, etag: String?): KMTextureLoaderResult { + val result = nativeHandle.loadTexture(url, etag?.let { it }) + return (result as MapCoreSharedModule.MCTextureLoaderResult).asKmp() + } + + override fun loadData(url: String, etag: String?): KMDataLoaderResult { + val result = nativeHandle.loadData(url, etag?.let { it }) + return (result as MapCoreSharedModule.MCDataLoaderResult).asKmp() + } + + override fun loadTextureAsync(url: String, etag: String?): KMFuture { + val result = nativeHandle.loadTextureAsync(url, etag?.let { it }) + return (result as MapCoreSharedModule.DJFuture).asKmp() + } + + override fun loadDataAsync(url: String, etag: String?): KMFuture { + val result = nativeHandle.loadDataAsync(url, etag?.let { it }) + return (result as MapCoreSharedModule.DJFuture).asKmp() + } + + override fun cancel(url: String) { + nativeHandle.cancel(url) + } +} + +private class KMLoaderInterfacePlatformProxy(private val delegate: KMLoaderInterface) : NSObject(), MapCoreSharedModule.MCLoaderInterfaceProtocol +{ + + override fun loadTexture(url: String, etag: String?): MapCoreSharedModule.MCTextureLoaderResult { + val result = delegate.loadTexture(url, etag?.let { (it as String) }) + return result.asPlatform() + } + + override fun loadData(url: String, etag: String?): MapCoreSharedModule.MCDataLoaderResult { + val result = delegate.loadData(url, etag?.let { (it as String) }) + return result.asPlatform() + } + + override fun loadTextureAsync(url: String, etag: String?): MapCoreSharedModule.DJFuture { + val result = delegate.loadTextureAsync(url, etag?.let { (it as String) }) + return result.asPlatform() + } + + override fun loadDataAsync(url: String, etag: String?): MapCoreSharedModule.DJFuture { + val result = delegate.loadDataAsync(url, etag?.let { (it as String) }) + return result.asPlatform() + } + + override fun cancel(url: String) { + delegate.cancel(url) + } +} + +internal fun KMLoaderInterface.asPlatform(): MapCoreSharedModule.MCLoaderInterfaceProtocol = when (this) { + is KMLoaderInterfacePlatformWrapper -> this.nativeHandle + else -> KMLoaderInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCLoaderInterfaceProtocol.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt new file mode 100644 index 000000000..ecf7f10c3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLoaderStatus", exact = true) +actual enum class KMLoaderStatus(val rawValue: Long) { + OK(0L), + NOOP(1L), + ERROR_TIMEOUT(2L), + ERROR_NETWORK(3L), + ERROR_OTHER(4L), + ERROR_400(5L), + ERROR_404(6L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCLoaderStatus): KMLoaderStatus { + val raw = value.toLong() + return when (raw) { + 0L -> KMLoaderStatus.OK + 1L -> KMLoaderStatus.NOOP + 2L -> KMLoaderStatus.ERROR_TIMEOUT + 3L -> KMLoaderStatus.ERROR_NETWORK + 4L -> KMLoaderStatus.ERROR_OTHER + 5L -> KMLoaderStatus.ERROR_400 + 6L -> KMLoaderStatus.ERROR_404 + else -> throw IllegalArgumentException("Unknown KMLoaderStatus value: " + raw) + } + } + } +} + +internal fun KMLoaderStatus.asPlatform(): MapCoreSharedModule.MCLoaderStatus = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt new file mode 100644 index 000000000..ba7bf14ce --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt @@ -0,0 +1,54 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMLoggerData", exact = true) +actual class KMLoggerData actual constructor( + id: String, + buckets: ArrayList, + bucketSizeMs: Int, + start: Long, + end: Long, + numSamples: Long, + average: Double, + variance: Double, + stdDeviation: Double, +) { + actual val id: String = id + actual val buckets: ArrayList = buckets + actual val bucketSizeMs: Int = bucketSizeMs + actual val start: Long = start + actual val end: Long = end + actual val numSamples: Long = numSamples + actual val average: Double = average + actual val variance: Double = variance + actual val stdDeviation: Double = stdDeviation +} + +internal fun KMLoggerData.asPlatform(): MapCoreSharedModule.MCLoggerData = MapCoreSharedModule.MCLoggerData( + id = id, + buckets = ArrayList(buckets.map { platform.Foundation.NSNumber(longLong = it) }), + bucketSizeMs = bucketSizeMs, + start = start, + end = end, + numSamples = numSamples, + average = average, + variance = variance, + stdDeviation = stdDeviation, +) +internal fun MapCoreSharedModule.MCLoggerData.asKmp(): KMLoggerData = KMLoggerData( + id = this.id, + buckets = ArrayList(((this.buckets as? List<*>)?.map { (it as platform.Foundation.NSNumber).longLongValue } ?: (0 until (this.buckets as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.buckets as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).longLongValue })), + bucketSizeMs = this.bucketSizeMs, + start = this.start, + end = this.end, + numSamples = this.numSamples, + average = this.average, + variance = this.variance, + stdDeviation = this.stdDeviation, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt new file mode 100644 index 000000000..0675b4e4f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt @@ -0,0 +1,48 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapCallbackInterface", exact = true) +actual interface KMMapCallbackInterface +{ + + actual fun invalidate() + + actual fun onMapResumed() +} + +private class KMMapCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCMapCallbackInterfaceProtocol) : KMMapCallbackInterface +{ + + override fun invalidate() { + nativeHandle.invalidate() + } + + override fun onMapResumed() { + nativeHandle.onMapResumed() + } +} + +private class KMMapCallbackInterfacePlatformProxy(private val delegate: KMMapCallbackInterface) : NSObject(), MapCoreSharedModule.MCMapCallbackInterfaceProtocol +{ + + override fun invalidate() { + delegate.invalidate() + } + + override fun onMapResumed() { + delegate.onMapResumed() + } +} + +internal fun KMMapCallbackInterface.asPlatform(): MapCoreSharedModule.MCMapCallbackInterfaceProtocol = when (this) { + is KMMapCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMMapCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCMapCallbackInterfaceProtocol.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt new file mode 100644 index 000000000..8161f728a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapCamera3dInterface", exact = true) +actual class KMMapCamera3dInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCMapCamera3dInterface + + actual fun getCameraConfig(): KMCamera3dConfig { + val result = native.getCameraConfig() + return (result as MapCoreSharedModule.MCCamera3dConfig).asKmp() + } + + actual fun setCameraConfig(config: KMCamera3dConfig, durationSeconds: Float?, targetZoom: Float?, targetCoordinate: KMCoord?) { + native.setCameraConfig(config.asPlatform(), durationSeconds?.let { platform.Foundation.NSNumber(float = it) }, targetZoom?.let { platform.Foundation.NSNumber(float = it) }, targetCoordinate?.let { it.asPlatform() }) + } +} + +internal fun KMMapCamera3dInterface.asPlatform(): MapCoreSharedModule.MCMapCamera3dInterface = nativeHandle as MapCoreSharedModule.MCMapCamera3dInterface +internal fun MapCoreSharedModule.MCMapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt new file mode 100644 index 000000000..e3ffd9a8b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -0,0 +1,242 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapCameraInterface", exact = true) +actual class KMMapCameraInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCMapCameraInterface + + actual fun freeze(freeze: Boolean) { + native.freeze(freeze) + } + + actual fun moveToCenterPositionZoom(centerPosition: KMCoord, zoom: Double, animated: Boolean) { + native.moveToCenterPositionZoom(centerPosition.asPlatform(), zoom, animated) + } + + actual fun moveToCenterPosition(centerPosition: KMCoord, animated: Boolean) { + native.moveToCenterPosition(centerPosition.asPlatform(), animated) + } + + actual fun moveToBoundingBox(boundingBox: KMRectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) { + native.moveToBoundingBox(boundingBox.asPlatform(), paddingPc, animated, minZoom?.let { platform.Foundation.NSNumber(double = it) }, maxZoom?.let { platform.Foundation.NSNumber(double = it) }) + } + + actual fun getCenterPosition(): KMCoord { + val result = native.getCenterPosition() + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun setZoom(zoom: Double, animated: Boolean) { + native.setZoom(zoom, animated) + } + + actual fun getZoom(): Double { + val result = native.getZoom() + return result + } + + actual fun setRotation(angle: Float, animated: Boolean) { + native.setRotation(angle, animated) + } + + actual fun getRotation(): Float { + val result = native.getRotation() + return result + } + + actual fun setMinZoom(minZoom: Double) { + native.setMinZoom(minZoom) + } + + actual fun setMaxZoom(maxZoom: Double) { + native.setMaxZoom(maxZoom) + } + + actual fun getMinZoom(): Double { + val result = native.getMinZoom() + return result + } + + actual fun getMaxZoom(): Double { + val result = native.getMaxZoom() + return result + } + + actual fun setBounds(bounds: KMRectCoord) { + native.setBounds(bounds.asPlatform()) + } + + actual fun getBounds(): KMRectCoord { + val result = native.getBounds() + return (result as MapCoreSharedModule.MCRectCoord).asKmp() + } + + actual fun isInBounds(coords: KMCoord): Boolean { + val result = native.isInBounds(coords.asPlatform()) + return result + } + + actual fun setPaddingLeft(padding: Float) { + native.setPaddingLeft(padding) + } + + actual fun setPaddingRight(padding: Float) { + native.setPaddingRight(padding) + } + + actual fun setPaddingTop(padding: Float) { + native.setPaddingTop(padding) + } + + actual fun setPaddingBottom(padding: Float) { + native.setPaddingBottom(padding) + } + + actual fun getVisibleRect(): KMRectCoord { + val result = native.getVisibleRect() + return (result as MapCoreSharedModule.MCRectCoord).asKmp() + } + + actual fun getPaddingAdjustedVisibleRect(): KMRectCoord { + val result = native.getPaddingAdjustedVisibleRect() + return (result as MapCoreSharedModule.MCRectCoord).asKmp() + } + + actual fun getScreenDensityPpi(): Float { + val result = native.getScreenDensityPpi() + return result + } + + actual fun update() { + native.update() + } + + actual fun getInvariantModelMatrix(coordinate: KMCoord, scaleInvariant: Boolean, rotationInvariant: Boolean): ArrayList { + val result = native.getInvariantModelMatrix(coordinate.asPlatform(), scaleInvariant, rotationInvariant) + return ArrayList(((result as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })) + } + + actual fun addListener(listener: KMMapCameraListenerInterface) { + native.addListener(listener.asPlatform()) + } + + actual fun removeListener(listener: KMMapCameraListenerInterface) { + native.removeListener(listener.asPlatform()) + } + + actual fun notifyListenerBoundsChange() { + native.notifyListenerBoundsChange() + } + + actual fun coordFromScreenPosition(posScreen: KMVec2F): KMCoord { + val result = native.coordFromScreenPosition(posScreen.asPlatform()) + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun coordFromScreenPositionZoom(posScreen: KMVec2F, zoom: Float): KMCoord { + val result = native.coordFromScreenPositionZoom(posScreen.asPlatform(), zoom) + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + actual fun screenPosFromCoord(coord: KMCoord): KMVec2F { + val result = native.screenPosFromCoord(coord.asPlatform()) + return (result as MapCoreSharedModule.MCVec2F).asKmp() + } + + actual fun screenPosFromCoordZoom(coord: KMCoord, zoom: Float): KMVec2F { + val result = native.screenPosFromCoordZoom(coord.asPlatform(), zoom) + return (result as MapCoreSharedModule.MCVec2F).asKmp() + } + + actual fun mapUnitsFromPixels(distancePx: Double): Double { + val result = native.mapUnitsFromPixels(distancePx) + return result + } + + actual fun getScalingFactor(): Double { + val result = native.getScalingFactor() + return result + } + + actual fun coordIsVisibleOnScreen(coord: KMCoord, paddingPc: Float): Boolean { + val result = native.coordIsVisibleOnScreen(coord.asPlatform(), paddingPc) + return result + } + + actual fun setRotationEnabled(enabled: Boolean) { + native.setRotationEnabled(enabled) + } + + actual fun setSnapToNorthEnabled(enabled: Boolean) { + native.setSnapToNorthEnabled(enabled) + } + + actual fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { + native.setBoundsRestrictWholeVisibleRect(enabled) + } + + actual fun asCameraInterface(): KMCameraInterface { + val result = native.asCameraInterface() + return requireNotNull((result as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp() + } + + actual fun getLastVpMatrixD(): ArrayList? { + val result = native.getLastVpMatrixD() + return result?.let { ArrayList(((it as? List<*>)?.map { (it as platform.Foundation.NSNumber).doubleValue } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).doubleValue })) } + } + + actual fun getLastVpMatrix(): ArrayList? { + val result = native.getLastVpMatrix() + return result?.let { ArrayList(((it as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })) } + } + + actual fun getLastInverseVpMatrix(): ArrayList? { + val result = native.getLastInverseVpMatrix() + return result?.let { ArrayList(((it as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })) } + } + + actual fun getLastVpMatrixViewBounds(): KMRectCoord? { + val result = native.getLastVpMatrixViewBounds() + return result?.let { (it as MapCoreSharedModule.MCRectCoord).asKmp() } + } + + actual fun getLastVpMatrixRotation(): Float? { + val result = native.getLastVpMatrixRotation() + return result?.let { (it as platform.Foundation.NSNumber).floatValue } + } + + actual fun getLastVpMatrixZoom(): Float? { + val result = native.getLastVpMatrixZoom() + return result?.let { (it as platform.Foundation.NSNumber).floatValue } + } + + actual fun getLastCameraPosition(): KMVec3D? { + val result = native.getLastCameraPosition() + return result?.let { (it as MapCoreSharedModule.MCVec3D).asKmp() } + } + + actual fun asMapCamera3d(): KMMapCamera3dInterface? { + val result = native.asMapCamera3d() + return result?.let { requireNotNull((it as MapCoreSharedModule.MCMapCamera3dInterface)).asKmp() } + } + + actual companion object + { + + actual fun create(mapInterface: KMMapInterface, screenDensityPpi: Float, is3D: Boolean): KMMapCameraInterface { + val result = MapCoreSharedModule.MCMapCameraInterface.create(mapInterface.asPlatform(), screenDensityPpi, is3D) + return requireNotNull((result as MapCoreSharedModule.MCMapCameraInterface)).asKmp() + } + } +} + +internal fun KMMapCameraInterface.asPlatform(): MapCoreSharedModule.MCMapCameraInterface = nativeHandle as MapCoreSharedModule.MCMapCameraInterface +internal fun MapCoreSharedModule.MCMapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt new file mode 100644 index 000000000..b2591be37 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt @@ -0,0 +1,68 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from camera.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapCameraListenerInterface", exact = true) +actual interface KMMapCameraListenerInterface +{ + + actual fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, zoom: Double) + + actual fun onRotationChanged(angle: Float) + + actual fun onMapInteraction() + + actual fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) +} + +private class KMMapCameraListenerInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol) : KMMapCameraListenerInterface +{ + + override fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, zoom: Double) { + nativeHandle.onVisibleBoundsChanged(visibleBounds.asPlatform(), zoom) + } + + override fun onRotationChanged(angle: Float) { + nativeHandle.onRotationChanged(angle) + } + + override fun onMapInteraction() { + nativeHandle.onMapInteraction() + } + + override fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) { + nativeHandle.onCameraChange(ArrayList(viewMatrix.map { platform.Foundation.NSNumber(float = it) }), ArrayList(projectionMatrix.map { platform.Foundation.NSNumber(float = it) }), origin.asPlatform(), verticalFov, horizontalFov, width, height, focusPointAltitude, focusPointPosition.asPlatform(), zoom) + } +} + +private class KMMapCameraListenerInterfacePlatformProxy(private val delegate: KMMapCameraListenerInterface) : NSObject(), MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol +{ + + override fun onVisibleBoundsChanged(visibleBounds: MapCoreSharedModule.MCRectCoord, zoom: Double) { + delegate.onVisibleBoundsChanged((visibleBounds as MapCoreSharedModule.MCRectCoord).asKmp(), zoom) + } + + override fun onRotationChanged(angle: Float) { + delegate.onRotationChanged(angle) + } + + override fun onMapInteraction() { + delegate.onMapInteraction() + } + + override fun onCameraChange(viewMatrix: List<*>, projectionMatrix: List<*>, origin: MapCoreSharedModule.MCVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: MapCoreSharedModule.MCCoord, zoom: Float) { + delegate.onCameraChange(ArrayList(((viewMatrix as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (viewMatrix as platform.Foundation.NSArray).count.toInt()).map { idx -> ((viewMatrix as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })), ArrayList(((projectionMatrix as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (projectionMatrix as platform.Foundation.NSArray).count.toInt()).map { idx -> ((projectionMatrix as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })), (origin as MapCoreSharedModule.MCVec3D).asKmp(), verticalFov, horizontalFov, width, height, focusPointAltitude, (focusPointPosition as MapCoreSharedModule.MCCoord).asKmp(), zoom) + } +} + +internal fun KMMapCameraListenerInterface.asPlatform(): MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol = when (this) { + is KMMapCameraListenerInterfacePlatformWrapper -> this.nativeHandle + else -> KMMapCameraListenerInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt new file mode 100644 index 000000000..b187a6710 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapConfig", exact = true) +actual class KMMapConfig actual constructor( + mapCoordinateSystem: KMMapCoordinateSystem, +) { + actual val mapCoordinateSystem: KMMapCoordinateSystem = mapCoordinateSystem +} + +internal fun KMMapConfig.asPlatform(): MapCoreSharedModule.MCMapConfig = MapCoreSharedModule.MCMapConfig( + mapCoordinateSystem = mapCoordinateSystem.asPlatform(), +) +internal fun MapCoreSharedModule.MCMapConfig.asKmp(): KMMapConfig = KMMapConfig( + mapCoordinateSystem = (this.mapCoordinateSystem as MapCoreSharedModule.MCMapCoordinateSystem).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt new file mode 100644 index 000000000..145ec8292 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapCoordinateSystem", exact = true) +actual class KMMapCoordinateSystem actual constructor( + identifier: Int, + bounds: KMRectCoord, + unitToScreenMeterFactor: Float, +) { + actual val identifier: Int = identifier + actual val bounds: KMRectCoord = bounds + actual val unitToScreenMeterFactor: Float = unitToScreenMeterFactor +} + +internal fun KMMapCoordinateSystem.asPlatform(): MapCoreSharedModule.MCMapCoordinateSystem = MapCoreSharedModule.MCMapCoordinateSystem( + identifier = identifier, + bounds = bounds.asPlatform(), + unitToScreenMeterFactor = unitToScreenMeterFactor, +) +internal fun MapCoreSharedModule.MCMapCoordinateSystem.asKmp(): KMMapCoordinateSystem = KMMapCoordinateSystem( + identifier = this.identifier, + bounds = (this.bounds as MapCoreSharedModule.MCRectCoord).asKmp(), + unitToScreenMeterFactor = this.unitToScreenMeterFactor, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt new file mode 100644 index 000000000..2d9ca4495 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt @@ -0,0 +1,20 @@ +package io.openmobilemaps.mapscore.kmp + +import MapCoreKmp.MapCoreKmpBridge +import platform.Foundation.NSBundle +import platform.Foundation.NSData + +object KMMapCoreFactory { + fun createTextureLoader(): KMLoaderInterface = + (MapCoreKmpBridge.createTextureLoader() as MapCoreSharedModule.MCLoaderInterfaceProtocol).asKmp() + + fun createFontLoader(bundle: NSBundle, resourcePath: String? = null): KMFontLoaderInterface = + if (resourcePath == null) { + (MapCoreKmpBridge.createFontLoaderWithBundle(bundle) as MapCoreSharedModule.MCFontLoaderInterfaceProtocol).asKmp() + } else { + (MapCoreKmpBridge.createFontLoaderWithBundle(bundle, resourcePath) as MapCoreSharedModule.MCFontLoaderInterfaceProtocol).asKmp() + } + + fun createTextureHolder(data: NSData): KMTextureHolderInterface? = + (MapCoreKmpBridge.createTextureHolderWithData(data) as? MapCoreSharedModule.MCTextureHolderInterfaceProtocol)?.asKmp() +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt new file mode 100644 index 000000000..326b53615 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -0,0 +1,185 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapInterface", exact = true) +actual class KMMapInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCMapInterface + + actual fun setCallbackHandler(callbackInterface: KMMapCallbackInterface?) { + native.setCallbackHandler(callbackInterface?.let { it.asPlatform() }) + } + + actual fun getGraphicsObjectFactory(): KMGraphicsObjectFactoryInterface { + val result = native.getGraphicsObjectFactory() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol)).asKmp() + } + + actual fun getShaderFactory(): KMShaderFactoryInterface { + val result = native.getShaderFactory() + return requireNotNull((result as MapCoreSharedModule.MCShaderFactoryInterfaceProtocol)).asKmp() + } + + actual fun getScheduler(): KMSchedulerInterface { + val result = native.getScheduler() + return requireNotNull((result as MapCoreSharedModule.MCSchedulerInterfaceProtocol)).asKmp() + } + + actual fun getRenderingContext(): KMRenderingContextInterface { + val result = native.getRenderingContext() + return requireNotNull((result as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp() + } + + actual fun getMapConfig(): KMMapConfig { + val result = native.getMapConfig() + return (result as MapCoreSharedModule.MCMapConfig).asKmp() + } + + actual fun getCoordinateConverterHelper(): KMCoordinateConversionHelperInterface { + val result = native.getCoordinateConverterHelper() + return requireNotNull((result as MapCoreSharedModule.MCCoordinateConversionHelperInterface)).asKmp() + } + + actual fun setCamera(camera: KMMapCameraInterface) { + native.setCamera(camera.asPlatform()) + } + + actual fun getCamera(): KMMapCameraInterface { + val result = native.getCamera() + return requireNotNull((result as MapCoreSharedModule.MCMapCameraInterface)).asKmp() + } + + actual fun setTouchHandler(touchHandler: KMTouchHandlerInterface) { + native.setTouchHandler(touchHandler.asPlatform()) + } + + actual fun getTouchHandler(): KMTouchHandlerInterface { + val result = native.getTouchHandler() + return requireNotNull((result as MapCoreSharedModule.MCTouchHandlerInterfaceProtocol)).asKmp() + } + + actual fun setPerformanceLoggers(performanceLoggers: ArrayList) { + native.setPerformanceLoggers(ArrayList(performanceLoggers.map { it.asPlatform() })) + } + + actual fun getPerformanceLoggers(): ArrayList { + val result = native.getPerformanceLoggers() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() })) + } + + actual fun getLayers(): ArrayList { + val result = native.getLayers() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() })) + } + + actual fun getLayersIndexed(): ArrayList { + val result = native.getLayersIndexed() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIndexedLayerInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIndexedLayerInterfaceProtocol)).asKmp() })) + } + + actual fun addLayer(layer: KMLayerInterface) { + native.addLayer(layer.asPlatform()) + } + + actual fun insertLayerAt(layer: KMLayerInterface, atIndex: Int) { + native.insertLayerAt(layer.asPlatform(), atIndex) + } + + actual fun insertLayerAbove(layer: KMLayerInterface, above: KMLayerInterface) { + native.insertLayerAbove(layer.asPlatform(), above.asPlatform()) + } + + actual fun insertLayerBelow(layer: KMLayerInterface, below: KMLayerInterface) { + native.insertLayerBelow(layer.asPlatform(), below.asPlatform()) + } + + actual fun removeLayer(layer: KMLayerInterface) { + native.removeLayer(layer.asPlatform()) + } + + actual fun setViewportSize(size: KMVec2I) { + native.setViewportSize(size.asPlatform()) + } + + actual fun setBackgroundColor(color: KMColor) { + native.setBackgroundColor(color.asPlatform()) + } + + actual fun is3d(): Boolean { + val result = native.is3d() + return result + } + + actual fun invalidate() { + native.invalidate() + } + + actual fun resetIsInvalidated() { + native.resetIsInvalidated() + } + + actual fun prepare() { + native.prepare() + } + + actual fun getNeedsCompute(): Boolean { + val result = native.getNeedsCompute() + return result + } + + actual fun drawOffscreenFrame(target: KMRenderTargetInterface) { + native.drawOffscreenFrame(target.asPlatform()) + } + + actual fun drawFrame() { + native.drawFrame() + } + + actual fun compute() { + native.compute() + } + + actual fun resume() { + native.resume() + } + + actual fun pause() { + native.pause() + } + + actual fun destroy() { + native.destroy() + } + + actual fun drawReadyFrame(bounds: KMRectCoord, paddingPc: Float, timeout: Float, callbacks: KMMapReadyCallbackInterface) { + native.drawReadyFrame(bounds.asPlatform(), paddingPc, timeout, callbacks.asPlatform()) + } + + actual fun forceReload() { + native.forceReload() + } + + actual companion object + { + + actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface, mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { + val result = MapCoreSharedModule.MCMapInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform(), mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) + return requireNotNull((result as MapCoreSharedModule.MCMapInterface)).asKmp() + } + + actual fun createWithOpenGl(mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { + val result = MapCoreSharedModule.MCMapInterface.createWithOpenGl(mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) + return requireNotNull((result as MapCoreSharedModule.MCMapInterface)).asKmp() + } + } +} + +internal fun KMMapInterface.asPlatform(): MapCoreSharedModule.MCMapInterface = nativeHandle as MapCoreSharedModule.MCMapInterface +internal fun MapCoreSharedModule.MCMapInterface.asKmp(): KMMapInterface = KMMapInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt new file mode 100644 index 000000000..a24a23b87 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapReadyCallbackInterface", exact = true) +actual interface KMMapReadyCallbackInterface +{ + + actual fun stateDidUpdate(state: KMLayerReadyState) +} + +private class KMMapReadyCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol) : KMMapReadyCallbackInterface +{ + + override fun stateDidUpdate(state: KMLayerReadyState) { + nativeHandle.stateDidUpdate(state.asPlatform()) + } +} + +private class KMMapReadyCallbackInterfacePlatformProxy(private val delegate: KMMapReadyCallbackInterface) : NSObject(), MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol +{ + + override fun stateDidUpdate(state: MapCoreSharedModule.MCLayerReadyState) { + delegate.stateDidUpdate(KMLayerReadyState.fromPlatform((state as MapCoreSharedModule.MCLayerReadyState))) + } +} + +internal fun KMMapReadyCallbackInterface.asPlatform(): MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol = when (this) { + is KMMapReadyCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMMapReadyCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt new file mode 100644 index 000000000..db355b61b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from maps_core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMapsCoreSharedModule", exact = true) +actual class KMMapsCoreSharedModule actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCMapsCoreSharedModule + + actual companion object + { + + actual fun version(): String { + val result = MapCoreSharedModule.MCMapsCoreSharedModule.version() + return result + } + } +} + +internal fun KMMapsCoreSharedModule.asPlatform(): MapCoreSharedModule.MCMapsCoreSharedModule = nativeHandle as MapCoreSharedModule.MCMapsCoreSharedModule +internal fun MapCoreSharedModule.MCMapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt new file mode 100644 index 000000000..8372232fd --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMMaskingObjectInterface", exact = true) +actual interface KMMaskingObjectInterface +{ + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) +} + +private class KMMaskingObjectInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCMaskingObjectInterfaceProtocol) : KMMaskingObjectInterface +{ + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } + + override fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + nativeHandle.renderAsMask(context.asPlatform(), renderPass.asPlatform(), vpMatrix, mMatrix, origin.asPlatform(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +private class KMMaskingObjectInterfacePlatformProxy(private val delegate: KMMaskingObjectInterface) : NSObject(), MapCoreSharedModule.MCMaskingObjectInterfaceProtocol +{ + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun renderAsMask(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, renderPass: MapCoreSharedModule.MCRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: MapCoreSharedModule.MCVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { + delegate.renderAsMask(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), (renderPass as MapCoreSharedModule.MCRenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) + } +} + +internal fun KMMaskingObjectInterface.asPlatform(): MapCoreSharedModule.MCMaskingObjectInterfaceProtocol = when (this) { + is KMMaskingObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMMaskingObjectInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCMaskingObjectInterfaceProtocol.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt new file mode 100644 index 000000000..f6aa52506 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -0,0 +1,37 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMOpenGlPerformanceLoggerInterface", exact = true) +actual class KMOpenGlPerformanceLoggerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface + + actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { + val result = native.asPerformanceLoggerInterface() + return requireNotNull((result as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() + } + + actual companion object + { + + actual fun create(): KMOpenGlPerformanceLoggerInterface { + val result = MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface)).asKmp() + } + + actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMOpenGlPerformanceLoggerInterface { + val result = MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) + return requireNotNull((result as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface)).asKmp() + } + } +} + +internal fun KMOpenGlPerformanceLoggerInterface.asPlatform(): MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface = nativeHandle as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface +internal fun MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt new file mode 100644 index 000000000..bfe10edc9 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -0,0 +1,92 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMOpenGlRenderTargetInterface", exact = true) +actual interface KMOpenGlRenderTargetInterface +{ + + actual fun asRenderTargetInterface(): KMRenderTargetInterface + + actual fun setup(size: KMVec2I) + + actual fun clear() + + actual fun bindFramebuffer(renderingContext: KMRenderingContextInterface) + + actual fun unbindFramebuffer() + + actual fun getTextureId(): Int +} + +private class KMOpenGlRenderTargetInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol) : KMOpenGlRenderTargetInterface +{ + + override fun asRenderTargetInterface(): KMRenderTargetInterface { + val result = nativeHandle.asRenderTargetInterface() + return requireNotNull((result as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() + } + + override fun setup(size: KMVec2I) { + nativeHandle.setup(size.asPlatform()) + } + + override fun clear() { + nativeHandle.clear() + } + + override fun bindFramebuffer(renderingContext: KMRenderingContextInterface) { + nativeHandle.bindFramebuffer(renderingContext.asPlatform()) + } + + override fun unbindFramebuffer() { + nativeHandle.unbindFramebuffer() + } + + override fun getTextureId(): Int { + val result = nativeHandle.getTextureId() + return result + } +} + +private class KMOpenGlRenderTargetInterfacePlatformProxy(private val delegate: KMOpenGlRenderTargetInterface) : NSObject(), MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol +{ + + override fun asRenderTargetInterface(): MapCoreSharedModule.MCRenderTargetInterfaceProtocol? { + val result = delegate.asRenderTargetInterface() + return result.asPlatform() + } + + override fun setup(size: MapCoreSharedModule.MCVec2I) { + delegate.setup((size as MapCoreSharedModule.MCVec2I).asKmp()) + } + + override fun clear() { + delegate.clear() + } + + override fun bindFramebuffer(renderingContext: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?) { + delegate.bindFramebuffer(requireNotNull((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp()) + } + + override fun unbindFramebuffer() { + delegate.unbindFramebuffer() + } + + override fun getTextureId(): Int { + val result = delegate.getTextureId() + return result + } +} + +internal fun KMOpenGlRenderTargetInterface.asPlatform(): MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol = when (this) { + is KMOpenGlRenderTargetInterfacePlatformWrapper -> this.nativeHandle + else -> KMOpenGlRenderTargetInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt new file mode 100644 index 000000000..eddf982d8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -0,0 +1,128 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMOpenGlRenderingContextInterface", exact = true) +actual interface KMOpenGlRenderingContextInterface +{ + + actual fun resume() + + actual fun pause() + + actual fun getCreateRenderTarget(name: String, textureFilter: KMTextureFilterType, clearColor: KMColor, usesDepthStencil: Boolean): KMOpenGlRenderTargetInterface + + actual fun deleteRenderTarget(name: String) + + actual fun getRenderTargets(): ArrayList + + actual fun getProgram(name: String): Int + + actual fun storeProgram(name: String, program: Int) + + actual fun getAspectRatio(): Float + + actual fun getDeltaTimeMs(): Long +} + +private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol) : KMOpenGlRenderingContextInterface +{ + + override fun resume() { + nativeHandle.resume() + } + + override fun pause() { + nativeHandle.pause() + } + + override fun getCreateRenderTarget(name: String, textureFilter: KMTextureFilterType, clearColor: KMColor, usesDepthStencil: Boolean): KMOpenGlRenderTargetInterface { + val result = nativeHandle.getCreateRenderTarget(name, textureFilter.asPlatform(), clearColor.asPlatform(), usesDepthStencil) + return requireNotNull((result as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() + } + + override fun deleteRenderTarget(name: String) { + nativeHandle.deleteRenderTarget(name) + } + + override fun getRenderTargets(): ArrayList { + val result = nativeHandle.getRenderTargets() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() })) + } + + override fun getProgram(name: String): Int { + val result = nativeHandle.getProgram(name) + return result + } + + override fun storeProgram(name: String, program: Int) { + nativeHandle.storeProgram(name, program) + } + + override fun getAspectRatio(): Float { + val result = nativeHandle.getAspectRatio() + return result + } + + override fun getDeltaTimeMs(): Long { + val result = nativeHandle.getDeltaTimeMs() + return result + } +} + +private class KMOpenGlRenderingContextInterfacePlatformProxy(private val delegate: KMOpenGlRenderingContextInterface) : NSObject(), MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol +{ + + override fun resume() { + delegate.resume() + } + + override fun pause() { + delegate.pause() + } + + override fun getCreateRenderTarget(name: String, textureFilter: MapCoreSharedModule.MCTextureFilterType, clearColor: MapCoreSharedModule.MCColor, usesDepthStencil: Boolean): MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol? { + val result = delegate.getCreateRenderTarget(name, KMTextureFilterType.fromPlatform((textureFilter as MapCoreSharedModule.MCTextureFilterType)), (clearColor as MapCoreSharedModule.MCColor).asKmp(), usesDepthStencil) + return result.asPlatform() + } + + override fun deleteRenderTarget(name: String) { + delegate.deleteRenderTarget(name) + } + + override fun getRenderTargets(): List<*> { + val result = delegate.getRenderTargets() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getProgram(name: String): Int { + val result = delegate.getProgram(name) + return result + } + + override fun storeProgram(name: String, program: Int) { + delegate.storeProgram(name, program) + } + + override fun getAspectRatio(): Float { + val result = delegate.getAspectRatio() + return result + } + + override fun getDeltaTimeMs(): Long { + val result = delegate.getDeltaTimeMs() + return result + } +} + +internal fun KMOpenGlRenderingContextInterface.asPlatform(): MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol = when (this) { + is KMOpenGlRenderingContextInterfacePlatformWrapper -> this.nativeHandle + else -> KMOpenGlRenderingContextInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt new file mode 100644 index 000000000..1f57636e3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt @@ -0,0 +1,104 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPerformanceLoggerInterface", exact = true) +actual interface KMPerformanceLoggerInterface +{ + + actual fun getLoggerName(): String + + actual fun startLog(id: String) + + actual fun endLog(id: String) + + actual fun getStatistics(id: String): KMLoggerData? + + actual fun getAllStatistics(): ArrayList + + actual fun resetData() + + actual fun setLoggingEnabled(enabled: Boolean) +} + +private class KMPerformanceLoggerInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol) : KMPerformanceLoggerInterface +{ + + override fun getLoggerName(): String { + val result = nativeHandle.getLoggerName() + return result + } + + override fun startLog(id: String) { + nativeHandle.startLog(id) + } + + override fun endLog(id: String) { + nativeHandle.endLog(id) + } + + override fun getStatistics(id: String): KMLoggerData? { + val result = nativeHandle.getStatistics(id) + return result?.let { (it as MapCoreSharedModule.MCLoggerData).asKmp() } + } + + override fun getAllStatistics(): ArrayList { + val result = nativeHandle.getAllStatistics() + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCLoggerData).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCLoggerData).asKmp() })) + } + + override fun resetData() { + nativeHandle.resetData() + } + + override fun setLoggingEnabled(enabled: Boolean) { + nativeHandle.setLoggingEnabled(enabled) + } +} + +private class KMPerformanceLoggerInterfacePlatformProxy(private val delegate: KMPerformanceLoggerInterface) : NSObject(), MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol +{ + + override fun getLoggerName(): String { + val result = delegate.getLoggerName() + return result + } + + override fun startLog(id: String) { + delegate.startLog(id) + } + + override fun endLog(id: String) { + delegate.endLog(id) + } + + override fun getStatistics(id: String): MapCoreSharedModule.MCLoggerData? { + val result = delegate.getStatistics(id) + return result?.let { it.asPlatform() } + } + + override fun getAllStatistics(): List<*> { + val result = delegate.getAllStatistics() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun resetData() { + delegate.resetData() + } + + override fun setLoggingEnabled(enabled: Boolean) { + delegate.setLoggingEnabled(enabled) + } +} + +internal fun KMPerformanceLoggerInterface.asPlatform(): MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol = when (this) { + is KMPerformanceLoggerInterfacePlatformWrapper -> this.nativeHandle + else -> KMPerformanceLoggerInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt new file mode 100644 index 000000000..ae5aaab40 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -0,0 +1,62 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygon2dInterface", exact = true) +actual interface KMPolygon2dInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCPolygon2dInterfaceProtocol) : KMPolygon2dInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + } +} + +private class KMPolygon2dInterfacePlatformProxy(private val delegate: KMPolygon2dInterface) : NSObject(), MapCoreSharedModule.MCPolygon2dInterfaceProtocol +{ + + override fun setVertices(vertices: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes, origin: MapCoreSharedModule.MCVec3D) { + delegate.setVertices((vertices as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp()) + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): MapCoreSharedModule.MCMaskingObjectInterfaceProtocol? { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMPolygon2dInterface.asPlatform(): MapCoreSharedModule.MCPolygon2dInterfaceProtocol = when (this) { + is KMPolygon2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygon2dInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCPolygon2dInterfaceProtocol.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt new file mode 100644 index 000000000..51471b032 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonCoord", exact = true) +actual class KMPolygonCoord actual constructor( + positions: ArrayList, + holes: ArrayList>, +) { + actual val positions: ArrayList = positions + actual val holes: ArrayList> = holes +} + +internal fun KMPolygonCoord.asPlatform(): MapCoreSharedModule.MCPolygonCoord = MapCoreSharedModule.MCPolygonCoord( + positions = ArrayList(positions.map { it.asPlatform() }), + holes = ArrayList(holes.map { ArrayList(it.map { it.asPlatform() }) }), +) +internal fun MapCoreSharedModule.MCPolygonCoord.asKmp(): KMPolygonCoord = KMPolygonCoord( + positions = ArrayList(((this.positions as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (this.positions as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.positions as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })), + holes = ArrayList(((this.holes as? List<*>)?.map { ArrayList(((it as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })) } ?: (0 until (this.holes as platform.Foundation.NSArray).count.toInt()).map { idx -> ArrayList((((this.holes as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until ((this.holes as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSArray).count.toInt()).map { idx -> (((this.holes as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })) })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt new file mode 100644 index 000000000..f26834865 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonGroup2dInterface", exact = true) +actual interface KMPolygonGroup2dInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMPolygonGroup2dInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol) : KMPolygonGroup2dInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } +} + +private class KMPolygonGroup2dInterfacePlatformProxy(private val delegate: KMPolygonGroup2dInterface) : NSObject(), MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol +{ + + override fun setVertices(vertices: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes, origin: MapCoreSharedModule.MCVec3D) { + delegate.setVertices((vertices as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp()) + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMPolygonGroup2dInterface.asPlatform(): MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol = when (this) { + is KMPolygonGroup2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygonGroup2dInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt new file mode 100644 index 000000000..46e3e16c9 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonGroupShaderInterface", exact = true) +actual class KMPolygonGroupShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol + + actual fun setStyles(styles: KMSharedBytes) { + native.setStyles(styles.asPlatform()) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMPolygonGroupShaderInterface.asPlatform(): MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt new file mode 100644 index 000000000..6e3607c46 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonInfo", exact = true) +actual class KMPolygonInfo actual constructor( + identifier: String, + coordinates: KMPolygonCoord, + color: KMColor, + highlightColor: KMColor, +) { + actual val identifier: String = identifier + actual val coordinates: KMPolygonCoord = coordinates + actual val color: KMColor = color + actual val highlightColor: KMColor = highlightColor +} + +internal fun KMPolygonInfo.asPlatform(): MapCoreSharedModule.MCPolygonInfo = MapCoreSharedModule.MCPolygonInfo( + identifier = identifier, + coordinates = coordinates.asPlatform(), + color = color.asPlatform(), + highlightColor = highlightColor.asPlatform(), +) +internal fun MapCoreSharedModule.MCPolygonInfo.asKmp(): KMPolygonInfo = KMPolygonInfo( + identifier = this.identifier, + coordinates = (this.coordinates as MapCoreSharedModule.MCPolygonCoord).asKmp(), + color = (this.color as MapCoreSharedModule.MCColor).asKmp(), + highlightColor = (this.highlightColor as MapCoreSharedModule.MCColor).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt new file mode 100644 index 000000000..3ed4b47d1 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt @@ -0,0 +1,52 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonLayerCallbackInterface", exact = true) +actual interface KMPolygonLayerCallbackInterface +{ + + actual fun onClickConfirmed(polygon: KMPolygonInfo): Boolean + + actual fun onClickUnconfirmed(polygon: KMPolygonInfo): Boolean +} + +private class KMPolygonLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCPolygonLayerCallbackInterfaceProtocol) : KMPolygonLayerCallbackInterface +{ + + override fun onClickConfirmed(polygon: KMPolygonInfo): Boolean { + val result = nativeHandle.onClickConfirmed(polygon.asPlatform()) + return result + } + + override fun onClickUnconfirmed(polygon: KMPolygonInfo): Boolean { + val result = nativeHandle.onClickUnconfirmed(polygon.asPlatform()) + return result + } +} + +private class KMPolygonLayerCallbackInterfacePlatformProxy(private val delegate: KMPolygonLayerCallbackInterface) : NSObject(), MapCoreSharedModule.MCPolygonLayerCallbackInterfaceProtocol +{ + + override fun onClickConfirmed(polygon: MapCoreSharedModule.MCPolygonInfo): Boolean { + val result = delegate.onClickConfirmed((polygon as MapCoreSharedModule.MCPolygonInfo).asKmp()) + return result + } + + override fun onClickUnconfirmed(polygon: MapCoreSharedModule.MCPolygonInfo): Boolean { + val result = delegate.onClickUnconfirmed((polygon as MapCoreSharedModule.MCPolygonInfo).asKmp()) + return result + } +} + +internal fun KMPolygonLayerCallbackInterface.asPlatform(): MapCoreSharedModule.MCPolygonLayerCallbackInterfaceProtocol = when (this) { + is KMPolygonLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygonLayerCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCPolygonLayerCallbackInterfaceProtocol.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt new file mode 100644 index 000000000..a6e00de2b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -0,0 +1,73 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonLayerInterface", exact = true) +actual class KMPolygonLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCPolygonLayerInterface + + actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { + native.setPolygons(ArrayList(polygons.map { it.asPlatform() }), origin.asPlatform()) + } + + actual fun getPolygons(): ArrayList { + val result = native.getPolygons() + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCPolygonInfo).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCPolygonInfo).asKmp() })) + } + + actual fun remove(polygon: KMPolygonInfo) { + native.remove(polygon.asPlatform()) + } + + actual fun add(polygon: KMPolygonInfo) { + native.add(polygon.asPlatform()) + } + + actual fun addAll(polygons: ArrayList) { + native.addAll(ArrayList(polygons.map { it.asPlatform() })) + } + + actual fun clear() { + native.clear() + } + + actual fun setCallbackHandler(handler: KMPolygonLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual fun resetSelection() { + native.resetSelection() + } + + actual fun setLayerClickable(isLayerClickable: Boolean) { + native.setLayerClickable(isLayerClickable) + } + + actual fun setRenderPassIndex(index: Int) { + native.setRenderPassIndex(index) + } + + actual companion object + { + + actual fun create(): KMPolygonLayerInterface { + val result = MapCoreSharedModule.MCPolygonLayerInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCPolygonLayerInterface)).asKmp() + } + } +} + +internal fun KMPolygonLayerInterface.asPlatform(): MapCoreSharedModule.MCPolygonLayerInterface = nativeHandle as MapCoreSharedModule.MCPolygonLayerInterface +internal fun MapCoreSharedModule.MCPolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt new file mode 100644 index 000000000..68563e222 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonMaskObjectInterface", exact = true) +actual class KMPolygonMaskObjectInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCPolygonMaskObjectInterface + + actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { + native.setPolygons(ArrayList(polygons.map { it.asPlatform() }), origin.asPlatform()) + } + + actual fun setPolygon(polygon: KMPolygonCoord, origin: KMVec3D) { + native.setPolygon(polygon.asPlatform(), origin.asPlatform()) + } + + actual fun getPolygonObject(): KMPolygon2dInterface { + val result = native.getPolygonObject() + return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + } + + actual companion object + { + + actual fun create(graphicsObjectFactory: KMGraphicsObjectFactoryInterface, conversionHelper: KMCoordinateConversionHelperInterface, is3d: Boolean): KMPolygonMaskObjectInterface { + val result = MapCoreSharedModule.MCPolygonMaskObjectInterface.create(graphicsObjectFactory.asPlatform(), conversionHelper.asPlatform(), is3d) + return requireNotNull((result as MapCoreSharedModule.MCPolygonMaskObjectInterface)).asKmp() + } + } +} + +internal fun KMPolygonMaskObjectInterface.asPlatform(): MapCoreSharedModule.MCPolygonMaskObjectInterface = nativeHandle as MapCoreSharedModule.MCPolygonMaskObjectInterface +internal fun MapCoreSharedModule.MCPolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt new file mode 100644 index 000000000..82c4e4bee --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -0,0 +1,110 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonPatternGroup2dInterface", exact = true) +actual interface KMPolygonPatternGroup2dInterface +{ + + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + + actual fun setOpacities(values: KMSharedBytes) + + actual fun setTextureCoordinates(values: KMSharedBytes) + + actual fun setScalingFactor(factor: Float) + + actual fun setScalingFactors(factor: KMVec2F) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMPolygonPatternGroup2dInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol) : KMPolygonPatternGroup2dInterface +{ + + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + } + + override fun setOpacities(values: KMSharedBytes) { + nativeHandle.setOpacities(values.asPlatform()) + } + + override fun setTextureCoordinates(values: KMSharedBytes) { + nativeHandle.setTextureCoordinates(values.asPlatform()) + } + + override fun setScalingFactor(factor: Float) { + nativeHandle.setScalingFactor(factor) + } + + override fun setScalingFactors(factor: KMVec2F) { + nativeHandle.setScalingFactors(factor.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } +} + +private class KMPolygonPatternGroup2dInterfacePlatformProxy(private val delegate: KMPolygonPatternGroup2dInterface) : NSObject(), MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol +{ + + override fun setVertices(vertices: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes, origin: MapCoreSharedModule.MCVec3D) { + delegate.setVertices((vertices as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp()) + } + + override fun setOpacities(values: MapCoreSharedModule.MCSharedBytes) { + delegate.setOpacities((values as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setTextureCoordinates(values: MapCoreSharedModule.MCSharedBytes) { + delegate.setTextureCoordinates((values as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setScalingFactor(factor: Float) { + delegate.setScalingFactor(factor) + } + + override fun setScalingFactors(factor: MapCoreSharedModule.MCVec2F) { + delegate.setScalingFactors((factor as MapCoreSharedModule.MCVec2F).asKmp()) + } + + override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { + delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMPolygonPatternGroup2dInterface.asPlatform(): MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol = when (this) { + is KMPolygonPatternGroup2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMPolygonPatternGroup2dInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt new file mode 100644 index 000000000..7edf311f3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonPatternGroupShaderInterface", exact = true) +actual class KMPolygonPatternGroupShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMPolygonPatternGroupShaderInterface.asPlatform(): MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt new file mode 100644 index 000000000..178fda1cd --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from polygon.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMPolygonStyle", exact = true) +actual class KMPolygonStyle actual constructor( + color: KMColor, + opacity: Float, +) { + actual val color: KMColor = color + actual val opacity: Float = opacity +} + +internal fun KMPolygonStyle.asPlatform(): MapCoreSharedModule.MCPolygonStyle = MapCoreSharedModule.MCPolygonStyle( + color = color.asPlatform(), + opacity = opacity, +) +internal fun MapCoreSharedModule.MCPolygonStyle.asKmp(): KMPolygonStyle = KMPolygonStyle( + color = (this.color as MapCoreSharedModule.MCColor).asKmp(), + opacity = this.opacity, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt new file mode 100644 index 000000000..7675274e3 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt @@ -0,0 +1,11 @@ +package io.openmobilemaps.mapscore.kmp + +class KMPromise { + private val promise = MapCoreSharedModule.DJPromise() + + fun setValue(value: Any?) { + promise.setValue(value) + } + + fun getFuture(): KMFuture = promise.getFuture().asKmp() +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt new file mode 100644 index 000000000..2a459b52a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMQuad2dD", exact = true) +actual class KMQuad2dD actual constructor( + topLeft: KMVec2D, + topRight: KMVec2D, + bottomRight: KMVec2D, + bottomLeft: KMVec2D, +) { + actual val topLeft: KMVec2D = topLeft + actual val topRight: KMVec2D = topRight + actual val bottomRight: KMVec2D = bottomRight + actual val bottomLeft: KMVec2D = bottomLeft +} + +internal fun KMQuad2dD.asPlatform(): MapCoreSharedModule.MCQuad2dD = MapCoreSharedModule.MCQuad2dD( + topLeft = topLeft.asPlatform(), + topRight = topRight.asPlatform(), + bottomRight = bottomRight.asPlatform(), + bottomLeft = bottomLeft.asPlatform(), +) +internal fun MapCoreSharedModule.MCQuad2dD.asKmp(): KMQuad2dD = KMQuad2dD( + topLeft = (this.topLeft as MapCoreSharedModule.MCVec2D).asKmp(), + topRight = (this.topRight as MapCoreSharedModule.MCVec2D).asKmp(), + bottomRight = (this.bottomRight as MapCoreSharedModule.MCVec2D).asKmp(), + bottomLeft = (this.bottomLeft as MapCoreSharedModule.MCVec2D).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt new file mode 100644 index 000000000..719fb0079 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -0,0 +1,152 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMQuad2dInstancedInterface", exact = true) +actual interface KMQuad2dInstancedInterface +{ + + actual fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + actual fun setInstanceCount(count: Int) + + actual fun setPositions(positions: KMSharedBytes) + + actual fun setScales(scales: KMSharedBytes) + + actual fun setRotations(rotations: KMSharedBytes) + + actual fun setAlphas(values: KMSharedBytes) + + actual fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + actual fun setPositionOffset(offsets: KMSharedBytes) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMQuad2dInstancedInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol) : KMQuad2dInstancedInterface +{ + + override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setInstanceCount(count: Int) { + nativeHandle.setInstanceCount(count) + } + + override fun setPositions(positions: KMSharedBytes) { + nativeHandle.setPositions(positions.asPlatform()) + } + + override fun setScales(scales: KMSharedBytes) { + nativeHandle.setScales(scales.asPlatform()) + } + + override fun setRotations(rotations: KMSharedBytes) { + nativeHandle.setRotations(rotations.asPlatform()) + } + + override fun setAlphas(values: KMSharedBytes) { + nativeHandle.setAlphas(values.asPlatform()) + } + + override fun setTextureCoordinates(textureCoordinates: KMSharedBytes) { + nativeHandle.setTextureCoordinates(textureCoordinates.asPlatform()) + } + + override fun setPositionOffset(offsets: KMSharedBytes) { + nativeHandle.setPositionOffset(offsets.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + } +} + +private class KMQuad2dInstancedInterfacePlatformProxy(private val delegate: KMQuad2dInstancedInterface) : NSObject(), MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol +{ + + override fun setFrame(frame: MapCoreSharedModule.MCQuad2dD, origin: MapCoreSharedModule.MCVec3D, is3d: Boolean) { + delegate.setFrame((frame as MapCoreSharedModule.MCQuad2dD).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp(), is3d) + } + + override fun setInstanceCount(count: Int) { + delegate.setInstanceCount(count) + } + + override fun setPositions(positions: MapCoreSharedModule.MCSharedBytes) { + delegate.setPositions((positions as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setScales(scales: MapCoreSharedModule.MCSharedBytes) { + delegate.setScales((scales as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setRotations(rotations: MapCoreSharedModule.MCSharedBytes) { + delegate.setRotations((rotations as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setAlphas(values: MapCoreSharedModule.MCSharedBytes) { + delegate.setAlphas((values as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setTextureCoordinates(textureCoordinates: MapCoreSharedModule.MCSharedBytes) { + delegate.setTextureCoordinates((textureCoordinates as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setPositionOffset(offsets: MapCoreSharedModule.MCSharedBytes) { + delegate.setPositionOffset((offsets as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { + delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): MapCoreSharedModule.MCMaskingObjectInterfaceProtocol? { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMQuad2dInstancedInterface.asPlatform(): MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol = when (this) { + is KMQuad2dInstancedInterfacePlatformWrapper -> this.nativeHandle + else -> KMQuad2dInstancedInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt new file mode 100644 index 000000000..20f158c3e --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -0,0 +1,102 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMQuad2dInterface", exact = true) +actual interface KMQuad2dInterface +{ + + actual fun setFrame(frame: KMQuad3dD, textureCoordinates: KMRectD, origin: KMVec3D, is3d: Boolean) + + actual fun setSubdivisionFactor(factor: Int) + + actual fun setMinMagFilter(filterType: KMTextureFilterType) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMQuad2dInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCQuad2dInterfaceProtocol) : KMQuad2dInterface +{ + + override fun setFrame(frame: KMQuad3dD, textureCoordinates: KMRectD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), textureCoordinates.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + nativeHandle.setSubdivisionFactor(factor) + } + + override fun setMinMagFilter(filterType: KMTextureFilterType) { + nativeHandle.setMinMagFilter(filterType.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + } +} + +private class KMQuad2dInterfacePlatformProxy(private val delegate: KMQuad2dInterface) : NSObject(), MapCoreSharedModule.MCQuad2dInterfaceProtocol +{ + + override fun setFrame(frame: MapCoreSharedModule.MCQuad3dD, textureCoordinates: MapCoreSharedModule.MCRectD, origin: MapCoreSharedModule.MCVec3D, is3d: Boolean) { + delegate.setFrame((frame as MapCoreSharedModule.MCQuad3dD).asKmp(), (textureCoordinates as MapCoreSharedModule.MCRectD).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + delegate.setSubdivisionFactor(factor) + } + + override fun setMinMagFilter(filterType: MapCoreSharedModule.MCTextureFilterType) { + delegate.setMinMagFilter(KMTextureFilterType.fromPlatform((filterType as MapCoreSharedModule.MCTextureFilterType))) + } + + override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { + delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): MapCoreSharedModule.MCMaskingObjectInterfaceProtocol? { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMQuad2dInterface.asPlatform(): MapCoreSharedModule.MCQuad2dInterfaceProtocol = when (this) { + is KMQuad2dInterfacePlatformWrapper -> this.nativeHandle + else -> KMQuad2dInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCQuad2dInterfaceProtocol.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt new file mode 100644 index 000000000..08e4c202f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -0,0 +1,152 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMQuad2dStretchedInstancedInterface", exact = true) +actual interface KMQuad2dStretchedInstancedInterface +{ + + actual fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + actual fun setInstanceCount(count: Int) + + actual fun setPositions(positions: KMSharedBytes) + + actual fun setScales(scales: KMSharedBytes) + + actual fun setRotations(rotations: KMSharedBytes) + + actual fun setAlphas(values: KMSharedBytes) + + actual fun setStretchInfos(values: KMSharedBytes) + + actual fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface + + actual fun asMaskingObject(): KMMaskingObjectInterface +} + +private class KMQuad2dStretchedInstancedInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol) : KMQuad2dStretchedInstancedInterface +{ + + override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setInstanceCount(count: Int) { + nativeHandle.setInstanceCount(count) + } + + override fun setPositions(positions: KMSharedBytes) { + nativeHandle.setPositions(positions.asPlatform()) + } + + override fun setScales(scales: KMSharedBytes) { + nativeHandle.setScales(scales.asPlatform()) + } + + override fun setRotations(rotations: KMSharedBytes) { + nativeHandle.setRotations(rotations.asPlatform()) + } + + override fun setAlphas(values: KMSharedBytes) { + nativeHandle.setAlphas(values.asPlatform()) + } + + override fun setStretchInfos(values: KMSharedBytes) { + nativeHandle.setStretchInfos(values.asPlatform()) + } + + override fun setTextureCoordinates(textureCoordinates: KMSharedBytes) { + nativeHandle.setTextureCoordinates(textureCoordinates.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } + + override fun asMaskingObject(): KMMaskingObjectInterface { + val result = nativeHandle.asMaskingObject() + return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + } +} + +private class KMQuad2dStretchedInstancedInterfacePlatformProxy(private val delegate: KMQuad2dStretchedInstancedInterface) : NSObject(), MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol +{ + + override fun setFrame(frame: MapCoreSharedModule.MCQuad2dD, origin: MapCoreSharedModule.MCVec3D, is3d: Boolean) { + delegate.setFrame((frame as MapCoreSharedModule.MCQuad2dD).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp(), is3d) + } + + override fun setInstanceCount(count: Int) { + delegate.setInstanceCount(count) + } + + override fun setPositions(positions: MapCoreSharedModule.MCSharedBytes) { + delegate.setPositions((positions as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setScales(scales: MapCoreSharedModule.MCSharedBytes) { + delegate.setScales((scales as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setRotations(rotations: MapCoreSharedModule.MCSharedBytes) { + delegate.setRotations((rotations as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setAlphas(values: MapCoreSharedModule.MCSharedBytes) { + delegate.setAlphas((values as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setStretchInfos(values: MapCoreSharedModule.MCSharedBytes) { + delegate.setStretchInfos((values as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setTextureCoordinates(textureCoordinates: MapCoreSharedModule.MCSharedBytes) { + delegate.setTextureCoordinates((textureCoordinates as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { + delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } + + override fun asMaskingObject(): MapCoreSharedModule.MCMaskingObjectInterfaceProtocol? { + val result = delegate.asMaskingObject() + return result.asPlatform() + } +} + +internal fun KMQuad2dStretchedInstancedInterface.asPlatform(): MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol = when (this) { + is KMQuad2dStretchedInstancedInterfacePlatformWrapper -> this.nativeHandle + else -> KMQuad2dStretchedInstancedInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt new file mode 100644 index 000000000..b9521de3b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMQuad3dD", exact = true) +actual class KMQuad3dD actual constructor( + topLeft: KMVec3D, + topRight: KMVec3D, + bottomRight: KMVec3D, + bottomLeft: KMVec3D, +) { + actual val topLeft: KMVec3D = topLeft + actual val topRight: KMVec3D = topRight + actual val bottomRight: KMVec3D = bottomRight + actual val bottomLeft: KMVec3D = bottomLeft +} + +internal fun KMQuad3dD.asPlatform(): MapCoreSharedModule.MCQuad3dD = MapCoreSharedModule.MCQuad3dD( + topLeft = topLeft.asPlatform(), + topRight = topRight.asPlatform(), + bottomRight = bottomRight.asPlatform(), + bottomLeft = bottomLeft.asPlatform(), +) +internal fun MapCoreSharedModule.MCQuad3dD.asKmp(): KMQuad3dD = KMQuad3dD( + topLeft = (this.topLeft as MapCoreSharedModule.MCVec3D).asKmp(), + topRight = (this.topRight as MapCoreSharedModule.MCVec3D).asKmp(), + bottomRight = (this.bottomRight as MapCoreSharedModule.MCVec3D).asKmp(), + bottomLeft = (this.bottomLeft as MapCoreSharedModule.MCVec3D).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt new file mode 100644 index 000000000..ae8be59b4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMQuadCoord", exact = true) +actual class KMQuadCoord actual constructor( + topLeft: KMCoord, + topRight: KMCoord, + bottomRight: KMCoord, + bottomLeft: KMCoord, +) { + actual val topLeft: KMCoord = topLeft + actual val topRight: KMCoord = topRight + actual val bottomRight: KMCoord = bottomRight + actual val bottomLeft: KMCoord = bottomLeft +} + +internal fun KMQuadCoord.asPlatform(): MapCoreSharedModule.MCQuadCoord = MapCoreSharedModule.MCQuadCoord( + topLeft = topLeft.asPlatform(), + topRight = topRight.asPlatform(), + bottomRight = bottomRight.asPlatform(), + bottomLeft = bottomLeft.asPlatform(), +) +internal fun MapCoreSharedModule.MCQuadCoord.asKmp(): KMQuadCoord = KMQuadCoord( + topLeft = (this.topLeft as MapCoreSharedModule.MCCoord).asKmp(), + topRight = (this.topRight as MapCoreSharedModule.MCCoord).asKmp(), + bottomRight = (this.bottomRight as MapCoreSharedModule.MCCoord).asKmp(), + bottomLeft = (this.bottomLeft as MapCoreSharedModule.MCCoord).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt new file mode 100644 index 000000000..f42c8c770 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRasterShaderInterface", exact = true) +actual class KMRasterShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCRasterShaderInterfaceProtocol + + actual fun setStyle(style: KMRasterShaderStyle) { + native.setStyle(style.asPlatform()) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMRasterShaderInterface.asPlatform(): MapCoreSharedModule.MCRasterShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCRasterShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCRasterShaderInterfaceProtocol.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt new file mode 100644 index 000000000..e1f180bf0 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRasterShaderStyle", exact = true) +actual class KMRasterShaderStyle actual constructor( + opacity: Float, + brightnessMin: Float, + brightnessMax: Float, + contrast: Float, + saturation: Float, + gamma: Float, + brightnessShift: Float, +) { + actual val opacity: Float = opacity + actual val brightnessMin: Float = brightnessMin + actual val brightnessMax: Float = brightnessMax + actual val contrast: Float = contrast + actual val saturation: Float = saturation + actual val gamma: Float = gamma + actual val brightnessShift: Float = brightnessShift +} + +internal fun KMRasterShaderStyle.asPlatform(): MapCoreSharedModule.MCRasterShaderStyle = MapCoreSharedModule.MCRasterShaderStyle( + opacity = opacity, + brightnessMin = brightnessMin, + brightnessMax = brightnessMax, + contrast = contrast, + saturation = saturation, + gamma = gamma, + brightnessShift = brightnessShift, +) +internal fun MapCoreSharedModule.MCRasterShaderStyle.asKmp(): KMRasterShaderStyle = KMRasterShaderStyle( + opacity = this.opacity, + brightnessMin = this.brightnessMin, + brightnessMax = this.brightnessMax, + contrast = this.contrast, + saturation = this.saturation, + gamma = this.gamma, + brightnessShift = this.brightnessShift, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt new file mode 100644 index 000000000..603e42cbb --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from coordinate_system.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRectCoord", exact = true) +actual class KMRectCoord actual constructor( + topLeft: KMCoord, + bottomRight: KMCoord, +) { + actual val topLeft: KMCoord = topLeft + actual val bottomRight: KMCoord = bottomRight +} + +internal fun KMRectCoord.asPlatform(): MapCoreSharedModule.MCRectCoord = MapCoreSharedModule.MCRectCoord( + topLeft = topLeft.asPlatform(), + bottomRight = bottomRight.asPlatform(), +) +internal fun MapCoreSharedModule.MCRectCoord.asKmp(): KMRectCoord = KMRectCoord( + topLeft = (this.topLeft as MapCoreSharedModule.MCCoord).asKmp(), + bottomRight = (this.bottomRight as MapCoreSharedModule.MCCoord).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt new file mode 100644 index 000000000..4f1015743 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRectD", exact = true) +actual class KMRectD actual constructor( + x: Double, + y: Double, + width: Double, + height: Double, +) { + actual val x: Double = x + actual val y: Double = y + actual val width: Double = width + actual val height: Double = height +} + +internal fun KMRectD.asPlatform(): MapCoreSharedModule.MCRectD = MapCoreSharedModule.MCRectD( + x = x, + y = y, + width = width, + height = height, +) +internal fun MapCoreSharedModule.MCRectD.asKmp(): KMRectD = KMRectD( + x = this.x, + y = this.y, + width = this.width, + height = this.height, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt new file mode 100644 index 000000000..35b1ee342 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRectF", exact = true) +actual class KMRectF actual constructor( + x: Float, + y: Float, + width: Float, + height: Float, +) { + actual val x: Float = x + actual val y: Float = y + actual val width: Float = width + actual val height: Float = height +} + +internal fun KMRectF.asPlatform(): MapCoreSharedModule.MCRectF = MapCoreSharedModule.MCRectF( + x = x, + y = y, + width = width, + height = height, +) +internal fun MapCoreSharedModule.MCRectF.asKmp(): KMRectF = KMRectF( + x = this.x, + y = this.y, + width = this.width, + height = this.height, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt new file mode 100644 index 000000000..41b8fdfad --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRectI", exact = true) +actual class KMRectI actual constructor( + x: Int, + y: Int, + width: Int, + height: Int, +) { + actual val x: Int = x + actual val y: Int = y + actual val width: Int = width + actual val height: Int = height +} + +internal fun KMRectI.asPlatform(): MapCoreSharedModule.MCRectI = MapCoreSharedModule.MCRectI( + x = x, + y = y, + width = width, + height = height, +) +internal fun MapCoreSharedModule.MCRectI.asKmp(): KMRectI = KMRectI( + x = this.x, + y = this.y, + width = this.width, + height = this.height, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt new file mode 100644 index 000000000..d7f4a7840 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRectanglePacker", exact = true) +actual class KMRectanglePacker actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCRectanglePacker + + actual companion object + { + + actual fun pack(rectangles: HashMap, maxPageSize: KMVec2I, spacing: Int): ArrayList { + val result = MapCoreSharedModule.MCRectanglePacker.pack(HashMap(rectangles.map { it.key to it.value.asPlatform() }.toMap()), maxPageSize.asPlatform(), spacing) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCRectanglePackerPage).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRectanglePackerPage).asKmp() })) + } + } +} + +internal fun KMRectanglePacker.asPlatform(): MapCoreSharedModule.MCRectanglePacker = nativeHandle as MapCoreSharedModule.MCRectanglePacker +internal fun MapCoreSharedModule.MCRectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt new file mode 100644 index 000000000..6d968a880 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRectanglePackerPage", exact = true) +actual class KMRectanglePackerPage actual constructor( + uvs: HashMap, +) { + actual val uvs: HashMap = uvs +} + +internal fun KMRectanglePackerPage.asPlatform(): MapCoreSharedModule.MCRectanglePackerPage = MapCoreSharedModule.MCRectanglePackerPage( + uvs = HashMap(uvs.map { it.key to it.value.asPlatform() }.toMap()), +) +internal fun MapCoreSharedModule.MCRectanglePackerPage.asKmp(): KMRectanglePackerPage = KMRectanglePackerPage( + uvs = HashMap(((this.uvs as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.uvs as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.uvs as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt new file mode 100644 index 000000000..03e3aafae --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -0,0 +1,28 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from layer_object.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderConfigInterface", exact = true) +actual class KMRenderConfigInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCRenderConfigInterface + + actual fun getGraphicsObject(): KMGraphicsObjectInterface { + val result = native.getGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } + + actual fun getRenderIndex(): Int { + val result = native.getRenderIndex() + return result + } +} + +internal fun KMRenderConfigInterface.asPlatform(): MapCoreSharedModule.MCRenderConfigInterface = nativeHandle as MapCoreSharedModule.MCRenderConfigInterface +internal fun MapCoreSharedModule.MCRenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt new file mode 100644 index 000000000..a4288dfac --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderLineDescription", exact = true) +actual class KMRenderLineDescription actual constructor( + positions: ArrayList, + styleIndex: Int, +) { + actual val positions: ArrayList = positions + actual val styleIndex: Int = styleIndex +} + +internal fun KMRenderLineDescription.asPlatform(): MapCoreSharedModule.MCRenderLineDescription = MapCoreSharedModule.MCRenderLineDescription( + positions = ArrayList(positions.map { it.asPlatform() }), + styleIndex = styleIndex, +) +internal fun MapCoreSharedModule.MCRenderLineDescription.asKmp(): KMRenderLineDescription = KMRenderLineDescription( + positions = ArrayList(((this.positions as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2D).asKmp() } ?: (0 until (this.positions as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.positions as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2D).asKmp() })), + styleIndex = this.styleIndex, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt new file mode 100644 index 000000000..989eae240 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -0,0 +1,98 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderObjectInterface", exact = true) +actual interface KMRenderObjectInterface +{ + + actual fun getGraphicsObject(): KMGraphicsObjectInterface + + actual fun hasCustomModelMatrix(): Boolean + + actual fun isScreenSpaceCoords(): Boolean + + actual fun getCustomModelMatrix(): ArrayList + + actual fun setHidden(hidden: Boolean) + + actual fun isHidden(): Boolean +} + +private class KMRenderObjectInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCRenderObjectInterfaceProtocol) : KMRenderObjectInterface +{ + + override fun getGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.getGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } + + override fun hasCustomModelMatrix(): Boolean { + val result = nativeHandle.hasCustomModelMatrix() + return result + } + + override fun isScreenSpaceCoords(): Boolean { + val result = nativeHandle.isScreenSpaceCoords() + return result + } + + override fun getCustomModelMatrix(): ArrayList { + val result = nativeHandle.getCustomModelMatrix() + return ArrayList(((result as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })) + } + + override fun setHidden(hidden: Boolean) { + nativeHandle.setHidden(hidden) + } + + override fun isHidden(): Boolean { + val result = nativeHandle.isHidden() + return result + } +} + +private class KMRenderObjectInterfacePlatformProxy(private val delegate: KMRenderObjectInterface) : NSObject(), MapCoreSharedModule.MCRenderObjectInterfaceProtocol +{ + + override fun getGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.getGraphicsObject() + return result.asPlatform() + } + + override fun hasCustomModelMatrix(): Boolean { + val result = delegate.hasCustomModelMatrix() + return result + } + + override fun isScreenSpaceCoords(): Boolean { + val result = delegate.isScreenSpaceCoords() + return result + } + + override fun getCustomModelMatrix(): List<*> { + val result = delegate.getCustomModelMatrix() + return ArrayList(result.map { platform.Foundation.NSNumber(float = it) }) + } + + override fun setHidden(hidden: Boolean) { + delegate.setHidden(hidden) + } + + override fun isHidden(): Boolean { + val result = delegate.isHidden() + return result + } +} + +internal fun KMRenderObjectInterface.asPlatform(): MapCoreSharedModule.MCRenderObjectInterfaceProtocol = when (this) { + is KMRenderObjectInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderObjectInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCRenderObjectInterfaceProtocol.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt new file mode 100644 index 000000000..1cb2379f4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderPassConfig", exact = true) +actual class KMRenderPassConfig actual constructor( + renderPassIndex: Int, + isPassMasked: Boolean, + renderTarget: KMRenderTargetInterface?, +) { + actual val renderPassIndex: Int = renderPassIndex + actual val isPassMasked: Boolean = isPassMasked + actual val renderTarget: KMRenderTargetInterface? = renderTarget +} + +internal fun KMRenderPassConfig.asPlatform(): MapCoreSharedModule.MCRenderPassConfig = MapCoreSharedModule.MCRenderPassConfig( + renderPassIndex = renderPassIndex, + isPassMasked = isPassMasked, + renderTarget = renderTarget?.let { it.asPlatform() }, +) +internal fun MapCoreSharedModule.MCRenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( + renderPassIndex = this.renderPassIndex, + isPassMasked = this.isPassMasked, + renderTarget = this.renderTarget?.let { requireNotNull((it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() }, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt new file mode 100644 index 000000000..e0a4ada7c --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -0,0 +1,86 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderPassInterface", exact = true) +actual interface KMRenderPassInterface +{ + + actual fun getRenderObjects(): ArrayList + + actual fun addRenderObject(renderObject: KMRenderObjectInterface) + + actual fun getRenderPassConfig(): KMRenderPassConfig + + actual fun getMaskingObject(): KMMaskingObjectInterface? + + actual fun getScissoringRect(): KMRectI? +} + +private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCRenderPassInterfaceProtocol) : KMRenderPassInterface +{ + + override fun getRenderObjects(): ArrayList { + val result = nativeHandle.getRenderObjects() + return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCRenderObjectInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderObjectInterfaceProtocol)).asKmp() })) + } + + override fun addRenderObject(renderObject: KMRenderObjectInterface) { + nativeHandle.addRenderObject(renderObject.asPlatform()) + } + + override fun getRenderPassConfig(): KMRenderPassConfig { + val result = nativeHandle.getRenderPassConfig() + return (result as MapCoreSharedModule.MCRenderPassConfig).asKmp() + } + + override fun getMaskingObject(): KMMaskingObjectInterface? { + val result = nativeHandle.getMaskingObject() + return result?.let { requireNotNull((it as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() } + } + + override fun getScissoringRect(): KMRectI? { + val result = nativeHandle.getScissoringRect() + return result?.let { (it as MapCoreSharedModule.MCRectI).asKmp() } + } +} + +private class KMRenderPassInterfacePlatformProxy(private val delegate: KMRenderPassInterface) : NSObject(), MapCoreSharedModule.MCRenderPassInterfaceProtocol +{ + + override fun getRenderObjects(): List<*> { + val result = delegate.getRenderObjects() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun addRenderObject(renderObject: MapCoreSharedModule.MCRenderObjectInterfaceProtocol?) { + delegate.addRenderObject(requireNotNull((renderObject as MapCoreSharedModule.MCRenderObjectInterfaceProtocol)).asKmp()) + } + + override fun getRenderPassConfig(): MapCoreSharedModule.MCRenderPassConfig { + val result = delegate.getRenderPassConfig() + return result.asPlatform() + } + + override fun getMaskingObject(): MapCoreSharedModule.MCMaskingObjectInterfaceProtocol? { + val result = delegate.getMaskingObject() + return result?.let { it.asPlatform() } + } + + override fun getScissoringRect(): MapCoreSharedModule.MCRectI? { + val result = delegate.getScissoringRect() + return result?.let { it.asPlatform() } + } +} + +internal fun KMRenderPassInterface.asPlatform(): MapCoreSharedModule.MCRenderPassInterfaceProtocol = when (this) { + is KMRenderPassInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderPassInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCRenderPassInterfaceProtocol.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt new file mode 100644 index 000000000..4eea9dc29 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderTargetInterface", exact = true) +actual interface KMRenderTargetInterface +{ + + actual fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? +} + +private class KMRenderTargetInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCRenderTargetInterfaceProtocol) : KMRenderTargetInterface +{ + + override fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? { + val result = nativeHandle.asGlRenderTargetInterface() + return result?.let { requireNotNull((it as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() } + } +} + +private class KMRenderTargetInterfacePlatformProxy(private val delegate: KMRenderTargetInterface) : NSObject(), MapCoreSharedModule.MCRenderTargetInterfaceProtocol +{ + + override fun asGlRenderTargetInterface(): MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol? { + val result = delegate.asGlRenderTargetInterface() + return result?.let { it.asPlatform() } + } +} + +internal fun KMRenderTargetInterface.asPlatform(): MapCoreSharedModule.MCRenderTargetInterfaceProtocol = when (this) { + is KMRenderTargetInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderTargetInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCRenderTargetInterfaceProtocol.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt new file mode 100644 index 000000000..2e8dc103e --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderVerticesDescription", exact = true) +actual class KMRenderVerticesDescription actual constructor( + vertices: ArrayList, + styleIndex: Int, +) { + actual val vertices: ArrayList = vertices + actual val styleIndex: Int = styleIndex +} + +internal fun KMRenderVerticesDescription.asPlatform(): MapCoreSharedModule.MCRenderVerticesDescription = MapCoreSharedModule.MCRenderVerticesDescription( + vertices = ArrayList(vertices.map { it.asPlatform() }), + styleIndex = styleIndex, +) +internal fun MapCoreSharedModule.MCRenderVerticesDescription.asKmp(): KMRenderVerticesDescription = KMRenderVerticesDescription( + vertices = ArrayList(((this.vertices as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2D).asKmp() } ?: (0 until (this.vertices as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.vertices as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2D).asKmp() })), + styleIndex = this.styleIndex, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt new file mode 100644 index 000000000..d4f559e37 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -0,0 +1,68 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRendererInterface", exact = true) +actual interface KMRendererInterface +{ + + actual fun addToRenderQueue(renderPass: KMRenderPassInterface) + + actual fun addToComputeQueue(computePass: KMComputePassInterface) + + actual fun drawFrame(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface, target: KMRenderTargetInterface?) + + actual fun compute(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface) +} + +private class KMRendererInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCRendererInterfaceProtocol) : KMRendererInterface +{ + + override fun addToRenderQueue(renderPass: KMRenderPassInterface) { + nativeHandle.addToRenderQueue(renderPass.asPlatform()) + } + + override fun addToComputeQueue(computePass: KMComputePassInterface) { + nativeHandle.addToComputeQueue(computePass.asPlatform()) + } + + override fun drawFrame(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface, target: KMRenderTargetInterface?) { + nativeHandle.drawFrame(renderingContext.asPlatform(), camera.asPlatform(), target?.let { it.asPlatform() }) + } + + override fun compute(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface) { + nativeHandle.compute(renderingContext.asPlatform(), camera.asPlatform()) + } +} + +private class KMRendererInterfacePlatformProxy(private val delegate: KMRendererInterface) : NSObject(), MapCoreSharedModule.MCRendererInterfaceProtocol +{ + + override fun addToRenderQueue(renderPass: MapCoreSharedModule.MCRenderPassInterfaceProtocol?) { + delegate.addToRenderQueue(requireNotNull((renderPass as MapCoreSharedModule.MCRenderPassInterfaceProtocol)).asKmp()) + } + + override fun addToComputeQueue(computePass: MapCoreSharedModule.MCComputePassInterfaceProtocol?) { + delegate.addToComputeQueue(requireNotNull((computePass as MapCoreSharedModule.MCComputePassInterfaceProtocol)).asKmp()) + } + + override fun drawFrame(renderingContext: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, camera: MapCoreSharedModule.MCCameraInterfaceProtocol?, target: MapCoreSharedModule.MCRenderTargetInterfaceProtocol?) { + delegate.drawFrame(requireNotNull((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((camera as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp(), target?.let { requireNotNull((it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() }) + } + + override fun compute(renderingContext: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, camera: MapCoreSharedModule.MCCameraInterfaceProtocol?) { + delegate.compute(requireNotNull((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((camera as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp()) + } +} + +internal fun KMRendererInterface.asPlatform(): MapCoreSharedModule.MCRendererInterfaceProtocol = when (this) { + is KMRendererInterfacePlatformWrapper -> this.nativeHandle + else -> KMRendererInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCRendererInterfaceProtocol.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt new file mode 100644 index 000000000..7179a6c9f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -0,0 +1,132 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderingContextInterface", exact = true) +actual interface KMRenderingContextInterface +{ + + actual fun onSurfaceCreated() + + actual fun setViewportSize(size: KMVec2I) + + actual fun getViewportSize(): KMVec2I + + actual fun setBackgroundColor(color: KMColor) + + actual fun setCulling(mode: KMRenderingCullMode) + + actual fun setupDrawFrame(vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) + + actual fun preRenderStencilMask() + + actual fun postRenderStencilMask() + + actual fun applyScissorRect(scissorRect: KMRectI?) + + actual fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? +} + +private class KMRenderingContextInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCRenderingContextInterfaceProtocol) : KMRenderingContextInterface +{ + + override fun onSurfaceCreated() { + nativeHandle.onSurfaceCreated() + } + + override fun setViewportSize(size: KMVec2I) { + nativeHandle.setViewportSize(size.asPlatform()) + } + + override fun getViewportSize(): KMVec2I { + val result = nativeHandle.getViewportSize() + return (result as MapCoreSharedModule.MCVec2I).asKmp() + } + + override fun setBackgroundColor(color: KMColor) { + nativeHandle.setBackgroundColor(color.asPlatform()) + } + + override fun setCulling(mode: KMRenderingCullMode) { + nativeHandle.setCulling(mode.asPlatform()) + } + + override fun setupDrawFrame(vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) { + nativeHandle.setupDrawFrame(vpMatrix, origin.asPlatform(), screenPixelAsRealMeterFactor) + } + + override fun preRenderStencilMask() { + nativeHandle.preRenderStencilMask() + } + + override fun postRenderStencilMask() { + nativeHandle.postRenderStencilMask() + } + + override fun applyScissorRect(scissorRect: KMRectI?) { + nativeHandle.applyScissorRect(scissorRect?.let { it.asPlatform() }) + } + + override fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? { + val result = nativeHandle.asOpenGlRenderingContext() + return result?.let { requireNotNull((it as MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol)).asKmp() } + } +} + +private class KMRenderingContextInterfacePlatformProxy(private val delegate: KMRenderingContextInterface) : NSObject(), MapCoreSharedModule.MCRenderingContextInterfaceProtocol +{ + + override fun onSurfaceCreated() { + delegate.onSurfaceCreated() + } + + override fun setViewportSize(size: MapCoreSharedModule.MCVec2I) { + delegate.setViewportSize((size as MapCoreSharedModule.MCVec2I).asKmp()) + } + + override fun getViewportSize(): MapCoreSharedModule.MCVec2I { + val result = delegate.getViewportSize() + return result.asPlatform() + } + + override fun setBackgroundColor(color: MapCoreSharedModule.MCColor) { + delegate.setBackgroundColor((color as MapCoreSharedModule.MCColor).asKmp()) + } + + override fun setCulling(mode: MapCoreSharedModule.MCRenderingCullMode) { + delegate.setCulling(KMRenderingCullMode.fromPlatform((mode as MapCoreSharedModule.MCRenderingCullMode))) + } + + override fun setupDrawFrame(vpMatrix: Long, origin: MapCoreSharedModule.MCVec3D, screenPixelAsRealMeterFactor: Double) { + delegate.setupDrawFrame(vpMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), screenPixelAsRealMeterFactor) + } + + override fun preRenderStencilMask() { + delegate.preRenderStencilMask() + } + + override fun postRenderStencilMask() { + delegate.postRenderStencilMask() + } + + override fun applyScissorRect(scissorRect: MapCoreSharedModule.MCRectI?) { + delegate.applyScissorRect(scissorRect?.let { (it as MapCoreSharedModule.MCRectI).asKmp() }) + } + + override fun asOpenGlRenderingContext(): MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol? { + val result = delegate.asOpenGlRenderingContext() + return result?.let { it.asPlatform() } + } +} + +internal fun KMRenderingContextInterface.asPlatform(): MapCoreSharedModule.MCRenderingContextInterfaceProtocol = when (this) { + is KMRenderingContextInterfacePlatformWrapper -> this.nativeHandle + else -> KMRenderingContextInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCRenderingContextInterfaceProtocol.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt new file mode 100644 index 000000000..397d352b7 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMRenderingCullMode", exact = true) +actual enum class KMRenderingCullMode(val rawValue: Long) { + FRONT(0L), + BACK(1L), + NONE(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCRenderingCullMode): KMRenderingCullMode { + val raw = value.toLong() + return when (raw) { + 0L -> KMRenderingCullMode.FRONT + 1L -> KMRenderingCullMode.BACK + 2L -> KMRenderingCullMode.NONE + else -> throw IllegalArgumentException("Unknown KMRenderingCullMode value: " + raw) + } + } + } +} + +internal fun KMRenderingCullMode.asPlatform(): MapCoreSharedModule.MCRenderingCullMode = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt new file mode 100644 index 000000000..e21761d36 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -0,0 +1,37 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from reverse_geocoder.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMReverseGeocoderInterface", exact = true) +actual class KMReverseGeocoderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCReverseGeocoderInterface + + actual fun reverseGeocode(coord: KMCoord, thresholdMeters: Long): ArrayList { + val result = native.reverseGeocode(coord.asPlatform(), thresholdMeters) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCVectorLayerFeatureCoordInfo).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVectorLayerFeatureCoordInfo).asKmp() })) + } + + actual fun reverseGeocodeClosest(coord: KMCoord, thresholdMeters: Long): KMVectorLayerFeatureCoordInfo? { + val result = native.reverseGeocodeClosest(coord.asPlatform(), thresholdMeters) + return result?.let { (it as MapCoreSharedModule.MCVectorLayerFeatureCoordInfo).asKmp() } + } + + actual companion object + { + + actual fun create(loader: KMLoaderInterface, tileUrlTemplate: String, zoomLevel: Int): KMReverseGeocoderInterface { + val result = MapCoreSharedModule.MCReverseGeocoderInterface.create(loader.asPlatform(), tileUrlTemplate, zoomLevel) + return requireNotNull((result as MapCoreSharedModule.MCReverseGeocoderInterface)).asKmp() + } + } +} + +internal fun KMReverseGeocoderInterface.asPlatform(): MapCoreSharedModule.MCReverseGeocoderInterface = nativeHandle as MapCoreSharedModule.MCReverseGeocoderInterface +internal fun MapCoreSharedModule.MCReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt new file mode 100644 index 000000000..4567ae287 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSceneCallbackInterface", exact = true) +actual interface KMSceneCallbackInterface +{ + + actual fun invalidate() +} + +private class KMSceneCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCSceneCallbackInterfaceProtocol) : KMSceneCallbackInterface +{ + + override fun invalidate() { + nativeHandle.invalidate() + } +} + +private class KMSceneCallbackInterfacePlatformProxy(private val delegate: KMSceneCallbackInterface) : NSObject(), MapCoreSharedModule.MCSceneCallbackInterfaceProtocol +{ + + override fun invalidate() { + delegate.invalidate() + } +} + +internal fun KMSceneCallbackInterface.asPlatform(): MapCoreSharedModule.MCSceneCallbackInterfaceProtocol = when (this) { + is KMSceneCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMSceneCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCSceneCallbackInterfaceProtocol.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt new file mode 100644 index 000000000..22dd39998 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -0,0 +1,85 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from core.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSceneInterface", exact = true) +actual class KMSceneInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCSceneInterface + + actual fun setCallbackHandler(callbackInterface: KMSceneCallbackInterface) { + native.setCallbackHandler(callbackInterface.asPlatform()) + } + + actual fun setCamera(camera: KMCameraInterface) { + native.setCamera(camera.asPlatform()) + } + + actual fun getCamera(): KMCameraInterface { + val result = native.getCamera() + return requireNotNull((result as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp() + } + + actual fun getRenderer(): KMRendererInterface { + val result = native.getRenderer() + return requireNotNull((result as MapCoreSharedModule.MCRendererInterfaceProtocol)).asKmp() + } + + actual fun getRenderingContext(): KMRenderingContextInterface { + val result = native.getRenderingContext() + return requireNotNull((result as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp() + } + + actual fun getGraphicsFactory(): KMGraphicsObjectFactoryInterface { + val result = native.getGraphicsFactory() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol)).asKmp() + } + + actual fun getShaderFactory(): KMShaderFactoryInterface { + val result = native.getShaderFactory() + return requireNotNull((result as MapCoreSharedModule.MCShaderFactoryInterfaceProtocol)).asKmp() + } + + actual fun prepare() { + native.prepare() + } + + actual fun drawFrame(target: KMRenderTargetInterface?) { + native.drawFrame(target?.let { it.asPlatform() }) + } + + actual fun compute() { + native.compute() + } + + actual fun clear() { + native.clear() + } + + actual fun invalidate() { + native.invalidate() + } + + actual companion object + { + + actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface): KMSceneInterface { + val result = MapCoreSharedModule.MCSceneInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCSceneInterface)).asKmp() + } + + actual fun createWithOpenGl(): KMSceneInterface { + val result = MapCoreSharedModule.MCSceneInterface.createWithOpenGl() + return requireNotNull((result as MapCoreSharedModule.MCSceneInterface)).asKmp() + } + } +} + +internal fun KMSceneInterface.asPlatform(): MapCoreSharedModule.MCSceneInterface = nativeHandle as MapCoreSharedModule.MCSceneInterface +internal fun MapCoreSharedModule.MCSceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt new file mode 100644 index 000000000..a2fd03996 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSchedulerGraphicsTaskCallbacks", exact = true) +actual class KMSchedulerGraphicsTaskCallbacks actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks + + actual fun requestGraphicsTaskExecution() { + native.requestGraphicsTaskExecution() + } +} + +internal fun KMSchedulerGraphicsTaskCallbacks.asPlatform(): MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks = nativeHandle as MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks +internal fun MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt new file mode 100644 index 000000000..f6c8e11ea --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -0,0 +1,132 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSchedulerInterface", exact = true) +actual interface KMSchedulerInterface +{ + + actual fun addTask(task: KMTaskInterface) + + actual fun addTasks(tasks: ArrayList) + + actual fun removeTask(id: String) + + actual fun clear() + + actual fun pause() + + actual fun resume() + + actual fun destroy() + + actual fun hasSeparateGraphicsInvocation(): Boolean + + actual fun runGraphicsTasks(): Boolean + + actual fun setSchedulerGraphicsTaskCallbacks(callbacks: KMSchedulerGraphicsTaskCallbacks) +} + +private class KMSchedulerInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCSchedulerInterfaceProtocol) : KMSchedulerInterface +{ + + override fun addTask(task: KMTaskInterface) { + nativeHandle.addTask(task.asPlatform()) + } + + override fun addTasks(tasks: ArrayList) { + nativeHandle.addTasks(ArrayList(tasks.map { it.asPlatform() })) + } + + override fun removeTask(id: String) { + nativeHandle.removeTask(id) + } + + override fun clear() { + nativeHandle.clear() + } + + override fun pause() { + nativeHandle.pause() + } + + override fun resume() { + nativeHandle.resume() + } + + override fun destroy() { + nativeHandle.destroy() + } + + override fun hasSeparateGraphicsInvocation(): Boolean { + val result = nativeHandle.hasSeparateGraphicsInvocation() + return result + } + + override fun runGraphicsTasks(): Boolean { + val result = nativeHandle.runGraphicsTasks() + return result + } + + override fun setSchedulerGraphicsTaskCallbacks(callbacks: KMSchedulerGraphicsTaskCallbacks) { + nativeHandle.setSchedulerGraphicsTaskCallbacks(callbacks.asPlatform()) + } +} + +private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedulerInterface) : NSObject(), MapCoreSharedModule.MCSchedulerInterfaceProtocol +{ + + override fun addTask(task: MapCoreSharedModule.MCTaskInterfaceProtocol?) { + delegate.addTask(requireNotNull((task as MapCoreSharedModule.MCTaskInterfaceProtocol)).asKmp()) + } + + override fun addTasks(tasks: List<*>) { + delegate.addTasks(ArrayList(((tasks as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCTaskInterfaceProtocol)).asKmp() } ?: (0 until (tasks as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((tasks as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCTaskInterfaceProtocol)).asKmp() }))) + } + + override fun removeTask(id: String) { + delegate.removeTask(id) + } + + override fun clear() { + delegate.clear() + } + + override fun pause() { + delegate.pause() + } + + override fun resume() { + delegate.resume() + } + + override fun destroy() { + delegate.destroy() + } + + override fun hasSeparateGraphicsInvocation(): Boolean { + val result = delegate.hasSeparateGraphicsInvocation() + return result + } + + override fun runGraphicsTasks(): Boolean { + val result = delegate.runGraphicsTasks() + return result + } + + override fun setSchedulerGraphicsTaskCallbacks(callbacks: MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks?) { + delegate.setSchedulerGraphicsTaskCallbacks(requireNotNull((callbacks as MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks)).asKmp()) + } +} + +internal fun KMSchedulerInterface.asPlatform(): MapCoreSharedModule.MCSchedulerInterfaceProtocol = when (this) { + is KMSchedulerInterfacePlatformWrapper -> this.nativeHandle + else -> KMSchedulerInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCSchedulerInterfaceProtocol.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt new file mode 100644 index 000000000..6d43810c7 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -0,0 +1,328 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMShaderFactoryInterface", exact = true) +actual interface KMShaderFactoryInterface +{ + + actual fun createAlphaShader(): KMAlphaShaderInterface + + actual fun createUnitSphereAlphaShader(): KMAlphaShaderInterface + + actual fun createAlphaInstancedShader(): KMAlphaInstancedShaderInterface + + actual fun createUnitSphereAlphaInstancedShader(): KMAlphaInstancedShaderInterface + + actual fun createLineGroupShader(): KMLineGroupShaderInterface + + actual fun createUnitSphereLineGroupShader(): KMLineGroupShaderInterface + + actual fun createSimpleLineGroupShader(): KMLineGroupShaderInterface + + actual fun createUnitSphereSimpleLineGroupShader(): KMLineGroupShaderInterface + + actual fun createUnitSphereColorShader(): KMColorShaderInterface + + actual fun createColorShader(): KMColorShaderInterface + + actual fun createColorCircleShader(): KMColorCircleShaderInterface + + actual fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface + + actual fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): KMPolygonGroupShaderInterface + + actual fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): KMPolygonPatternGroupShaderInterface + + actual fun createTextShader(): KMTextShaderInterface + + actual fun createTextInstancedShader(): KMTextInstancedShaderInterface + + actual fun createUnitSphereTextInstancedShader(): KMTextInstancedShaderInterface + + actual fun createRasterShader(): KMRasterShaderInterface + + actual fun createUnitSphereRasterShader(): KMRasterShaderInterface + + actual fun createStretchShader(): KMStretchShaderInterface + + actual fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface + + actual fun createIcosahedronColorShader(): KMColorShaderInterface + + actual fun createSphereEffectShader(): KMSphereEffectShaderInterface + + actual fun createSkySphereShader(): KMSkySphereShaderInterface + + actual fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface +} + +private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCShaderFactoryInterfaceProtocol) : KMShaderFactoryInterface +{ + + override fun createAlphaShader(): KMAlphaShaderInterface { + val result = nativeHandle.createAlphaShader() + return requireNotNull((result as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereAlphaShader(): KMAlphaShaderInterface { + val result = nativeHandle.createUnitSphereAlphaShader() + return requireNotNull((result as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol)).asKmp() + } + + override fun createAlphaInstancedShader(): KMAlphaInstancedShaderInterface { + val result = nativeHandle.createAlphaInstancedShader() + return requireNotNull((result as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereAlphaInstancedShader(): KMAlphaInstancedShaderInterface { + val result = nativeHandle.createUnitSphereAlphaInstancedShader() + return requireNotNull((result as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol)).asKmp() + } + + override fun createLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createLineGroupShader() + return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createUnitSphereLineGroupShader() + return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + } + + override fun createSimpleLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createSimpleLineGroupShader() + return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereSimpleLineGroupShader(): KMLineGroupShaderInterface { + val result = nativeHandle.createUnitSphereSimpleLineGroupShader() + return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereColorShader(): KMColorShaderInterface { + val result = nativeHandle.createUnitSphereColorShader() + return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + } + + override fun createColorShader(): KMColorShaderInterface { + val result = nativeHandle.createColorShader() + return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + } + + override fun createColorCircleShader(): KMColorCircleShaderInterface { + val result = nativeHandle.createColorCircleShader() + return requireNotNull((result as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface { + val result = nativeHandle.createUnitSphereColorCircleShader() + return requireNotNull((result as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol)).asKmp() + } + + override fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): KMPolygonGroupShaderInterface { + val result = nativeHandle.createPolygonGroupShader(isStriped, unitSphere) + return requireNotNull((result as MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol)).asKmp() + } + + override fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): KMPolygonPatternGroupShaderInterface { + val result = nativeHandle.createPolygonPatternGroupShader(fadeInPattern, unitSphere) + return requireNotNull((result as MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol)).asKmp() + } + + override fun createTextShader(): KMTextShaderInterface { + val result = nativeHandle.createTextShader() + return requireNotNull((result as MapCoreSharedModule.MCTextShaderInterfaceProtocol)).asKmp() + } + + override fun createTextInstancedShader(): KMTextInstancedShaderInterface { + val result = nativeHandle.createTextInstancedShader() + return requireNotNull((result as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereTextInstancedShader(): KMTextInstancedShaderInterface { + val result = nativeHandle.createUnitSphereTextInstancedShader() + return requireNotNull((result as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol)).asKmp() + } + + override fun createRasterShader(): KMRasterShaderInterface { + val result = nativeHandle.createRasterShader() + return requireNotNull((result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol)).asKmp() + } + + override fun createUnitSphereRasterShader(): KMRasterShaderInterface { + val result = nativeHandle.createUnitSphereRasterShader() + return requireNotNull((result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol)).asKmp() + } + + override fun createStretchShader(): KMStretchShaderInterface { + val result = nativeHandle.createStretchShader() + return requireNotNull((result as MapCoreSharedModule.MCStretchShaderInterfaceProtocol)).asKmp() + } + + override fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface { + val result = nativeHandle.createStretchInstancedShader(unitSphere) + return requireNotNull((result as MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol)).asKmp() + } + + override fun createIcosahedronColorShader(): KMColorShaderInterface { + val result = nativeHandle.createIcosahedronColorShader() + return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + } + + override fun createSphereEffectShader(): KMSphereEffectShaderInterface { + val result = nativeHandle.createSphereEffectShader() + return requireNotNull((result as MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol)).asKmp() + } + + override fun createSkySphereShader(): KMSkySphereShaderInterface { + val result = nativeHandle.createSkySphereShader() + return requireNotNull((result as MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol)).asKmp() + } + + override fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface { + val result = nativeHandle.createElevationInterpolationShader() + return requireNotNull((result as MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol)).asKmp() + } +} + +private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShaderFactoryInterface) : NSObject(), MapCoreSharedModule.MCShaderFactoryInterfaceProtocol +{ + + override fun createAlphaShader(): MapCoreSharedModule.MCAlphaShaderInterfaceProtocol? { + val result = delegate.createAlphaShader() + return result.asPlatform() + } + + override fun createUnitSphereAlphaShader(): MapCoreSharedModule.MCAlphaShaderInterfaceProtocol? { + val result = delegate.createUnitSphereAlphaShader() + return result.asPlatform() + } + + override fun createAlphaInstancedShader(): MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol? { + val result = delegate.createAlphaInstancedShader() + return result.asPlatform() + } + + override fun createUnitSphereAlphaInstancedShader(): MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol? { + val result = delegate.createUnitSphereAlphaInstancedShader() + return result.asPlatform() + } + + override fun createLineGroupShader(): MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol? { + val result = delegate.createLineGroupShader() + return result.asPlatform() + } + + override fun createUnitSphereLineGroupShader(): MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol? { + val result = delegate.createUnitSphereLineGroupShader() + return result.asPlatform() + } + + override fun createSimpleLineGroupShader(): MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol? { + val result = delegate.createSimpleLineGroupShader() + return result.asPlatform() + } + + override fun createUnitSphereSimpleLineGroupShader(): MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol? { + val result = delegate.createUnitSphereSimpleLineGroupShader() + return result.asPlatform() + } + + override fun createUnitSphereColorShader(): MapCoreSharedModule.MCColorShaderInterfaceProtocol? { + val result = delegate.createUnitSphereColorShader() + return result.asPlatform() + } + + override fun createColorShader(): MapCoreSharedModule.MCColorShaderInterfaceProtocol? { + val result = delegate.createColorShader() + return result.asPlatform() + } + + override fun createColorCircleShader(): MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol? { + val result = delegate.createColorCircleShader() + return result.asPlatform() + } + + override fun createUnitSphereColorCircleShader(): MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol? { + val result = delegate.createUnitSphereColorCircleShader() + return result.asPlatform() + } + + override fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol? { + val result = delegate.createPolygonGroupShader(isStriped, unitSphere) + return result.asPlatform() + } + + override fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol? { + val result = delegate.createPolygonPatternGroupShader(fadeInPattern, unitSphere) + return result.asPlatform() + } + + override fun createTextShader(): MapCoreSharedModule.MCTextShaderInterfaceProtocol? { + val result = delegate.createTextShader() + return result.asPlatform() + } + + override fun createTextInstancedShader(): MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol? { + val result = delegate.createTextInstancedShader() + return result.asPlatform() + } + + override fun createUnitSphereTextInstancedShader(): MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol? { + val result = delegate.createUnitSphereTextInstancedShader() + return result.asPlatform() + } + + override fun createRasterShader(): MapCoreSharedModule.MCRasterShaderInterfaceProtocol? { + val result = delegate.createRasterShader() + return result.asPlatform() + } + + override fun createUnitSphereRasterShader(): MapCoreSharedModule.MCRasterShaderInterfaceProtocol? { + val result = delegate.createUnitSphereRasterShader() + return result.asPlatform() + } + + override fun createStretchShader(): MapCoreSharedModule.MCStretchShaderInterfaceProtocol? { + val result = delegate.createStretchShader() + return result.asPlatform() + } + + override fun createStretchInstancedShader(unitSphere: Boolean): MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol? { + val result = delegate.createStretchInstancedShader(unitSphere) + return result.asPlatform() + } + + override fun createIcosahedronColorShader(): MapCoreSharedModule.MCColorShaderInterfaceProtocol? { + val result = delegate.createIcosahedronColorShader() + return result.asPlatform() + } + + override fun createSphereEffectShader(): MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol? { + val result = delegate.createSphereEffectShader() + return result.asPlatform() + } + + override fun createSkySphereShader(): MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol? { + val result = delegate.createSkySphereShader() + return result.asPlatform() + } + + override fun createElevationInterpolationShader(): MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol? { + val result = delegate.createElevationInterpolationShader() + return result.asPlatform() + } +} + +internal fun KMShaderFactoryInterface.asPlatform(): MapCoreSharedModule.MCShaderFactoryInterfaceProtocol = when (this) { + is KMShaderFactoryInterfacePlatformWrapper -> this.nativeHandle + else -> KMShaderFactoryInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCShaderFactoryInterfaceProtocol.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt new file mode 100644 index 000000000..8b960271f --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMShaderProgramInterface", exact = true) +actual class KMShaderProgramInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCShaderProgramInterfaceProtocol + + actual fun getProgramName(): String { + val result = native.getProgramName() + return result + } + + actual fun setupProgram(context: KMRenderingContextInterface) { + native.setupProgram(context.asPlatform()) + } + + actual fun preRender(context: KMRenderingContextInterface, isScreenSpaceCoords: Boolean) { + native.preRender(context.asPlatform(), isScreenSpaceCoords) + } + + actual fun setBlendMode(blendMode: KMBlendMode) { + native.setBlendMode(blendMode.asPlatform()) + } + + actual fun usesModelMatrix(): Boolean { + val result = native.usesModelMatrix() + return result + } +} + +internal fun KMShaderProgramInterface.asPlatform(): MapCoreSharedModule.MCShaderProgramInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCShaderProgramInterfaceProtocol +internal fun MapCoreSharedModule.MCShaderProgramInterfaceProtocol.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt new file mode 100644 index 000000000..585e841ad --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSharedBytes", exact = true) +actual class KMSharedBytes actual constructor( + address: Long, + elementCount: Int, + bytesPerElement: Int, +) { + actual val address: Long = address + actual val elementCount: Int = elementCount + actual val bytesPerElement: Int = bytesPerElement +} + +internal fun KMSharedBytes.asPlatform(): MapCoreSharedModule.MCSharedBytes = MapCoreSharedModule.MCSharedBytes( + address = address, + elementCount = elementCount, + bytesPerElement = bytesPerElement, +) +internal fun MapCoreSharedModule.MCSharedBytes.asKmp(): KMSharedBytes = KMSharedBytes( + address = this.address, + elementCount = this.elementCount, + bytesPerElement = this.bytesPerElement, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt new file mode 100644 index 000000000..83a0347c8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt @@ -0,0 +1,28 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from styling.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSizeType", exact = true) +actual enum class KMSizeType(val rawValue: Long) { + SCREEN_PIXEL(0L), + MAP_UNIT(1L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCSizeType): KMSizeType { + val raw = value.toLong() + return when (raw) { + 0L -> KMSizeType.SCREEN_PIXEL + 1L -> KMSizeType.MAP_UNIT + else -> throw IllegalArgumentException("Unknown KMSizeType value: " + raw) + } + } + } +} + +internal fun KMSizeType.asPlatform(): MapCoreSharedModule.MCSizeType = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt new file mode 100644 index 000000000..aea88d6ea --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -0,0 +1,36 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from sky_sphere.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSkySphereLayerInterface", exact = true) +actual class KMSkySphereLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCSkySphereLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual fun setTexture(texture: KMTextureHolderInterface) { + native.setTexture(texture.asPlatform()) + } + + actual companion object + { + + actual fun create(): KMSkySphereLayerInterface { + val result = MapCoreSharedModule.MCSkySphereLayerInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCSkySphereLayerInterface)).asKmp() + } + } +} + +internal fun KMSkySphereLayerInterface.asPlatform(): MapCoreSharedModule.MCSkySphereLayerInterface = nativeHandle as MapCoreSharedModule.MCSkySphereLayerInterface +internal fun MapCoreSharedModule.MCSkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt new file mode 100644 index 000000000..6e8615ab0 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSkySphereShaderInterface", exact = true) +actual class KMSkySphereShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } + + actual fun setCameraProperties(inverseVP: ArrayList, cameraPosition: KMVec3D) { + native.setCameraProperties(ArrayList(inverseVP.map { platform.Foundation.NSNumber(float = it) }), cameraPosition.asPlatform()) + } +} + +internal fun KMSkySphereShaderInterface.asPlatform(): MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt new file mode 100644 index 000000000..203f63df0 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from sphere_effect.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSphereEffectLayerInterface", exact = true) +actual class KMSphereEffectLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCSphereEffectLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual companion object + { + + actual fun create(): KMSphereEffectLayerInterface { + val result = MapCoreSharedModule.MCSphereEffectLayerInterface.create() + return requireNotNull((result as MapCoreSharedModule.MCSphereEffectLayerInterface)).asKmp() + } + } +} + +internal fun KMSphereEffectLayerInterface.asPlatform(): MapCoreSharedModule.MCSphereEffectLayerInterface = nativeHandle as MapCoreSharedModule.MCSphereEffectLayerInterface +internal fun MapCoreSharedModule.MCSphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt new file mode 100644 index 000000000..418c2a9f8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSphereEffectShaderInterface", exact = true) +actual class KMSphereEffectShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } + + actual fun setEllipse(coefficients: KMSharedBytes) { + native.setEllipse(coefficients.asPlatform()) + } +} + +internal fun KMSphereEffectShaderInterface.asPlatform(): MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt new file mode 100644 index 000000000..bdca4bd3d --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMStretchInstancedShaderInterface", exact = true) +actual class KMStretchInstancedShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMStretchInstancedShaderInterface.asPlatform(): MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt new file mode 100644 index 000000000..bdfb0d739 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt @@ -0,0 +1,62 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMStretchShaderInfo", exact = true) +actual class KMStretchShaderInfo actual constructor( + scaleX: Float, + stretchX0Begin: Float, + stretchX0End: Float, + stretchX1Begin: Float, + stretchX1End: Float, + scaleY: Float, + stretchY0Begin: Float, + stretchY0End: Float, + stretchY1Begin: Float, + stretchY1End: Float, + uv: KMRectD, +) { + actual val scaleX: Float = scaleX + actual val stretchX0Begin: Float = stretchX0Begin + actual val stretchX0End: Float = stretchX0End + actual val stretchX1Begin: Float = stretchX1Begin + actual val stretchX1End: Float = stretchX1End + actual val scaleY: Float = scaleY + actual val stretchY0Begin: Float = stretchY0Begin + actual val stretchY0End: Float = stretchY0End + actual val stretchY1Begin: Float = stretchY1Begin + actual val stretchY1End: Float = stretchY1End + actual val uv: KMRectD = uv +} + +internal fun KMStretchShaderInfo.asPlatform(): MapCoreSharedModule.MCStretchShaderInfo = MapCoreSharedModule.MCStretchShaderInfo( + scaleX = scaleX, + stretchX0Begin = stretchX0Begin, + stretchX0End = stretchX0End, + stretchX1Begin = stretchX1Begin, + stretchX1End = stretchX1End, + scaleY = scaleY, + stretchY0Begin = stretchY0Begin, + stretchY0End = stretchY0End, + stretchY1Begin = stretchY1Begin, + stretchY1End = stretchY1End, + uv = uv.asPlatform(), +) +internal fun MapCoreSharedModule.MCStretchShaderInfo.asKmp(): KMStretchShaderInfo = KMStretchShaderInfo( + scaleX = this.scaleX, + stretchX0Begin = this.stretchX0Begin, + stretchX0End = this.stretchX0End, + stretchX1Begin = this.stretchX1Begin, + stretchX1End = this.stretchX1End, + scaleY = this.scaleY, + stretchY0Begin = this.stretchY0Begin, + stretchY0End = this.stretchY0End, + stretchY1Begin = this.stretchY1Begin, + stretchY1End = this.stretchY1End, + uv = (this.uv as MapCoreSharedModule.MCRectD).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt new file mode 100644 index 000000000..59d27309a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -0,0 +1,31 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMStretchShaderInterface", exact = true) +actual class KMStretchShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCStretchShaderInterfaceProtocol + + actual fun updateAlpha(value: Float) { + native.updateAlpha(value) + } + + actual fun updateStretchInfo(info: KMStretchShaderInfo) { + native.updateStretchInfo(info.asPlatform()) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMStretchShaderInterface.asPlatform(): MapCoreSharedModule.MCStretchShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCStretchShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCStretchShaderInterfaceProtocol.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt new file mode 100644 index 000000000..ad9c3d873 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSymbolAlignment", exact = true) +actual enum class KMSymbolAlignment(val rawValue: Long) { + MAP(0L), + VIEWPORT(1L), + AUTO(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCSymbolAlignment): KMSymbolAlignment { + val raw = value.toLong() + return when (raw) { + 0L -> KMSymbolAlignment.MAP + 1L -> KMSymbolAlignment.VIEWPORT + 2L -> KMSymbolAlignment.AUTO + else -> throw IllegalArgumentException("Unknown KMSymbolAlignment value: " + raw) + } + } + } +} + +internal fun KMSymbolAlignment.asPlatform(): MapCoreSharedModule.MCSymbolAlignment = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt new file mode 100644 index 000000000..db50c98bb --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMSymbolZOrder", exact = true) +actual enum class KMSymbolZOrder(val rawValue: Long) { + AUTO(0L), + VIEWPORT_Y(1L), + SOURCE(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCSymbolZOrder): KMSymbolZOrder { + val raw = value.toLong() + return when (raw) { + 0L -> KMSymbolZOrder.AUTO + 1L -> KMSymbolZOrder.VIEWPORT_Y + 2L -> KMSymbolZOrder.SOURCE + else -> throw IllegalArgumentException("Unknown KMSymbolZOrder value: " + raw) + } + } + } +} + +internal fun KMSymbolZOrder.asPlatform(): MapCoreSharedModule.MCSymbolZOrder = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt new file mode 100644 index 000000000..bb4b2df6b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTaskConfig", exact = true) +actual class KMTaskConfig actual constructor( + id: String, + delay: Long, + priority: KMTaskPriority, + executionEnvironment: KMExecutionEnvironment, +) { + actual val id: String = id + actual val delay: Long = delay + actual val priority: KMTaskPriority = priority + actual val executionEnvironment: KMExecutionEnvironment = executionEnvironment +} + +internal fun KMTaskConfig.asPlatform(): MapCoreSharedModule.MCTaskConfig = MapCoreSharedModule.MCTaskConfig( + id = id, + delay = delay, + priority = priority.asPlatform(), + executionEnvironment = executionEnvironment.asPlatform(), +) +internal fun MapCoreSharedModule.MCTaskConfig.asKmp(): KMTaskConfig = KMTaskConfig( + id = this.id, + delay = this.delay, + priority = KMTaskPriority.fromPlatform((this.priority as MapCoreSharedModule.MCTaskPriority)), + executionEnvironment = KMExecutionEnvironment.fromPlatform((this.executionEnvironment as MapCoreSharedModule.MCExecutionEnvironment)), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt new file mode 100644 index 000000000..059202ee2 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTaskInterface", exact = true) +actual interface KMTaskInterface +{ + + actual fun getConfig(): KMTaskConfig + + actual fun run() +} + +private class KMTaskInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTaskInterfaceProtocol) : KMTaskInterface +{ + + override fun getConfig(): KMTaskConfig { + val result = nativeHandle.getConfig() + return (result as MapCoreSharedModule.MCTaskConfig).asKmp() + } + + override fun run() { + nativeHandle.run() + } +} + +private class KMTaskInterfacePlatformProxy(private val delegate: KMTaskInterface) : NSObject(), MapCoreSharedModule.MCTaskInterfaceProtocol +{ + + override fun getConfig(): MapCoreSharedModule.MCTaskConfig { + val result = delegate.getConfig() + return result.asPlatform() + } + + override fun run() { + delegate.run() + } +} + +internal fun KMTaskInterface.asPlatform(): MapCoreSharedModule.MCTaskInterfaceProtocol = when (this) { + is KMTaskInterfacePlatformWrapper -> this.nativeHandle + else -> KMTaskInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTaskInterfaceProtocol.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt new file mode 100644 index 000000000..9907db302 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTaskPriority", exact = true) +actual enum class KMTaskPriority(val rawValue: Long) { + HIGH(0L), + NORMAL(1L), + LOW(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCTaskPriority): KMTaskPriority { + val raw = value.toLong() + return when (raw) { + 0L -> KMTaskPriority.HIGH + 1L -> KMTaskPriority.NORMAL + 2L -> KMTaskPriority.LOW + else -> throw IllegalArgumentException("Unknown KMTaskPriority value: " + raw) + } + } + } +} + +internal fun KMTaskPriority.asPlatform(): MapCoreSharedModule.MCTaskPriority = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt new file mode 100644 index 000000000..45305aa9b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextDescription", exact = true) +actual class KMTextDescription actual constructor( + glyphs: ArrayList, +) { + actual val glyphs: ArrayList = glyphs +} + +internal fun KMTextDescription.asPlatform(): MapCoreSharedModule.MCTextDescription = MapCoreSharedModule.MCTextDescription( + glyphs = ArrayList(glyphs.map { it.asPlatform() }), +) +internal fun MapCoreSharedModule.MCTextDescription.asKmp(): KMTextDescription = KMTextDescription( + glyphs = ArrayList(((this.glyphs as? List<*>)?.map { (it as MapCoreSharedModule.MCGlyphDescription).asKmp() } ?: (0 until (this.glyphs as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.glyphs as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCGlyphDescription).asKmp() })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt new file mode 100644 index 000000000..15d872866 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextFactory", exact = true) +actual class KMTextFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCTextFactory + + actual companion object + { + + actual fun createText(text: ArrayList, coordinate: KMCoord, font: KMFont, textAnchor: KMAnchor, textJustify: KMTextJustify): KMTextInfoInterface { + val result = MapCoreSharedModule.MCTextFactory.createText(ArrayList(text.map { it.asPlatform() }), coordinate.asPlatform(), font.asPlatform(), textAnchor.asPlatform(), textJustify.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCTextInfoInterfaceProtocol)).asKmp() + } + } +} + +internal fun KMTextFactory.asPlatform(): MapCoreSharedModule.MCTextFactory = nativeHandle as MapCoreSharedModule.MCTextFactory +internal fun MapCoreSharedModule.MCTextFactory.asKmp(): KMTextFactory = KMTextFactory(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt new file mode 100644 index 000000000..7f3c3bdcc --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt @@ -0,0 +1,112 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextInfoInterface", exact = true) +actual interface KMTextInfoInterface +{ + + actual fun getText(): ArrayList + + actual fun getCoordinate(): KMCoord + + actual fun getFont(): KMFont + + actual fun getTextAnchor(): KMAnchor + + actual fun getTextJustify(): KMTextJustify + + actual fun getSymbolPlacement(): KMTextSymbolPlacement + + actual fun getLineCoordinates(): ArrayList? +} + +private class KMTextInfoInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTextInfoInterfaceProtocol) : KMTextInfoInterface +{ + + override fun getText(): ArrayList { + val result = nativeHandle.getText() + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCFormattedStringEntry).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCFormattedStringEntry).asKmp() })) + } + + override fun getCoordinate(): KMCoord { + val result = nativeHandle.getCoordinate() + return (result as MapCoreSharedModule.MCCoord).asKmp() + } + + override fun getFont(): KMFont { + val result = nativeHandle.getFont() + return (result as MapCoreSharedModule.MCFont).asKmp() + } + + override fun getTextAnchor(): KMAnchor { + val result = nativeHandle.getTextAnchor() + return KMAnchor.fromPlatform((result as MapCoreSharedModule.MCAnchor)) + } + + override fun getTextJustify(): KMTextJustify { + val result = nativeHandle.getTextJustify() + return KMTextJustify.fromPlatform((result as MapCoreSharedModule.MCTextJustify)) + } + + override fun getSymbolPlacement(): KMTextSymbolPlacement { + val result = nativeHandle.getSymbolPlacement() + return KMTextSymbolPlacement.fromPlatform((result as MapCoreSharedModule.MCTextSymbolPlacement)) + } + + override fun getLineCoordinates(): ArrayList? { + val result = nativeHandle.getLineCoordinates() + return result?.let { ArrayList(((it as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })) } + } +} + +private class KMTextInfoInterfacePlatformProxy(private val delegate: KMTextInfoInterface) : NSObject(), MapCoreSharedModule.MCTextInfoInterfaceProtocol +{ + + override fun getText(): List<*> { + val result = delegate.getText() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getCoordinate(): MapCoreSharedModule.MCCoord { + val result = delegate.getCoordinate() + return result.asPlatform() + } + + override fun getFont(): MapCoreSharedModule.MCFont { + val result = delegate.getFont() + return result.asPlatform() + } + + override fun getTextAnchor(): MapCoreSharedModule.MCAnchor { + val result = delegate.getTextAnchor() + return result.asPlatform() + } + + override fun getTextJustify(): MapCoreSharedModule.MCTextJustify { + val result = delegate.getTextJustify() + return result.asPlatform() + } + + override fun getSymbolPlacement(): MapCoreSharedModule.MCTextSymbolPlacement { + val result = delegate.getSymbolPlacement() + return result.asPlatform() + } + + override fun getLineCoordinates(): List<*>? { + val result = delegate.getLineCoordinates() + return result?.let { ArrayList(it.map { it.asPlatform() }) } + } +} + +internal fun KMTextInfoInterface.asPlatform(): MapCoreSharedModule.MCTextInfoInterfaceProtocol = when (this) { + is KMTextInfoInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextInfoInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTextInfoInterfaceProtocol.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt new file mode 100644 index 000000000..c52529988 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -0,0 +1,160 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextInstancedInterface", exact = true) +actual interface KMTextInstancedInterface +{ + + actual fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) + + actual fun setInstanceCount(count: Int) + + actual fun setPositions(positions: KMSharedBytes) + + actual fun setReferencePositions(positions: KMSharedBytes) + + actual fun setTextureCoordinates(textureCoordinates: KMSharedBytes) + + actual fun setScales(scales: KMSharedBytes) + + actual fun setRotations(rotations: KMSharedBytes) + + actual fun setAlphas(alphas: KMSharedBytes) + + actual fun setStyleIndices(indices: KMSharedBytes) + + actual fun setStyles(values: KMSharedBytes) + + actual fun loadFont(context: KMRenderingContextInterface, fontData: KMFontData, fontMsdfTexture: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMTextInstancedInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTextInstancedInterfaceProtocol) : KMTextInstancedInterface +{ + + override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setFrame(frame.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setInstanceCount(count: Int) { + nativeHandle.setInstanceCount(count) + } + + override fun setPositions(positions: KMSharedBytes) { + nativeHandle.setPositions(positions.asPlatform()) + } + + override fun setReferencePositions(positions: KMSharedBytes) { + nativeHandle.setReferencePositions(positions.asPlatform()) + } + + override fun setTextureCoordinates(textureCoordinates: KMSharedBytes) { + nativeHandle.setTextureCoordinates(textureCoordinates.asPlatform()) + } + + override fun setScales(scales: KMSharedBytes) { + nativeHandle.setScales(scales.asPlatform()) + } + + override fun setRotations(rotations: KMSharedBytes) { + nativeHandle.setRotations(rotations.asPlatform()) + } + + override fun setAlphas(alphas: KMSharedBytes) { + nativeHandle.setAlphas(alphas.asPlatform()) + } + + override fun setStyleIndices(indices: KMSharedBytes) { + nativeHandle.setStyleIndices(indices.asPlatform()) + } + + override fun setStyles(values: KMSharedBytes) { + nativeHandle.setStyles(values.asPlatform()) + } + + override fun loadFont(context: KMRenderingContextInterface, fontData: KMFontData, fontMsdfTexture: KMTextureHolderInterface) { + nativeHandle.loadFont(context.asPlatform(), fontData.asPlatform(), fontMsdfTexture.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } +} + +private class KMTextInstancedInterfacePlatformProxy(private val delegate: KMTextInstancedInterface) : NSObject(), MapCoreSharedModule.MCTextInstancedInterfaceProtocol +{ + + override fun setFrame(frame: MapCoreSharedModule.MCQuad2dD, origin: MapCoreSharedModule.MCVec3D, is3d: Boolean) { + delegate.setFrame((frame as MapCoreSharedModule.MCQuad2dD).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp(), is3d) + } + + override fun setInstanceCount(count: Int) { + delegate.setInstanceCount(count) + } + + override fun setPositions(positions: MapCoreSharedModule.MCSharedBytes) { + delegate.setPositions((positions as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setReferencePositions(positions: MapCoreSharedModule.MCSharedBytes) { + delegate.setReferencePositions((positions as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setTextureCoordinates(textureCoordinates: MapCoreSharedModule.MCSharedBytes) { + delegate.setTextureCoordinates((textureCoordinates as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setScales(scales: MapCoreSharedModule.MCSharedBytes) { + delegate.setScales((scales as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setRotations(rotations: MapCoreSharedModule.MCSharedBytes) { + delegate.setRotations((rotations as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setAlphas(alphas: MapCoreSharedModule.MCSharedBytes) { + delegate.setAlphas((alphas as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setStyleIndices(indices: MapCoreSharedModule.MCSharedBytes) { + delegate.setStyleIndices((indices as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun setStyles(values: MapCoreSharedModule.MCSharedBytes) { + delegate.setStyles((values as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun loadFont(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, fontData: MapCoreSharedModule.MCFontData, fontMsdfTexture: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { + delegate.loadFont(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), (fontData as MapCoreSharedModule.MCFontData).asKmp(), requireNotNull((fontMsdfTexture as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMTextInstancedInterface.asPlatform(): MapCoreSharedModule.MCTextInstancedInterfaceProtocol = when (this) { + is KMTextInstancedInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextInstancedInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTextInstancedInterfaceProtocol.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt new file mode 100644 index 000000000..b9a885275 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -0,0 +1,23 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextInstancedShaderInterface", exact = true) +actual class KMTextInstancedShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMTextInstancedShaderInterface.asPlatform(): MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt new file mode 100644 index 000000000..f548afd94 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -0,0 +1,70 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextInterface", exact = true) +actual interface KMTextInterface +{ + + actual fun setTextsShared(vertices: KMSharedBytes, indices: KMSharedBytes) + + actual fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) + + actual fun removeTexture() + + actual fun asGraphicsObject(): KMGraphicsObjectInterface +} + +private class KMTextInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTextInterfaceProtocol) : KMTextInterface +{ + + override fun setTextsShared(vertices: KMSharedBytes, indices: KMSharedBytes) { + nativeHandle.setTextsShared(vertices.asPlatform(), indices.asPlatform()) + } + + override fun loadTexture(context: KMRenderingContextInterface, textureHolder: KMTextureHolderInterface) { + nativeHandle.loadTexture(context.asPlatform(), textureHolder.asPlatform()) + } + + override fun removeTexture() { + nativeHandle.removeTexture() + } + + override fun asGraphicsObject(): KMGraphicsObjectInterface { + val result = nativeHandle.asGraphicsObject() + return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + } +} + +private class KMTextInterfacePlatformProxy(private val delegate: KMTextInterface) : NSObject(), MapCoreSharedModule.MCTextInterfaceProtocol +{ + + override fun setTextsShared(vertices: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes) { + delegate.setTextsShared((vertices as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp()) + } + + override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { + delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + } + + override fun removeTexture() { + delegate.removeTexture() + } + + override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { + val result = delegate.asGraphicsObject() + return result.asPlatform() + } +} + +internal fun KMTextInterface.asPlatform(): MapCoreSharedModule.MCTextInterfaceProtocol = when (this) { + is KMTextInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTextInterfaceProtocol.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt new file mode 100644 index 000000000..798317be0 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextJustify", exact = true) +actual enum class KMTextJustify(val rawValue: Long) { + AUTO(0L), + LEFT(1L), + CENTER(2L), + RIGHT(3L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCTextJustify): KMTextJustify { + val raw = value.toLong() + return when (raw) { + 0L -> KMTextJustify.AUTO + 1L -> KMTextJustify.LEFT + 2L -> KMTextJustify.CENTER + 3L -> KMTextJustify.RIGHT + else -> throw IllegalArgumentException("Unknown KMTextJustify value: " + raw) + } + } + } +} + +internal fun KMTextJustify.asPlatform(): MapCoreSharedModule.MCTextJustify = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt new file mode 100644 index 000000000..0687a028d --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextLayerInterface", exact = true) +actual class KMTextLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCTextLayerInterface + + actual fun setTexts(texts: ArrayList) { + native.setTexts(ArrayList(texts.map { it.asPlatform() })) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual fun invalidate() { + native.invalidate() + } + + actual companion object + { + + actual fun create(fontLoader: KMFontLoaderInterface): KMTextLayerInterface { + val result = MapCoreSharedModule.MCTextLayerInterface.create(fontLoader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCTextLayerInterface)).asKmp() + } + } +} + +internal fun KMTextLayerInterface.asPlatform(): MapCoreSharedModule.MCTextLayerInterface = nativeHandle as MapCoreSharedModule.MCTextLayerInterface +internal fun MapCoreSharedModule.MCTextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt new file mode 100644 index 000000000..e39bb5b23 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -0,0 +1,35 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextShaderInterface", exact = true) +actual class KMTextShaderInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCTextShaderInterfaceProtocol + + actual fun setColor(color: KMColor) { + native.setColor(color.asPlatform()) + } + + actual fun setOpacity(opacity: Float) { + native.setOpacity(opacity) + } + + actual fun setHaloColor(color: KMColor, width: Float, blur: Float) { + native.setHaloColor(color.asPlatform(), width, blur) + } + + actual fun asShaderProgramInterface(): KMShaderProgramInterface { + val result = native.asShaderProgramInterface() + return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + } +} + +internal fun KMTextShaderInterface.asPlatform(): MapCoreSharedModule.MCTextShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCTextShaderInterfaceProtocol +internal fun MapCoreSharedModule.MCTextShaderInterfaceProtocol.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt new file mode 100644 index 000000000..65f23e243 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from text.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextSymbolPlacement", exact = true) +actual enum class KMTextSymbolPlacement(val rawValue: Long) { + POINT(0L), + LINE(1L), + LINE_CENTER(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCTextSymbolPlacement): KMTextSymbolPlacement { + val raw = value.toLong() + return when (raw) { + 0L -> KMTextSymbolPlacement.POINT + 1L -> KMTextSymbolPlacement.LINE + 2L -> KMTextSymbolPlacement.LINE_CENTER + else -> throw IllegalArgumentException("Unknown KMTextSymbolPlacement value: " + raw) + } + } + } +} + +internal fun KMTextSymbolPlacement.asPlatform(): MapCoreSharedModule.MCTextSymbolPlacement = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt new file mode 100644 index 000000000..0749b0af1 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from packer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextureAtlas", exact = true) +actual class KMTextureAtlas actual constructor( + uvMap: HashMap, + texture: KMTextureHolderInterface?, +) { + actual val uvMap: HashMap = uvMap + actual val texture: KMTextureHolderInterface? = texture +} + +internal fun KMTextureAtlas.asPlatform(): MapCoreSharedModule.MCTextureAtlas = MapCoreSharedModule.MCTextureAtlas( + uvMap = HashMap(uvMap.map { it.key to it.value.asPlatform() }.toMap()), + texture = texture?.let { it.asPlatform() }, +) +internal fun MapCoreSharedModule.MCTextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( + uvMap = HashMap(((this.uvMap as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.uvMap as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.uvMap as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), + texture = this.texture?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt new file mode 100644 index 000000000..25181a8b1 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt @@ -0,0 +1,28 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextureFilterType", exact = true) +actual enum class KMTextureFilterType(val rawValue: Long) { + NEAREST(0L), + LINEAR(1L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCTextureFilterType): KMTextureFilterType { + val raw = value.toLong() + return when (raw) { + 0L -> KMTextureFilterType.NEAREST + 1L -> KMTextureFilterType.LINEAR + else -> throw IllegalArgumentException("Unknown KMTextureFilterType value: " + raw) + } + } + } +} + +internal fun KMTextureFilterType.asPlatform(): MapCoreSharedModule.MCTextureFilterType = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt new file mode 100644 index 000000000..44d07b402 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt @@ -0,0 +1,98 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from graphicsobjects.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextureHolderInterface", exact = true) +actual interface KMTextureHolderInterface +{ + + actual fun getImageWidth(): Int + + actual fun getImageHeight(): Int + + actual fun getTextureWidth(): Int + + actual fun getTextureHeight(): Int + + actual fun attachToGraphics(): Int + + actual fun clearFromGraphics() +} + +private class KMTextureHolderInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTextureHolderInterfaceProtocol) : KMTextureHolderInterface +{ + + override fun getImageWidth(): Int { + val result = nativeHandle.getImageWidth() + return result + } + + override fun getImageHeight(): Int { + val result = nativeHandle.getImageHeight() + return result + } + + override fun getTextureWidth(): Int { + val result = nativeHandle.getTextureWidth() + return result + } + + override fun getTextureHeight(): Int { + val result = nativeHandle.getTextureHeight() + return result + } + + override fun attachToGraphics(): Int { + val result = nativeHandle.attachToGraphics() + return result + } + + override fun clearFromGraphics() { + nativeHandle.clearFromGraphics() + } +} + +private class KMTextureHolderInterfacePlatformProxy(private val delegate: KMTextureHolderInterface) : NSObject(), MapCoreSharedModule.MCTextureHolderInterfaceProtocol +{ + + override fun getImageWidth(): Int { + val result = delegate.getImageWidth() + return result + } + + override fun getImageHeight(): Int { + val result = delegate.getImageHeight() + return result + } + + override fun getTextureWidth(): Int { + val result = delegate.getTextureWidth() + return result + } + + override fun getTextureHeight(): Int { + val result = delegate.getTextureHeight() + return result + } + + override fun attachToGraphics(): Int { + val result = delegate.attachToGraphics() + return result + } + + override fun clearFromGraphics() { + delegate.clearFromGraphics() + } +} + +internal fun KMTextureHolderInterface.asPlatform(): MapCoreSharedModule.MCTextureHolderInterfaceProtocol = when (this) { + is KMTextureHolderInterfacePlatformWrapper -> this.nativeHandle + else -> KMTextureHolderInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTextureHolderInterfaceProtocol.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt new file mode 100644 index 000000000..80f6a2da1 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -0,0 +1,34 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from loader.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTextureLoaderResult", exact = true) +actual class KMTextureLoaderResult actual constructor( + data: KMTextureHolderInterface?, + etag: String?, + status: KMLoaderStatus, + errorCode: String?, +) { + actual val data: KMTextureHolderInterface? = data + actual val etag: String? = etag + actual val status: KMLoaderStatus = status + actual val errorCode: String? = errorCode +} + +internal fun KMTextureLoaderResult.asPlatform(): MapCoreSharedModule.MCTextureLoaderResult = MapCoreSharedModule.MCTextureLoaderResult( + data = data?.let { it.asPlatform() }, + etag = etag?.let { it }, + status = status.asPlatform(), + errorCode = errorCode?.let { it }, +) +internal fun MapCoreSharedModule.MCTextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( + data = this.data?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, + etag = this.etag?.let { (it as String) }, + status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), + errorCode = this.errorCode?.let { (it as String) }, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt new file mode 100644 index 000000000..3f03e502a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from task_scheduler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMThreadPoolScheduler", exact = true) +actual class KMThreadPoolScheduler actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCThreadPoolScheduler + + actual companion object + { + + actual fun create(): KMSchedulerInterface { + val result = MapCoreSharedModule.MCThreadPoolScheduler.create() + return requireNotNull((result as MapCoreSharedModule.MCSchedulerInterfaceProtocol)).asKmp() + } + } +} + +internal fun KMThreadPoolScheduler.asPlatform(): MapCoreSharedModule.MCThreadPoolScheduler = nativeHandle as MapCoreSharedModule.MCThreadPoolScheduler +internal fun MapCoreSharedModule.MCThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt new file mode 100644 index 000000000..74438b8dd --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt @@ -0,0 +1,124 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapLayerConfig", exact = true) +actual interface KMTiled2dMapLayerConfig +{ + + actual fun getCoordinateSystemIdentifier(): Int + + actual fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String + + actual fun getZoomLevelInfos(): ArrayList + + actual fun getVirtualZoomLevelInfos(): ArrayList + + actual fun getZoomInfo(): KMTiled2dMapZoomInfo + + actual fun getLayerName(): String + + actual fun getVectorSettings(): KMTiled2dMapVectorSettings? + + actual fun getBounds(): KMRectCoord? +} + +private class KMTiled2dMapLayerConfigPlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol) : KMTiled2dMapLayerConfig +{ + + override fun getCoordinateSystemIdentifier(): Int { + val result = nativeHandle.getCoordinateSystemIdentifier() + return result + } + + override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { + val result = nativeHandle.getTileUrl(x, y, t, zoom) + return result + } + + override fun getZoomLevelInfos(): ArrayList { + val result = nativeHandle.getZoomLevelInfos() + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCTiled2dMapZoomLevelInfo).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCTiled2dMapZoomLevelInfo).asKmp() })) + } + + override fun getVirtualZoomLevelInfos(): ArrayList { + val result = nativeHandle.getVirtualZoomLevelInfos() + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCTiled2dMapZoomLevelInfo).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCTiled2dMapZoomLevelInfo).asKmp() })) + } + + override fun getZoomInfo(): KMTiled2dMapZoomInfo { + val result = nativeHandle.getZoomInfo() + return (result as MapCoreSharedModule.MCTiled2dMapZoomInfo).asKmp() + } + + override fun getLayerName(): String { + val result = nativeHandle.getLayerName() + return result + } + + override fun getVectorSettings(): KMTiled2dMapVectorSettings? { + val result = nativeHandle.getVectorSettings() + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapVectorSettings).asKmp() } + } + + override fun getBounds(): KMRectCoord? { + val result = nativeHandle.getBounds() + return result?.let { (it as MapCoreSharedModule.MCRectCoord).asKmp() } + } +} + +private class KMTiled2dMapLayerConfigPlatformProxy(private val delegate: KMTiled2dMapLayerConfig) : NSObject(), MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol +{ + + override fun getCoordinateSystemIdentifier(): Int { + val result = delegate.getCoordinateSystemIdentifier() + return result + } + + override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { + val result = delegate.getTileUrl(x, y, t, zoom) + return result + } + + override fun getZoomLevelInfos(): List<*> { + val result = delegate.getZoomLevelInfos() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getVirtualZoomLevelInfos(): List<*> { + val result = delegate.getVirtualZoomLevelInfos() + return ArrayList(result.map { it.asPlatform() }) + } + + override fun getZoomInfo(): MapCoreSharedModule.MCTiled2dMapZoomInfo { + val result = delegate.getZoomInfo() + return result.asPlatform() + } + + override fun getLayerName(): String { + val result = delegate.getLayerName() + return result + } + + override fun getVectorSettings(): MapCoreSharedModule.MCTiled2dMapVectorSettings? { + val result = delegate.getVectorSettings() + return result?.let { it.asPlatform() } + } + + override fun getBounds(): MapCoreSharedModule.MCRectCoord? { + val result = delegate.getBounds() + return result?.let { it.asPlatform() } + } +} + +internal fun KMTiled2dMapLayerConfig.asPlatform(): MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol = when (this) { + is KMTiled2dMapLayerConfigPlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapLayerConfigPlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt new file mode 100644 index 000000000..b5ea62b1a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt @@ -0,0 +1,52 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_raster_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapRasterLayerCallbackInterface", exact = true) +actual interface KMTiled2dMapRasterLayerCallbackInterface +{ + + actual fun onClickConfirmed(coord: KMCoord): Boolean + + actual fun onLongPress(coord: KMCoord): Boolean +} + +private class KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol) : KMTiled2dMapRasterLayerCallbackInterface +{ + + override fun onClickConfirmed(coord: KMCoord): Boolean { + val result = nativeHandle.onClickConfirmed(coord.asPlatform()) + return result + } + + override fun onLongPress(coord: KMCoord): Boolean { + val result = nativeHandle.onLongPress(coord.asPlatform()) + return result + } +} + +private class KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapRasterLayerCallbackInterface) : NSObject(), MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol +{ + + override fun onClickConfirmed(coord: MapCoreSharedModule.MCCoord): Boolean { + val result = delegate.onClickConfirmed((coord as MapCoreSharedModule.MCCoord).asKmp()) + return result + } + + override fun onLongPress(coord: MapCoreSharedModule.MCCoord): Boolean { + val result = delegate.onLongPress((coord as MapCoreSharedModule.MCCoord).asKmp()) + return result + } +} + +internal fun KMTiled2dMapRasterLayerCallbackInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol = when (this) { + is KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt new file mode 100644 index 000000000..49126705c --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -0,0 +1,116 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_raster_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapRasterLayerInterface", exact = true) +actual class KMTiled2dMapRasterLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual fun setCallbackHandler(handler: KMTiled2dMapRasterLayerCallbackInterface) { + native.setCallbackHandler(handler.asPlatform()) + } + + actual fun getCallbackHandler(): KMTiled2dMapRasterLayerCallbackInterface? { + val result = native.getCallbackHandler() + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol)).asKmp() } + } + + actual fun removeCallbackHandler() { + native.removeCallbackHandler() + } + + actual fun setAlpha(alpha: Float) { + native.setAlpha(alpha) + } + + actual fun getAlpha(): Float { + val result = native.getAlpha() + return result + } + + actual fun setStyle(style: KMRasterShaderStyle) { + native.setStyle(style.asPlatform()) + } + + actual fun getStyle(): KMRasterShaderStyle { + val result = native.getStyle() + return (result as MapCoreSharedModule.MCRasterShaderStyle).asKmp() + } + + actual fun setMinMagFilter(filterType: KMTextureFilterType) { + native.setMinMagFilter(filterType.asPlatform()) + } + + actual fun setMinZoomLevelIdentifier(value: Int?) { + native.setMinZoomLevelIdentifier(value?.let { platform.Foundation.NSNumber(int = it) }) + } + + actual fun getMinZoomLevelIdentifier(): Int? { + val result = native.getMinZoomLevelIdentifier() + return result?.let { (it as platform.Foundation.NSNumber).intValue } + } + + actual fun setMaxZoomLevelIdentifier(value: Int?) { + native.setMaxZoomLevelIdentifier(value?.let { platform.Foundation.NSNumber(int = it) }) + } + + actual fun getMaxZoomLevelIdentifier(): Int? { + val result = native.getMaxZoomLevelIdentifier() + return result?.let { (it as platform.Foundation.NSNumber).intValue } + } + + actual fun setT(t: Int) { + native.setT(t) + } + + actual fun setReadyStateListener(listener: KMTiled2dMapReadyStateListener?) { + native.setReadyStateListener(listener?.let { it.asPlatform() }) + } + + actual fun getConfig(): KMTiled2dMapLayerConfig { + val result = native.getConfig() + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + } + + actual fun set3dSubdivisionFactor(factor: Int) { + native.set3dSubdivisionFactor(factor) + } + + actual fun setBlendMode(blendMode: KMBlendMode) { + native.setBlendMode(blendMode.asPlatform()) + } + + actual companion object + { + + actual fun createWithMask(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, mask: KMMaskingObjectInterface): KMTiled2dMapRasterLayerInterface { + val result = MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.createWithMask(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), mask.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() + } + + actual fun createWithShader(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, shader: KMShaderProgramInterface): KMTiled2dMapRasterLayerInterface { + val result = MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.createWithShader(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() + } + + actual fun create(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList): KMTiled2dMapRasterLayerInterface { + val result = MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.create(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() })) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() + } + } +} + +internal fun KMTiled2dMapRasterLayerInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapRasterLayerInterface = nativeHandle as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface +internal fun MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt new file mode 100644 index 000000000..f5f3adb9b --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt @@ -0,0 +1,38 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapReadyStateListener", exact = true) +actual interface KMTiled2dMapReadyStateListener +{ + + actual fun stateUpdate(state: KMLayerReadyState) +} + +private class KMTiled2dMapReadyStateListenerPlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTiled2dMapReadyStateListenerProtocol) : KMTiled2dMapReadyStateListener +{ + + override fun stateUpdate(state: KMLayerReadyState) { + nativeHandle.stateUpdate(state.asPlatform()) + } +} + +private class KMTiled2dMapReadyStateListenerPlatformProxy(private val delegate: KMTiled2dMapReadyStateListener) : NSObject(), MapCoreSharedModule.MCTiled2dMapReadyStateListenerProtocol +{ + + override fun stateUpdate(state: MapCoreSharedModule.MCLayerReadyState) { + delegate.stateUpdate(KMLayerReadyState.fromPlatform((state as MapCoreSharedModule.MCLayerReadyState))) + } +} + +internal fun KMTiled2dMapReadyStateListener.asPlatform(): MapCoreSharedModule.MCTiled2dMapReadyStateListenerProtocol = when (this) { + is KMTiled2dMapReadyStateListenerPlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapReadyStateListenerPlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTiled2dMapReadyStateListenerProtocol.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt new file mode 100644 index 000000000..8178dbf96 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -0,0 +1,69 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapSourceInterface", exact = true) +actual class KMTiled2dMapSourceInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCTiled2dMapSourceInterface + + actual fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, curT: Int, zoom: Double) { + native.onVisibleBoundsChanged(visibleBounds.asPlatform(), curT, zoom) + } + + actual fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) { + native.onCameraChange(ArrayList(viewMatrix.map { platform.Foundation.NSNumber(float = it) }), ArrayList(projectionMatrix.map { platform.Foundation.NSNumber(float = it) }), origin.asPlatform(), verticalFov, horizontalFov, width, height, focusPointAltitude, focusPointPosition.asPlatform(), zoom) + } + + actual fun setMinZoomLevelIdentifier(value: Int?) { + native.setMinZoomLevelIdentifier(value?.let { platform.Foundation.NSNumber(int = it) }) + } + + actual fun getMinZoomLevelIdentifier(): Int? { + val result = native.getMinZoomLevelIdentifier() + return result?.let { (it as platform.Foundation.NSNumber).intValue } + } + + actual fun setMaxZoomLevelIdentifier(value: Int?) { + native.setMaxZoomLevelIdentifier(value?.let { platform.Foundation.NSNumber(int = it) }) + } + + actual fun getMaxZoomLevelIdentifier(): Int? { + val result = native.getMaxZoomLevelIdentifier() + return result?.let { (it as platform.Foundation.NSNumber).intValue } + } + + actual fun pause() { + native.pause() + } + + actual fun resume() { + native.resume() + } + + actual fun isReadyToRenderOffscreen(): KMLayerReadyState { + val result = native.isReadyToRenderOffscreen() + return KMLayerReadyState.fromPlatform((result as MapCoreSharedModule.MCLayerReadyState)) + } + + actual fun setErrorManager(errorManager: KMErrorManager) { + native.setErrorManager(errorManager.asPlatform()) + } + + actual fun forceReload() { + native.forceReload() + } + + actual fun notifyTilesUpdates() { + native.notifyTilesUpdates() + } +} + +internal fun KMTiled2dMapSourceInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapSourceInterface = nativeHandle as MapCoreSharedModule.MCTiled2dMapSourceInterface +internal fun MapCoreSharedModule.MCTiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt new file mode 100644 index 000000000..4f123db6d --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapVectorAssetInfo", exact = true) +actual class KMTiled2dMapVectorAssetInfo actual constructor( + featureIdentifiersUv: HashMap, + texture: KMTextureHolderInterface?, +) { + actual val featureIdentifiersUv: HashMap = featureIdentifiersUv + actual val texture: KMTextureHolderInterface? = texture +} + +internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorAssetInfo = MapCoreSharedModule.MCTiled2dMapVectorAssetInfo( + featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asPlatform() }.toMap()), + texture = texture?.let { it.asPlatform() }, +) +internal fun MapCoreSharedModule.MCTiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( + featureIdentifiersUv = HashMap(((this.featureIdentifiersUv as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.featureIdentifiersUv as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.featureIdentifiersUv as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), + texture = this.texture?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt new file mode 100644 index 000000000..e8e7dfab6 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -0,0 +1,93 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapVectorLayerInterface", exact = true) +actual class KMTiled2dMapVectorLayerInterface actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface + + actual fun setSelectionDelegate(selectionDelegate: KMTiled2dMapVectorLayerSelectionCallbackInterface?) { + native.setSelectionDelegate(selectionDelegate?.let { it.asPlatform() }) + } + + actual fun asLayerInterface(): KMLayerInterface { + val result = native.asLayerInterface() + return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + } + + actual fun setMinZoomLevelIdentifier(value: Int?) { + native.setMinZoomLevelIdentifier(value?.let { platform.Foundation.NSNumber(int = it) }) + } + + actual fun getMinZoomLevelIdentifier(): Int? { + val result = native.getMinZoomLevelIdentifier() + return result?.let { (it as platform.Foundation.NSNumber).intValue } + } + + actual fun setMaxZoomLevelIdentifier(value: Int?) { + native.setMaxZoomLevelIdentifier(value?.let { platform.Foundation.NSNumber(int = it) }) + } + + actual fun getMaxZoomLevelIdentifier(): Int? { + val result = native.getMaxZoomLevelIdentifier() + return result?.let { (it as platform.Foundation.NSNumber).intValue } + } + + actual fun getStyleMetadataJson(): String? { + val result = native.getStyleMetadataJson() + return result?.let { (it as String) } + } + + actual fun setFeatureState(identifier: String, properties: HashMap) { + native.setFeatureState(identifier, HashMap(properties.map { it.key to it.value.asPlatform() }.toMap())) + } + + actual fun setGlobalState(properties: HashMap) { + native.setGlobalState(HashMap(properties.map { it.key to it.value.asPlatform() }.toMap())) + } + + actual fun getVisiblePointFeatureContexts(paddingPc: Float, sourceLayer: String?): ArrayList { + val result = native.getVisiblePointFeatureContexts(paddingPc, sourceLayer?.let { it }) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCVectorLayerFeatureCoordInfo).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVectorLayerFeatureCoordInfo).asKmp() })) + } + + actual fun setReadyStateListener(listener: KMTiled2dMapReadyStateListener?) { + native.setReadyStateListener(listener?.let { it.asPlatform() }) + } + + actual fun reloadDataSource(sourceName: String) { + native.reloadDataSource(sourceName) + } + + actual fun reloadLocalDataSource(sourceName: String, geoJson: String) { + native.reloadLocalDataSource(sourceName, geoJson) + } + + actual fun performClick(coord: KMCoord) { + native.performClick(coord.asPlatform()) + } + + actual companion object + { + + actual fun createFromStyleJson(layerName: String, styleJsonUrl: String, loaders: ArrayList, fontLoader: KMFontLoaderInterface): KMTiled2dMapVectorLayerInterface { + val result = MapCoreSharedModule.MCTiled2dMapVectorLayerInterface.createFromStyleJson(layerName, styleJsonUrl, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface)).asKmp() + } + + actual fun createExplicitly(layerName: String, styleJson: String?, localStyleJson: Boolean?, loaders: ArrayList, fontLoader: KMFontLoaderInterface, localDataProvider: KMTiled2dMapVectorLayerLocalDataProviderInterface?, customZoomInfo: KMTiled2dMapZoomInfo?, symbolDelegate: KMTiled2dMapVectorLayerSymbolDelegateInterface?, sourceUrlParams: HashMap?): KMTiled2dMapVectorLayerInterface { + val result = MapCoreSharedModule.MCTiled2dMapVectorLayerInterface.createExplicitly(layerName, styleJson?.let { it }, localStyleJson?.let { platform.Foundation.NSNumber(bool = it) }, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform(), localDataProvider?.let { it.asPlatform() }, customZoomInfo?.let { it.asPlatform() }, symbolDelegate?.let { it.asPlatform() }, sourceUrlParams?.let { HashMap(it.map { it.key to it.value }.toMap()) }) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface)).asKmp() + } + } +} + +internal fun KMTiled2dMapVectorLayerInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorLayerInterface = nativeHandle as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface +internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt new file mode 100644 index 000000000..01b724191 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -0,0 +1,76 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapVectorLayerLocalDataProviderInterface", exact = true) +actual interface KMTiled2dMapVectorLayerLocalDataProviderInterface +{ + + actual fun getStyleJson(): String? + + actual fun loadSpriteAsync(spriteId: String, url: String, scale: Int): KMFuture + + actual fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): KMFuture + + actual fun loadGeojson(sourceName: String, url: String): KMFuture +} + +private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol) : KMTiled2dMapVectorLayerLocalDataProviderInterface +{ + + override fun getStyleJson(): String? { + val result = nativeHandle.getStyleJson() + return result?.let { (it as String) } + } + + override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): KMFuture { + val result = nativeHandle.loadSpriteAsync(spriteId, url, scale) + return (result as MapCoreSharedModule.DJFuture).asKmp() + } + + override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): KMFuture { + val result = nativeHandle.loadSpriteJsonAsync(spriteId, url, scale) + return (result as MapCoreSharedModule.DJFuture).asKmp() + } + + override fun loadGeojson(sourceName: String, url: String): KMFuture { + val result = nativeHandle.loadGeojson(sourceName, url) + return (result as MapCoreSharedModule.DJFuture).asKmp() + } +} + +private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerLocalDataProviderInterface) : NSObject(), MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol +{ + + override fun getStyleJson(): String? { + val result = delegate.getStyleJson() + return result?.let { it } + } + + override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): MapCoreSharedModule.DJFuture { + val result = delegate.loadSpriteAsync(spriteId, url, scale) + return result.asPlatform() + } + + override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): MapCoreSharedModule.DJFuture { + val result = delegate.loadSpriteJsonAsync(spriteId, url, scale) + return result.asPlatform() + } + + override fun loadGeojson(sourceName: String, url: String): MapCoreSharedModule.DJFuture { + val result = delegate.loadGeojson(sourceName, url) + return result.asPlatform() + } +} + +internal fun KMTiled2dMapVectorLayerLocalDataProviderInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol = when (this) { + is KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt new file mode 100644 index 000000000..220f4a773 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt @@ -0,0 +1,64 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapVectorLayerSelectionCallbackInterface", exact = true) +actual interface KMTiled2dMapVectorLayerSelectionCallbackInterface +{ + + actual fun didSelectFeature(featureInfo: KMVectorLayerFeatureInfo, layerIdentifier: String, coord: KMCoord): Boolean + + actual fun didMultiSelectLayerFeatures(featureInfos: ArrayList, layerIdentifier: String, coord: KMCoord): Boolean + + actual fun didClickBackgroundConfirmed(coord: KMCoord): Boolean +} + +private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol) : KMTiled2dMapVectorLayerSelectionCallbackInterface +{ + + override fun didSelectFeature(featureInfo: KMVectorLayerFeatureInfo, layerIdentifier: String, coord: KMCoord): Boolean { + val result = nativeHandle.didSelectFeature(featureInfo.asPlatform(), layerIdentifier, coord.asPlatform()) + return result + } + + override fun didMultiSelectLayerFeatures(featureInfos: ArrayList, layerIdentifier: String, coord: KMCoord): Boolean { + val result = nativeHandle.didMultiSelectLayerFeatures(ArrayList(featureInfos.map { it.asPlatform() }), layerIdentifier, coord.asPlatform()) + return result + } + + override fun didClickBackgroundConfirmed(coord: KMCoord): Boolean { + val result = nativeHandle.didClickBackgroundConfirmed(coord.asPlatform()) + return result + } +} + +private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSelectionCallbackInterface) : NSObject(), MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol +{ + + override fun didSelectFeature(featureInfo: MapCoreSharedModule.MCVectorLayerFeatureInfo, layerIdentifier: String, coord: MapCoreSharedModule.MCCoord): Boolean { + val result = delegate.didSelectFeature((featureInfo as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp(), layerIdentifier, (coord as MapCoreSharedModule.MCCoord).asKmp()) + return result + } + + override fun didMultiSelectLayerFeatures(featureInfos: List<*>, layerIdentifier: String, coord: MapCoreSharedModule.MCCoord): Boolean { + val result = delegate.didMultiSelectLayerFeatures(ArrayList(((featureInfos as? List<*>)?.map { (it as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp() } ?: (0 until (featureInfos as platform.Foundation.NSArray).count.toInt()).map { idx -> ((featureInfos as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp() })), layerIdentifier, (coord as MapCoreSharedModule.MCCoord).asKmp()) + return result + } + + override fun didClickBackgroundConfirmed(coord: MapCoreSharedModule.MCCoord): Boolean { + val result = delegate.didClickBackgroundConfirmed((coord as MapCoreSharedModule.MCCoord).asKmp()) + return result + } +} + +internal fun KMTiled2dMapVectorLayerSelectionCallbackInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol = when (this) { + is KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt new file mode 100644 index 000000000..2e3d2d9dc --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt @@ -0,0 +1,40 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapVectorLayerSymbolDelegateInterface", exact = true) +actual interface KMTiled2dMapVectorLayerSymbolDelegateInterface +{ + + actual fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList +} + +private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol) : KMTiled2dMapVectorLayerSymbolDelegateInterface +{ + + override fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList { + val result = nativeHandle.getCustomAssetsFor(ArrayList(featureInfos.map { it.asPlatform() }), layerIdentifier) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCTiled2dMapVectorAssetInfo).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCTiled2dMapVectorAssetInfo).asKmp() })) + } +} + +private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSymbolDelegateInterface) : NSObject(), MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol +{ + + override fun getCustomAssetsFor(featureInfos: List<*>, layerIdentifier: String): List<*> { + val result = delegate.getCustomAssetsFor(ArrayList(((featureInfos as? List<*>)?.map { (it as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp() } ?: (0 until (featureInfos as platform.Foundation.NSArray).count.toInt()).map { idx -> ((featureInfos as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp() })), layerIdentifier) + return ArrayList(result.map { it.asPlatform() }) + } +} + +internal fun KMTiled2dMapVectorLayerSymbolDelegateInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol = when (this) { + is KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper -> this.nativeHandle + else -> KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt new file mode 100644 index 000000000..8ae11d98e --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt @@ -0,0 +1,22 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapVectorSettings", exact = true) +actual class KMTiled2dMapVectorSettings actual constructor( + tileOrigin: KMTiled2dMapVectorTileOrigin, +) { + actual val tileOrigin: KMTiled2dMapVectorTileOrigin = tileOrigin +} + +internal fun KMTiled2dMapVectorSettings.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorSettings = MapCoreSharedModule.MCTiled2dMapVectorSettings( + tileOrigin = tileOrigin.asPlatform(), +) +internal fun MapCoreSharedModule.MCTiled2dMapVectorSettings.asKmp(): KMTiled2dMapVectorSettings = KMTiled2dMapVectorSettings( + tileOrigin = KMTiled2dMapVectorTileOrigin.fromPlatform((this.tileOrigin as MapCoreSharedModule.MCTiled2dMapVectorTileOrigin)), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt new file mode 100644 index 000000000..f1ccc2e08 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapVectorTileOrigin", exact = true) +actual enum class KMTiled2dMapVectorTileOrigin(val rawValue: Long) { + TOP_LEFT(0L), + BOTTOM_LEFT(1L), + TOP_RIGHT(2L), + BOTTOM_RIGHT(3L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCTiled2dMapVectorTileOrigin): KMTiled2dMapVectorTileOrigin { + val raw = value.toLong() + return when (raw) { + 0L -> KMTiled2dMapVectorTileOrigin.TOP_LEFT + 1L -> KMTiled2dMapVectorTileOrigin.BOTTOM_LEFT + 2L -> KMTiled2dMapVectorTileOrigin.TOP_RIGHT + 3L -> KMTiled2dMapVectorTileOrigin.BOTTOM_RIGHT + else -> throw IllegalArgumentException("Unknown KMTiled2dMapVectorTileOrigin value: " + raw) + } + } + } +} + +internal fun KMTiled2dMapVectorTileOrigin.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorTileOrigin = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt new file mode 100644 index 000000000..140a16682 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapZoomInfo", exact = true) +actual class KMTiled2dMapZoomInfo actual constructor( + zoomLevelScaleFactor: Float, + numDrawPreviousLayers: Int, + numDrawPreviousOrLaterTLayers: Int, + adaptScaleToScreen: Boolean, + maskTile: Boolean, + underzoom: Boolean, + overzoom: Boolean, +) { + actual val zoomLevelScaleFactor: Float = zoomLevelScaleFactor + actual val numDrawPreviousLayers: Int = numDrawPreviousLayers + actual val numDrawPreviousOrLaterTLayers: Int = numDrawPreviousOrLaterTLayers + actual val adaptScaleToScreen: Boolean = adaptScaleToScreen + actual val maskTile: Boolean = maskTile + actual val underzoom: Boolean = underzoom + actual val overzoom: Boolean = overzoom +} + +internal fun KMTiled2dMapZoomInfo.asPlatform(): MapCoreSharedModule.MCTiled2dMapZoomInfo = MapCoreSharedModule.MCTiled2dMapZoomInfo( + zoomLevelScaleFactor = zoomLevelScaleFactor, + numDrawPreviousLayers = numDrawPreviousLayers, + numDrawPreviousOrLaterTLayers = numDrawPreviousOrLaterTLayers, + adaptScaleToScreen = adaptScaleToScreen, + maskTile = maskTile, + underzoom = underzoom, + overzoom = overzoom, +) +internal fun MapCoreSharedModule.MCTiled2dMapZoomInfo.asKmp(): KMTiled2dMapZoomInfo = KMTiled2dMapZoomInfo( + zoomLevelScaleFactor = this.zoomLevelScaleFactor, + numDrawPreviousLayers = this.numDrawPreviousLayers, + numDrawPreviousOrLaterTLayers = this.numDrawPreviousOrLaterTLayers, + adaptScaleToScreen = this.adaptScaleToScreen, + maskTile = this.maskTile, + underzoom = this.underzoom, + overzoom = this.overzoom, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt new file mode 100644 index 000000000..8f8a6e151 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiled2dMapZoomLevelInfo", exact = true) +actual class KMTiled2dMapZoomLevelInfo actual constructor( + zoom: Double, + tileWidthLayerSystemUnits: Float, + numTilesX: Int, + numTilesY: Int, + numTilesT: Int, + zoomLevelIdentifier: Int, + bounds: KMRectCoord, +) { + actual val zoom: Double = zoom + actual val tileWidthLayerSystemUnits: Float = tileWidthLayerSystemUnits + actual val numTilesX: Int = numTilesX + actual val numTilesY: Int = numTilesY + actual val numTilesT: Int = numTilesT + actual val zoomLevelIdentifier: Int = zoomLevelIdentifier + actual val bounds: KMRectCoord = bounds +} + +internal fun KMTiled2dMapZoomLevelInfo.asPlatform(): MapCoreSharedModule.MCTiled2dMapZoomLevelInfo = MapCoreSharedModule.MCTiled2dMapZoomLevelInfo( + zoom = zoom, + tileWidthLayerSystemUnits = tileWidthLayerSystemUnits, + numTilesX = numTilesX, + numTilesY = numTilesY, + numTilesT = numTilesT, + zoomLevelIdentifier = zoomLevelIdentifier, + bounds = bounds.asPlatform(), +) +internal fun MapCoreSharedModule.MCTiled2dMapZoomLevelInfo.asKmp(): KMTiled2dMapZoomLevelInfo = KMTiled2dMapZoomLevelInfo( + zoom = this.zoom, + tileWidthLayerSystemUnits = this.tileWidthLayerSystemUnits, + numTilesX = this.numTilesX, + numTilesY = this.numTilesY, + numTilesT = this.numTilesT, + zoomLevelIdentifier = this.zoomLevelIdentifier, + bounds = (this.bounds as MapCoreSharedModule.MCRectCoord).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt new file mode 100644 index 000000000..b00ba2a42 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt @@ -0,0 +1,42 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from map_helpers.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTiledLayerError", exact = true) +actual class KMTiledLayerError actual constructor( + status: KMLoaderStatus, + errorCode: String?, + layerName: String, + url: String, + isRecoverable: Boolean, + bounds: KMRectCoord?, +) { + actual val status: KMLoaderStatus = status + actual val errorCode: String? = errorCode + actual val layerName: String = layerName + actual val url: String = url + actual val isRecoverable: Boolean = isRecoverable + actual val bounds: KMRectCoord? = bounds +} + +internal fun KMTiledLayerError.asPlatform(): MapCoreSharedModule.MCTiledLayerError = MapCoreSharedModule.MCTiledLayerError( + status = status.asPlatform(), + errorCode = errorCode?.let { it }, + layerName = layerName, + url = url, + isRecoverable = isRecoverable, + bounds = bounds?.let { it.asPlatform() }, +) +internal fun MapCoreSharedModule.MCTiledLayerError.asKmp(): KMTiledLayerError = KMTiledLayerError( + status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), + errorCode = this.errorCode?.let { (it as String) }, + layerName = this.layerName, + url = this.url, + isRecoverable = this.isRecoverable, + bounds = this.bounds?.let { (it as MapCoreSharedModule.MCRectCoord).asKmp() }, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt new file mode 100644 index 000000000..1c6d0afb4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTouchAction", exact = true) +actual enum class KMTouchAction(val rawValue: Long) { + DOWN(0L), + MOVE(1L), + UP(2L), + CANCEL(3L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCTouchAction): KMTouchAction { + val raw = value.toLong() + return when (raw) { + 0L -> KMTouchAction.DOWN + 1L -> KMTouchAction.MOVE + 2L -> KMTouchAction.UP + 3L -> KMTouchAction.CANCEL + else -> throw IllegalArgumentException("Unknown KMTouchAction value: " + raw) + } + } + } +} + +internal fun KMTouchAction.asPlatform(): MapCoreSharedModule.MCTouchAction = rawValue diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt new file mode 100644 index 000000000..eea517832 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTouchEvent", exact = true) +actual class KMTouchEvent actual constructor( + pointers: ArrayList, + touchAction: KMTouchAction, +) { + actual val pointers: ArrayList = pointers + actual val touchAction: KMTouchAction = touchAction +} + +internal fun KMTouchEvent.asPlatform(): MapCoreSharedModule.MCTouchEvent = MapCoreSharedModule.MCTouchEvent( + pointers = ArrayList(pointers.map { it.asPlatform() }), + touchAction = touchAction.asPlatform(), +) +internal fun MapCoreSharedModule.MCTouchEvent.asKmp(): KMTouchEvent = KMTouchEvent( + pointers = ArrayList(((this.pointers as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2F).asKmp() } ?: (0 until (this.pointers as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.pointers as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2F).asKmp() })), + touchAction = KMTouchAction.fromPlatform((this.touchAction as MapCoreSharedModule.MCTouchAction)), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt new file mode 100644 index 000000000..0eec08674 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -0,0 +1,68 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTouchHandlerInterface", exact = true) +actual interface KMTouchHandlerInterface +{ + + actual fun onTouchEvent(touchEvent: KMTouchEvent) + + actual fun insertListener(listener: KMTouchInterface, index: Int) + + actual fun addListener(listener: KMTouchInterface) + + actual fun removeListener(listener: KMTouchInterface) +} + +private class KMTouchHandlerInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTouchHandlerInterfaceProtocol) : KMTouchHandlerInterface +{ + + override fun onTouchEvent(touchEvent: KMTouchEvent) { + nativeHandle.onTouchEvent(touchEvent.asPlatform()) + } + + override fun insertListener(listener: KMTouchInterface, index: Int) { + nativeHandle.insertListener(listener.asPlatform(), index) + } + + override fun addListener(listener: KMTouchInterface) { + nativeHandle.addListener(listener.asPlatform()) + } + + override fun removeListener(listener: KMTouchInterface) { + nativeHandle.removeListener(listener.asPlatform()) + } +} + +private class KMTouchHandlerInterfacePlatformProxy(private val delegate: KMTouchHandlerInterface) : NSObject(), MapCoreSharedModule.MCTouchHandlerInterfaceProtocol +{ + + override fun onTouchEvent(touchEvent: MapCoreSharedModule.MCTouchEvent) { + delegate.onTouchEvent((touchEvent as MapCoreSharedModule.MCTouchEvent).asKmp()) + } + + override fun insertListener(listener: MapCoreSharedModule.MCTouchInterfaceProtocol?, index: Int) { + delegate.insertListener(requireNotNull((listener as MapCoreSharedModule.MCTouchInterfaceProtocol)).asKmp(), index) + } + + override fun addListener(listener: MapCoreSharedModule.MCTouchInterfaceProtocol?) { + delegate.addListener(requireNotNull((listener as MapCoreSharedModule.MCTouchInterfaceProtocol)).asKmp()) + } + + override fun removeListener(listener: MapCoreSharedModule.MCTouchInterfaceProtocol?) { + delegate.removeListener(requireNotNull((listener as MapCoreSharedModule.MCTouchInterfaceProtocol)).asKmp()) + } +} + +internal fun KMTouchHandlerInterface.asPlatform(): MapCoreSharedModule.MCTouchHandlerInterfaceProtocol = when (this) { + is KMTouchHandlerInterfacePlatformWrapper -> this.nativeHandle + else -> KMTouchHandlerInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTouchHandlerInterfaceProtocol.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt new file mode 100644 index 000000000..29bb934e4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -0,0 +1,170 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from touch_handler.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName +import platform.darwin.NSObject + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTouchInterface", exact = true) +actual interface KMTouchInterface +{ + + actual fun onTouchDown(posScreen: KMVec2F): Boolean + + actual fun onClickUnconfirmed(posScreen: KMVec2F): Boolean + + actual fun onClickConfirmed(posScreen: KMVec2F): Boolean + + actual fun onDoubleClick(posScreen: KMVec2F): Boolean + + actual fun onLongPress(posScreen: KMVec2F): Boolean + + actual fun onMove(deltaScreen: KMVec2F, confirmed: Boolean, doubleClick: Boolean): Boolean + + actual fun onMoveComplete(): Boolean + + actual fun onOneFingerDoubleClickMoveComplete(): Boolean + + actual fun onTwoFingerClick(posScreen1: KMVec2F, posScreen2: KMVec2F): Boolean + + actual fun onTwoFingerMove(posScreenOld: ArrayList, posScreenNew: ArrayList): Boolean + + actual fun onTwoFingerMoveComplete(): Boolean + + actual fun clearTouch() +} + +private class KMTouchInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCTouchInterfaceProtocol) : KMTouchInterface +{ + + override fun onTouchDown(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onTouchDown(posScreen.asPlatform()) + return result + } + + override fun onClickUnconfirmed(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onClickUnconfirmed(posScreen.asPlatform()) + return result + } + + override fun onClickConfirmed(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onClickConfirmed(posScreen.asPlatform()) + return result + } + + override fun onDoubleClick(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onDoubleClick(posScreen.asPlatform()) + return result + } + + override fun onLongPress(posScreen: KMVec2F): Boolean { + val result = nativeHandle.onLongPress(posScreen.asPlatform()) + return result + } + + override fun onMove(deltaScreen: KMVec2F, confirmed: Boolean, doubleClick: Boolean): Boolean { + val result = nativeHandle.onMove(deltaScreen.asPlatform(), confirmed, doubleClick) + return result + } + + override fun onMoveComplete(): Boolean { + val result = nativeHandle.onMoveComplete() + return result + } + + override fun onOneFingerDoubleClickMoveComplete(): Boolean { + val result = nativeHandle.onOneFingerDoubleClickMoveComplete() + return result + } + + override fun onTwoFingerClick(posScreen1: KMVec2F, posScreen2: KMVec2F): Boolean { + val result = nativeHandle.onTwoFingerClick(posScreen1.asPlatform(), posScreen2.asPlatform()) + return result + } + + override fun onTwoFingerMove(posScreenOld: ArrayList, posScreenNew: ArrayList): Boolean { + val result = nativeHandle.onTwoFingerMove(ArrayList(posScreenOld.map { it.asPlatform() }), ArrayList(posScreenNew.map { it.asPlatform() })) + return result + } + + override fun onTwoFingerMoveComplete(): Boolean { + val result = nativeHandle.onTwoFingerMoveComplete() + return result + } + + override fun clearTouch() { + nativeHandle.clearTouch() + } +} + +private class KMTouchInterfacePlatformProxy(private val delegate: KMTouchInterface) : NSObject(), MapCoreSharedModule.MCTouchInterfaceProtocol +{ + + override fun onTouchDown(posScreen: MapCoreSharedModule.MCVec2F): Boolean { + val result = delegate.onTouchDown((posScreen as MapCoreSharedModule.MCVec2F).asKmp()) + return result + } + + override fun onClickUnconfirmed(posScreen: MapCoreSharedModule.MCVec2F): Boolean { + val result = delegate.onClickUnconfirmed((posScreen as MapCoreSharedModule.MCVec2F).asKmp()) + return result + } + + override fun onClickConfirmed(posScreen: MapCoreSharedModule.MCVec2F): Boolean { + val result = delegate.onClickConfirmed((posScreen as MapCoreSharedModule.MCVec2F).asKmp()) + return result + } + + override fun onDoubleClick(posScreen: MapCoreSharedModule.MCVec2F): Boolean { + val result = delegate.onDoubleClick((posScreen as MapCoreSharedModule.MCVec2F).asKmp()) + return result + } + + override fun onLongPress(posScreen: MapCoreSharedModule.MCVec2F): Boolean { + val result = delegate.onLongPress((posScreen as MapCoreSharedModule.MCVec2F).asKmp()) + return result + } + + override fun onMove(deltaScreen: MapCoreSharedModule.MCVec2F, confirmed: Boolean, doubleClick: Boolean): Boolean { + val result = delegate.onMove((deltaScreen as MapCoreSharedModule.MCVec2F).asKmp(), confirmed, doubleClick) + return result + } + + override fun onMoveComplete(): Boolean { + val result = delegate.onMoveComplete() + return result + } + + override fun onOneFingerDoubleClickMoveComplete(): Boolean { + val result = delegate.onOneFingerDoubleClickMoveComplete() + return result + } + + override fun onTwoFingerClick(posScreen1: MapCoreSharedModule.MCVec2F, posScreen2: MapCoreSharedModule.MCVec2F): Boolean { + val result = delegate.onTwoFingerClick((posScreen1 as MapCoreSharedModule.MCVec2F).asKmp(), (posScreen2 as MapCoreSharedModule.MCVec2F).asKmp()) + return result + } + + override fun onTwoFingerMove(posScreenOld: List<*>, posScreenNew: List<*>): Boolean { + val result = delegate.onTwoFingerMove(ArrayList(((posScreenOld as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2F).asKmp() } ?: (0 until (posScreenOld as platform.Foundation.NSArray).count.toInt()).map { idx -> ((posScreenOld as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2F).asKmp() })), ArrayList(((posScreenNew as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2F).asKmp() } ?: (0 until (posScreenNew as platform.Foundation.NSArray).count.toInt()).map { idx -> ((posScreenNew as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2F).asKmp() }))) + return result + } + + override fun onTwoFingerMoveComplete(): Boolean { + val result = delegate.onTwoFingerMoveComplete() + return result + } + + override fun clearTouch() { + delegate.clearTouch() + } +} + +internal fun KMTouchInterface.asPlatform(): MapCoreSharedModule.MCTouchInterfaceProtocol = when (this) { + is KMTouchInterfacePlatformWrapper -> this.nativeHandle + else -> KMTouchInterfacePlatformProxy(this) +} +internal fun MapCoreSharedModule.MCTouchInterfaceProtocol.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt new file mode 100644 index 000000000..b46f52589 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVec2D", exact = true) +actual class KMVec2D actual constructor( + x: Double, + y: Double, +) { + actual val x: Double = x + actual val y: Double = y +} + +internal fun KMVec2D.asPlatform(): MapCoreSharedModule.MCVec2D = MapCoreSharedModule.MCVec2D( + x = x, + y = y, +) +internal fun MapCoreSharedModule.MCVec2D.asKmp(): KMVec2D = KMVec2D( + x = this.x, + y = this.y, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt new file mode 100644 index 000000000..611bfd1f8 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVec2F", exact = true) +actual class KMVec2F actual constructor( + x: Float, + y: Float, +) { + actual val x: Float = x + actual val y: Float = y +} + +internal fun KMVec2F.asPlatform(): MapCoreSharedModule.MCVec2F = MapCoreSharedModule.MCVec2F( + x = x, + y = y, +) +internal fun MapCoreSharedModule.MCVec2F.asKmp(): KMVec2F = KMVec2F( + x = this.x, + y = this.y, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt new file mode 100644 index 000000000..d210164fb --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVec2I", exact = true) +actual class KMVec2I actual constructor( + x: Int, + y: Int, +) { + actual val x: Int = x + actual val y: Int = y +} + +internal fun KMVec2I.asPlatform(): MapCoreSharedModule.MCVec2I = MapCoreSharedModule.MCVec2I( + x = x, + y = y, +) +internal fun MapCoreSharedModule.MCVec2I.asKmp(): KMVec2I = KMVec2I( + x = this.x, + y = this.y, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt new file mode 100644 index 000000000..bab571181 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVec3D", exact = true) +actual class KMVec3D actual constructor( + x: Double, + y: Double, + z: Double, +) { + actual val x: Double = x + actual val y: Double = y + actual val z: Double = z +} + +internal fun KMVec3D.asPlatform(): MapCoreSharedModule.MCVec3D = MapCoreSharedModule.MCVec3D( + x = x, + y = y, + z = z, +) +internal fun MapCoreSharedModule.MCVec3D.asKmp(): KMVec3D = KMVec3D( + x = this.x, + y = this.y, + z = this.z, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt new file mode 100644 index 000000000..14e0b66f1 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVec3F", exact = true) +actual class KMVec3F actual constructor( + x: Float, + y: Float, + z: Float, +) { + actual val x: Float = x + actual val y: Float = y + actual val z: Float = z +} + +internal fun KMVec3F.asPlatform(): MapCoreSharedModule.MCVec3F = MapCoreSharedModule.MCVec3F( + x = x, + y = y, + z = z, +) +internal fun MapCoreSharedModule.MCVec3F.asKmp(): KMVec3F = KMVec3F( + x = this.x, + y = this.y, + z = this.z, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt new file mode 100644 index 000000000..3a5fd641c --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from common.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVec3I", exact = true) +actual class KMVec3I actual constructor( + x: Int, + y: Int, + z: Int, +) { + actual val x: Int = x + actual val y: Int = y + actual val z: Int = z +} + +internal fun KMVec3I.asPlatform(): MapCoreSharedModule.MCVec3I = MapCoreSharedModule.MCVec3I( + x = x, + y = y, + z = z, +) +internal fun MapCoreSharedModule.MCVec3I.asKmp(): KMVec3I = KMVec3I( + x = this.x, + y = this.y, + z = this.z, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt new file mode 100644 index 000000000..5564ef497 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVectorLayerFeatureCoordInfo", exact = true) +actual class KMVectorLayerFeatureCoordInfo actual constructor( + featureInfo: KMVectorLayerFeatureInfo, + coordinates: KMCoord, +) { + actual val featureInfo: KMVectorLayerFeatureInfo = featureInfo + actual val coordinates: KMCoord = coordinates +} + +internal fun KMVectorLayerFeatureCoordInfo.asPlatform(): MapCoreSharedModule.MCVectorLayerFeatureCoordInfo = MapCoreSharedModule.MCVectorLayerFeatureCoordInfo( + featureInfo = featureInfo.asPlatform(), + coordinates = coordinates.asPlatform(), +) +internal fun MapCoreSharedModule.MCVectorLayerFeatureCoordInfo.asKmp(): KMVectorLayerFeatureCoordInfo = KMVectorLayerFeatureCoordInfo( + featureInfo = (this.featureInfo as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp(), + coordinates = (this.coordinates as MapCoreSharedModule.MCCoord).asKmp(), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt new file mode 100644 index 000000000..4a9a1e3ec --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt @@ -0,0 +1,26 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVectorLayerFeatureInfo", exact = true) +actual class KMVectorLayerFeatureInfo actual constructor( + identifier: String, + properties: HashMap, +) { + actual val identifier: String = identifier + actual val properties: HashMap = properties +} + +internal fun KMVectorLayerFeatureInfo.asPlatform(): MapCoreSharedModule.MCVectorLayerFeatureInfo = MapCoreSharedModule.MCVectorLayerFeatureInfo( + identifier = identifier, + properties = HashMap(properties.map { it.key to it.value.asPlatform() }.toMap()), +) +internal fun MapCoreSharedModule.MCVectorLayerFeatureInfo.asKmp(): KMVectorLayerFeatureInfo = KMVectorLayerFeatureInfo( + identifier = this.identifier, + properties = HashMap(((this.properties as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() }?.toMap() ?: run { val e = (this.properties as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.properties as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() } })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt new file mode 100644 index 000000000..457b023b4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt @@ -0,0 +1,46 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from tiled_vector_layer.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMVectorLayerFeatureInfoValue", exact = true) +actual class KMVectorLayerFeatureInfoValue actual constructor( + stringVal: String?, + doubleVal: Double?, + intVal: Long?, + boolVal: Boolean?, + colorVal: KMColor?, + listFloatVal: ArrayList?, + listStringVal: ArrayList?, +) { + actual val stringVal: String? = stringVal + actual val doubleVal: Double? = doubleVal + actual val intVal: Long? = intVal + actual val boolVal: Boolean? = boolVal + actual val colorVal: KMColor? = colorVal + actual val listFloatVal: ArrayList? = listFloatVal + actual val listStringVal: ArrayList? = listStringVal +} + +internal fun KMVectorLayerFeatureInfoValue.asPlatform(): MapCoreSharedModule.MCVectorLayerFeatureInfoValue = MapCoreSharedModule.MCVectorLayerFeatureInfoValue( + stringVal = stringVal?.let { it }, + doubleVal = doubleVal?.let { platform.Foundation.NSNumber(double = it) }, + intVal = intVal?.let { platform.Foundation.NSNumber(longLong = it) }, + boolVal = boolVal?.let { platform.Foundation.NSNumber(bool = it) }, + colorVal = colorVal?.let { it.asPlatform() }, + listFloatVal = listFloatVal?.let { ArrayList(it.map { platform.Foundation.NSNumber(float = it) }) }, + listStringVal = listStringVal?.let { ArrayList(it.map { it }) }, +) +internal fun MapCoreSharedModule.MCVectorLayerFeatureInfoValue.asKmp(): KMVectorLayerFeatureInfoValue = KMVectorLayerFeatureInfoValue( + stringVal = this.stringVal?.let { (it as String) }, + doubleVal = this.doubleVal?.let { (it as platform.Foundation.NSNumber).doubleValue }, + intVal = this.intVal?.let { (it as platform.Foundation.NSNumber).longLongValue }, + boolVal = this.boolVal?.let { (it as platform.Foundation.NSNumber).boolValue }, + colorVal = this.colorVal?.let { (it as MapCoreSharedModule.MCColor).asKmp() }, + listFloatVal = this.listFloatVal?.let { ArrayList(((it as? List<*>)?.map { (it as platform.Foundation.NSNumber).floatValue } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).floatValue })) }, + listStringVal = this.listStringVal?.let { ArrayList(((it as? List<*>)?.map { (it as String) } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as String) })) }, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt new file mode 100644 index 000000000..ceef3a41a --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -0,0 +1,72 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMWmtsCapabilitiesResource", exact = true) +actual class KMWmtsCapabilitiesResource actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCWmtsCapabilitiesResource + + actual fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayer(identifier, ArrayList(tileLoaders.map { it.asPlatform() })) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerTimed(identifier: String, tileLoaders: ArrayList, numT: Int): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayerTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), numT) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerWithZoomInfo(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayerWithZoomInfo(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform()) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerWithZoomInfoTimed(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapRasterLayerInterface? { + val result = native.createLayerWithZoomInfoTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform(), numT) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + } + + actual fun createLayerConfig(identifier: String): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfig(identifier) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + } + + actual fun createLayerConfigTimed(identifier: String, numT: Int): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfigTimed(identifier, numT) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + } + + actual fun createLayerConfigWithZoomInfo(identifier: String, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfigWithZoomInfo(identifier, zoomInfo.asPlatform()) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + } + + actual fun createLayerConfigWithZoomInfoTimed(identifier: String, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapLayerConfig? { + val result = native.createLayerConfigWithZoomInfoTimed(identifier, zoomInfo.asPlatform(), numT) + return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + } + + actual fun getAllLayers(): ArrayList { + val result = native.getAllLayers() + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCWmtsLayerDescription).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCWmtsLayerDescription).asKmp() })) + } + + actual companion object + { + + actual fun create(xml: String): KMWmtsCapabilitiesResource { + val result = MapCoreSharedModule.MCWmtsCapabilitiesResource.create(xml) + return requireNotNull((result as MapCoreSharedModule.MCWmtsCapabilitiesResource)).asKmp() + } + } +} + +internal fun KMWmtsCapabilitiesResource.asPlatform(): MapCoreSharedModule.MCWmtsCapabilitiesResource = nativeHandle as MapCoreSharedModule.MCWmtsCapabilitiesResource +internal fun MapCoreSharedModule.MCWmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt new file mode 100644 index 000000000..1cb3e0886 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMWmtsLayerDescription", exact = true) +actual class KMWmtsLayerDescription actual constructor( + identifier: String, + title: String?, + abstractText: String?, + dimensions: ArrayList, + bounds: KMRectCoord?, + tileMatrixSetLink: String, + resourceTemplate: String, + resourceFormat: String, +) { + actual val identifier: String = identifier + actual val title: String? = title + actual val abstractText: String? = abstractText + actual val dimensions: ArrayList = dimensions + actual val bounds: KMRectCoord? = bounds + actual val tileMatrixSetLink: String = tileMatrixSetLink + actual val resourceTemplate: String = resourceTemplate + actual val resourceFormat: String = resourceFormat +} + +internal fun KMWmtsLayerDescription.asPlatform(): MapCoreSharedModule.MCWmtsLayerDescription = MapCoreSharedModule.MCWmtsLayerDescription( + identifier = identifier, + title = title?.let { it }, + abstractText = abstractText?.let { it }, + dimensions = ArrayList(dimensions.map { it.asPlatform() }), + bounds = bounds?.let { it.asPlatform() }, + tileMatrixSetLink = tileMatrixSetLink, + resourceTemplate = resourceTemplate, + resourceFormat = resourceFormat, +) +internal fun MapCoreSharedModule.MCWmtsLayerDescription.asKmp(): KMWmtsLayerDescription = KMWmtsLayerDescription( + identifier = this.identifier, + title = this.title?.let { (it as String) }, + abstractText = this.abstractText?.let { (it as String) }, + dimensions = ArrayList(((this.dimensions as? List<*>)?.map { (it as MapCoreSharedModule.MCWmtsLayerDimension).asKmp() } ?: (0 until (this.dimensions as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.dimensions as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCWmtsLayerDimension).asKmp() })), + bounds = this.bounds?.let { (it as MapCoreSharedModule.MCRectCoord).asKmp() }, + tileMatrixSetLink = this.tileMatrixSetLink, + resourceTemplate = this.resourceTemplate, + resourceFormat = this.resourceFormat, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt new file mode 100644 index 000000000..63b0a2cf4 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMWmtsLayerDimension", exact = true) +actual class KMWmtsLayerDimension actual constructor( + identifier: String, + defaultValue: String, + values: ArrayList, +) { + actual val identifier: String = identifier + actual val defaultValue: String = defaultValue + actual val values: ArrayList = values +} + +internal fun KMWmtsLayerDimension.asPlatform(): MapCoreSharedModule.MCWmtsLayerDimension = MapCoreSharedModule.MCWmtsLayerDimension( + identifier = identifier, + defaultValue = defaultValue, + values = ArrayList(values.map { it }), +) +internal fun MapCoreSharedModule.MCWmtsLayerDimension.asKmp(): KMWmtsLayerDimension = KMWmtsLayerDimension( + identifier = this.identifier, + defaultValue = this.defaultValue, + values = ArrayList(((this.values as? List<*>)?.map { (it as String) } ?: (0 until (this.values as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.values as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as String) })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt new file mode 100644 index 000000000..ca4479994 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt @@ -0,0 +1,50 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMWmtsTileMatrix", exact = true) +actual class KMWmtsTileMatrix actual constructor( + identifier: String, + scaleDenominator: Double, + topLeftCornerX: Double, + topLeftCornerY: Double, + tileWidth: Int, + tileHeight: Int, + matrixWidth: Int, + matrixHeight: Int, +) { + actual val identifier: String = identifier + actual val scaleDenominator: Double = scaleDenominator + actual val topLeftCornerX: Double = topLeftCornerX + actual val topLeftCornerY: Double = topLeftCornerY + actual val tileWidth: Int = tileWidth + actual val tileHeight: Int = tileHeight + actual val matrixWidth: Int = matrixWidth + actual val matrixHeight: Int = matrixHeight +} + +internal fun KMWmtsTileMatrix.asPlatform(): MapCoreSharedModule.MCWmtsTileMatrix = MapCoreSharedModule.MCWmtsTileMatrix( + identifier = identifier, + scaleDenominator = scaleDenominator, + topLeftCornerX = topLeftCornerX, + topLeftCornerY = topLeftCornerY, + tileWidth = tileWidth, + tileHeight = tileHeight, + matrixWidth = matrixWidth, + matrixHeight = matrixHeight, +) +internal fun MapCoreSharedModule.MCWmtsTileMatrix.asKmp(): KMWmtsTileMatrix = KMWmtsTileMatrix( + identifier = this.identifier, + scaleDenominator = this.scaleDenominator, + topLeftCornerX = this.topLeftCornerX, + topLeftCornerY = this.topLeftCornerY, + tileWidth = this.tileWidth, + tileHeight = this.tileHeight, + matrixWidth = this.matrixWidth, + matrixHeight = this.matrixHeight, +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt new file mode 100644 index 000000000..19c900281 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt @@ -0,0 +1,30 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMWmtsTileMatrixSet", exact = true) +actual class KMWmtsTileMatrixSet actual constructor( + identifier: String, + coordinateSystemIdentifier: Int, + matrices: ArrayList, +) { + actual val identifier: String = identifier + actual val coordinateSystemIdentifier: Int = coordinateSystemIdentifier + actual val matrices: ArrayList = matrices +} + +internal fun KMWmtsTileMatrixSet.asPlatform(): MapCoreSharedModule.MCWmtsTileMatrixSet = MapCoreSharedModule.MCWmtsTileMatrixSet( + identifier = identifier, + coordinateSystemIdentifier = coordinateSystemIdentifier, + matrices = ArrayList(matrices.map { it.asPlatform() }), +) +internal fun MapCoreSharedModule.MCWmtsTileMatrixSet.asKmp(): KMWmtsTileMatrixSet = KMWmtsTileMatrixSet( + identifier = this.identifier, + coordinateSystemIdentifier = this.coordinateSystemIdentifier, + matrices = ArrayList(((this.matrices as? List<*>)?.map { (it as MapCoreSharedModule.MCWmtsTileMatrix).asKmp() } ?: (0 until (this.matrices as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.matrices as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCWmtsTileMatrix).asKmp() })), +) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt new file mode 100644 index 000000000..c6ed71e97 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -0,0 +1,27 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from wmts_capabilities.djinni + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMWmtsTiled2dMapLayerConfigFactory", exact = true) +actual class KMWmtsTiled2dMapLayerConfigFactory actual constructor( + internal val nativeHandle: Any, +) { + private val native = nativeHandle as MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory + + actual companion object + { + + actual fun create(wmtsLayerConfiguration: KMWmtsLayerDescription, zoomLevelInfo: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, coordinateSystemIdentifier: Int, matrixSetIdentifier: String): KMTiled2dMapLayerConfig { + val result = MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory.create(wmtsLayerConfiguration.asPlatform(), ArrayList(zoomLevelInfo.map { it.asPlatform() }), zoomInfo.asPlatform(), coordinateSystemIdentifier, matrixSetIdentifier) + return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + } + } +} + +internal fun KMWmtsTiled2dMapLayerConfigFactory.asPlatform(): MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory = nativeHandle as MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory +internal fun MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt new file mode 100644 index 000000000..30e6ea85e --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt @@ -0,0 +1,5 @@ +package io.openmobilemaps.mapscore.kmp + +actual object KMMapInterfaceBridge { + actual fun wrap(nativeHandle: Any): KMMapInterface = KMMapInterface(nativeHandle) +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt deleted file mode 100644 index a5f30a5bb..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Camera3dConfigIos.kt +++ /dev/null @@ -1,80 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCCamera3dConfig -import MapCoreSharedModule.MCCameraInterpolation -import MapCoreSharedModule.MCCameraInterpolationValue -import platform.Foundation.NSNumber - -actual class CameraInterpolationValue actual constructor( - stop: Float, - value: Float, -) { - actual val stop: Float = stop - actual val value: Float = value -} - -actual class CameraInterpolation actual constructor( - stops: List, -) { - actual val stops: List = stops -} - -actual class Camera3dConfig actual constructor( - key: String, - allowUserInteraction: Boolean, - rotationSpeed: Float?, - animationDurationMs: Int, - minZoom: Float, - maxZoom: Float, - pitchInterpolationValues: CameraInterpolation, - verticalDisplacementInterpolationValues: CameraInterpolation, -) { - actual val key: String = key - actual val allowUserInteraction: Boolean = allowUserInteraction - actual val rotationSpeed: Float? = rotationSpeed - actual val animationDurationMs: Int = animationDurationMs - actual val minZoom: Float = minZoom - actual val maxZoom: Float = maxZoom - actual val pitchInterpolationValues: CameraInterpolation = pitchInterpolationValues - actual val verticalDisplacementInterpolationValues: CameraInterpolation = verticalDisplacementInterpolationValues -} - -internal fun CameraInterpolationValue.asMapCore(): MCCameraInterpolationValue = - MCCameraInterpolationValue.cameraInterpolationValueWithStop(stop = stop, value = value) - -internal fun CameraInterpolation.asMapCore(): MCCameraInterpolation = - MCCameraInterpolation.cameraInterpolationWithStops(stops.map { it.asMapCore() }) - -internal fun CameraInterpolationValueFromMapCore(value: MCCameraInterpolationValue): CameraInterpolationValue = - CameraInterpolationValue(stop = value.stop, value = value.value) - -internal fun CameraInterpolationFromMapCore(value: MCCameraInterpolation): CameraInterpolation = - CameraInterpolation( - stops = value.stops - .mapNotNull { it as? MCCameraInterpolationValue } - .map { CameraInterpolationValueFromMapCore(it) }, - ) - -internal fun Camera3dConfig.asMapCore(): MCCamera3dConfig = - MCCamera3dConfig.camera3dConfigWithKey( - key = key, - allowUserInteraction = allowUserInteraction, - rotationSpeed = rotationSpeed?.let { NSNumber(float = it) }, - animationDurationMs = animationDurationMs, - minZoom = minZoom, - maxZoom = maxZoom, - pitchInterpolationValues = pitchInterpolationValues.asMapCore(), - verticalDisplacementInterpolationValues = verticalDisplacementInterpolationValues.asMapCore(), - ) - -internal fun Camera3dConfigFromMapCore(value: MCCamera3dConfig): Camera3dConfig = - Camera3dConfig( - key = value.key, - allowUserInteraction = value.allowUserInteraction, - rotationSpeed = value.rotationSpeed?.floatValue, - animationDurationMs = value.animationDurationMs, - minZoom = value.minZoom, - maxZoom = value.maxZoom, - pitchInterpolationValues = CameraInterpolationFromMapCore(value.pitchInterpolationValues), - verticalDisplacementInterpolationValues = CameraInterpolationFromMapCore(value.verticalDisplacementInterpolationValues), - ) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt deleted file mode 100644 index 01f937546..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Color.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCColor - -actual typealias Color = MCColor diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt deleted file mode 100644 index 4e299f4c5..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Coord.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCCoord - -actual typealias Coord = MCCoord diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt deleted file mode 100644 index b4fa1fce3..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/GpsCoord.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import LayerGpsSharedModule.MCCoord - -typealias GpsCoord = MCCoord diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt deleted file mode 100644 index 0b826f7ad..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/IndexedLayerInterfaceImplementation.kt +++ /dev/null @@ -1,16 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCIndexedLayerInterfaceProtocol - -actual open class IndexedLayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val indexedLayer = nativeHandle as? MCIndexedLayerInterfaceProtocol - - internal fun asMapCore(): MCIndexedLayerInterfaceProtocol? = - nativeHandle as? MCIndexedLayerInterfaceProtocol - - actual fun getLayerInterface(): LayerInterface = - LayerInterface(indexedLayer?.getLayerInterface()) - - actual fun getIndex(): Int = indexedLayer?.getIndex() ?: 0 -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt deleted file mode 100644 index 2dae9f7d7..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/LayerInterfaceImplementation.kt +++ /dev/null @@ -1,92 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCLayerInterfaceProtocol -import MapCoreSharedModule.MCLayerReadyState -import MapCoreSharedModule.MCLayerReadyStateERROR -import MapCoreSharedModule.MCLayerReadyStateNOT_READY -import MapCoreSharedModule.MCLayerReadyStateREADY -import MapCoreSharedModule.MCLayerReadyStateTIMEOUT_ERROR - -actual open class LayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val layer = nativeHandle as? MCLayerInterfaceProtocol - - internal fun asMapCore(): MCLayerInterfaceProtocol? = - nativeHandle as? MCLayerInterfaceProtocol - - actual fun setMaskingObject(maskingObject: MaskingObjectInterface?) { - layer?.setMaskingObject(maskingObject?.asMapCore()) - } - - actual fun update() { - layer?.update() - } - - actual fun buildRenderPasses(): List = - layer?.buildRenderPasses()?.map { RenderPassInterface(it) } ?: emptyList() - - actual fun buildComputePasses(): List = - layer?.buildComputePasses()?.map { ComputePassInterface(it) } ?: emptyList() - - actual fun onAdded(mapInterface: MapInterface, layerIndex: Int) { - layer?.onAdded(mapInterface.asMapCore(), layerIndex) - } - - actual fun onRemoved() { - layer?.onRemoved() - } - - actual fun pause() { - layer?.pause() - } - - actual fun resume() { - layer?.resume() - } - - actual fun hide() { - layer?.hide() - } - - actual fun show() { - layer?.show() - } - - actual fun setAlpha(alpha: Float) { - layer?.setAlpha(alpha) - } - - actual fun getAlpha(): Float = layer?.getAlpha() ?: 0f - - actual fun setScissorRect(scissorRect: RectI?) { - layer?.setScissorRect(scissorRect) - } - - actual fun isReadyToRenderOffscreen(): LayerReadyState = - layer?.isReadyToRenderOffscreen().asShared() - - actual fun enableAnimations(enabled: Boolean) { - layer?.enableAnimations(enabled) - } - - actual fun setErrorManager(errorManager: ErrorManager) { - layer?.setErrorManager(errorManager.asMapCore()) - } - - actual fun forceReload() { - layer?.forceReload() - } - - actual fun setPrimaryRenderTarget(target: RenderTargetInterface?) { - layer?.setPrimaryRenderTarget(target?.asMapCore()) - } -} - -private fun MCLayerReadyState?.asShared(): LayerReadyState = when (this) { - MCLayerReadyStateREADY -> LayerReadyState.READY - MCLayerReadyStateNOT_READY -> LayerReadyState.NOT_READY - MCLayerReadyStateERROR -> LayerReadyState.ERROR - MCLayerReadyStateTIMEOUT_ERROR -> LayerReadyState.TIMEOUT_ERROR - null -> LayerReadyState.NOT_READY - else -> LayerReadyState.NOT_READY -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt deleted file mode 100644 index 15026a78e..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCameraInterfaceImplementation.kt +++ /dev/null @@ -1,245 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCMapCamera3dInterface -import MapCoreSharedModule.MCMapCameraInterface -import MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol -import platform.Foundation.NSNumber -import platform.darwin.NSObject - -actual open class MapCameraInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val camera = nativeHandle as? MCMapCameraInterface - - internal fun asMapCore(): MCMapCameraInterface? = - nativeHandle as? MCMapCameraInterface - - actual companion object { - actual fun create(mapInterface: MapInterface, screenDensityPpi: Float, is3d: Boolean): MapCameraInterface { - val created = MCMapCameraInterface.create(mapInterface.asMapCore(), screenDensityPpi, is3d) - return MapCameraInterface(created) - } - } - - actual fun freeze(freeze: Boolean) { - camera?.freeze(freeze) - } - - actual fun moveToCenterPositionZoom(centerPosition: Coord, zoom: Double, animated: Boolean) { - camera?.moveToCenterPositionZoom(centerPosition, zoom, animated) - } - - actual fun moveToCenterPosition(centerPosition: Coord, animated: Boolean) { - camera?.moveToCenterPosition(centerPosition, animated) - } - - actual fun moveToBoundingBox(boundingBox: RectCoord, paddingPc: Float, animated: Boolean, minZoom: Double?, maxZoom: Double?) { - val minZoomNumber = minZoom?.let { NSNumber(double = it) } - val maxZoomNumber = maxZoom?.let { NSNumber(double = it) } - camera?.moveToBoundingBox(boundingBox, paddingPc, animated, minZoomNumber, maxZoomNumber) - } - - actual fun getCenterPosition(): Coord = requireNotNull(camera?.getCenterPosition()) - - actual fun setZoom(zoom: Double, animated: Boolean) { - camera?.setZoom(zoom, animated) - } - - actual fun getZoom(): Double = requireNotNull(camera?.getZoom()) - - actual fun setRotation(angle: Float, animated: Boolean) { - camera?.setRotation(angle, animated) - } - - actual fun getRotation(): Float = requireNotNull(camera?.getRotation()) - - actual fun setMinZoom(minZoom: Double) { - camera?.setMinZoom(minZoom) - } - - actual fun setMaxZoom(maxZoom: Double) { - camera?.setMaxZoom(maxZoom) - } - - actual fun getMinZoom(): Double = requireNotNull(camera?.getMinZoom()) - - actual fun getMaxZoom(): Double = requireNotNull(camera?.getMaxZoom()) - - actual fun setBounds(bounds: RectCoord) { - camera?.setBounds(bounds) - } - - actual fun getBounds(): RectCoord = requireNotNull(camera?.getBounds()) - - actual fun isInBounds(coords: Coord): Boolean = camera?.isInBounds(coords) ?: false - - actual fun setPaddingLeft(padding: Float) { - camera?.setPaddingLeft(padding) - } - - actual fun setPaddingRight(padding: Float) { - camera?.setPaddingRight(padding) - } - - actual fun setPaddingTop(padding: Float) { - camera?.setPaddingTop(padding) - } - - actual fun setPaddingBottom(padding: Float) { - camera?.setPaddingBottom(padding) - } - - actual fun getVisibleRect(): RectCoord = requireNotNull(camera?.getVisibleRect()) - - actual fun getPaddingAdjustedVisibleRect(): RectCoord = requireNotNull(camera?.getPaddingAdjustedVisibleRect()) - - actual fun getScreenDensityPpi(): Float = requireNotNull(camera?.getScreenDensityPpi()) - - actual fun update() { - camera?.update() - } - - actual fun getInvariantModelMatrix(coordinate: Coord, scaleInvariant: Boolean, rotationInvariant: Boolean): List { - val list = camera?.getInvariantModelMatrix(coordinate, scaleInvariant, rotationInvariant) ?: return emptyList() - return list.mapNotNull { (it as? NSNumber)?.floatValue } - } - - actual fun addListener(listener: MapCameraListenerInterface) { - camera?.addListener(MapCameraListenerProxy(listener)) - } - - actual fun removeListener(listener: MapCameraListenerInterface) { - camera?.removeListener(MapCameraListenerProxy(listener)) - } - - actual fun notifyListenerBoundsChange() { - camera?.notifyListenerBoundsChange() - } - - actual fun coordFromScreenPosition(posScreen: Vec2F): Coord = requireNotNull(camera?.coordFromScreenPosition(posScreen)) - - actual fun coordFromScreenPositionZoom(posScreen: Vec2F, zoom: Float): Coord = - requireNotNull(camera?.coordFromScreenPositionZoom(posScreen, zoom)) - - actual fun screenPosFromCoord(coord: Coord): Vec2F = requireNotNull(camera?.screenPosFromCoord(coord)) - - actual fun screenPosFromCoordZoom(coord: Coord, zoom: Float): Vec2F = - requireNotNull(camera?.screenPosFromCoordZoom(coord, zoom)) - - actual fun mapUnitsFromPixels(distancePx: Double): Double = requireNotNull(camera?.mapUnitsFromPixels(distancePx)) - - actual fun getScalingFactor(): Double = requireNotNull(camera?.getScalingFactor()) - - actual fun coordIsVisibleOnScreen(coord: Coord, paddingPc: Float): Boolean = - camera?.coordIsVisibleOnScreen(coord, paddingPc) ?: false - - actual fun setRotationEnabled(enabled: Boolean) { - camera?.setRotationEnabled(enabled) - } - - actual fun setSnapToNorthEnabled(enabled: Boolean) { - camera?.setSnapToNorthEnabled(enabled) - } - - actual fun setBoundsRestrictWholeVisibleRect(enabled: Boolean) { - camera?.setBoundsRestrictWholeVisibleRect(enabled) - } - - actual fun asCameraInterface(): CameraInterface = CameraInterface(requireNotNull(camera?.asCameraInterface())) - - actual fun getLastVpMatrixD(): List? = - camera?.getLastVpMatrixD()?.mapNotNull { (it as? NSNumber)?.doubleValue } - - actual fun getLastVpMatrix(): List? = - camera?.getLastVpMatrix()?.mapNotNull { (it as? NSNumber)?.floatValue } - - actual fun getLastInverseVpMatrix(): List? = - camera?.getLastInverseVpMatrix()?.mapNotNull { (it as? NSNumber)?.floatValue } - - actual fun getLastVpMatrixViewBounds(): RectCoord? = camera?.getLastVpMatrixViewBounds() - - actual fun getLastVpMatrixRotation(): Float? = camera?.getLastVpMatrixRotation()?.floatValue - - actual fun getLastVpMatrixZoom(): Float? = camera?.getLastVpMatrixZoom()?.floatValue - - actual fun getLastCameraPosition(): Vec3D? = camera?.getLastCameraPosition() - - actual fun asMapCamera3d(): MapCamera3dInterface? = camera?.asMapCamera3d()?.let { MapCamera3dInterface(it) } -} - -private class MapCameraListenerProxy( - private val handler: MapCameraListenerInterface, -) : NSObject(), MCMapCameraListenerInterfaceProtocol { - override fun onVisibleBoundsChanged(visibleBounds: RectCoord, zoom: Double) { - handler.onVisibleBoundsChanged(visibleBounds, zoom) - } - - override fun onRotationChanged(angle: Float) { - handler.onRotationChanged(angle) - } - - override fun onMapInteraction() { - handler.onMapInteraction() - } - - override fun onCameraChange( - viewMatrix: List<*>, - projectionMatrix: List<*>, - origin: MapCoreSharedModule.MCVec3D, - verticalFov: Float, - horizontalFov: Float, - width: Float, - height: Float, - focusPointAltitude: Float, - focusPointPosition: MapCoreSharedModule.MCCoord, - zoom: Float, - ) { - val view = viewMatrix.mapNotNull { (it as? NSNumber)?.floatValue } - val projection = projectionMatrix.mapNotNull { (it as? NSNumber)?.floatValue } - handler.onCameraChange( - viewMatrix = view, - projectionMatrix = projection, - origin = origin, - verticalFov = verticalFov, - horizontalFov = horizontalFov, - width = width, - height = height, - focusPointAltitude = focusPointAltitude, - focusPointPosition = focusPointPosition, - zoom = zoom, - ) - } -} - -actual open class MapCamera3dInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val camera3d = nativeHandle as? MCMapCamera3dInterface - - actual fun getCameraConfig(): Camera3dConfig = - Camera3dConfigFromMapCore(requireNotNull(camera3d?.getCameraConfig())) - - actual fun setCameraConfig( - config: Camera3dConfig, - durationSeconds: Float?, - targetZoom: Float?, - targetCoordinate: Coord?, - ) { - camera3d?.setCameraConfig( - config.asMapCore(), - durationSeconds?.let { NSNumber(float = it) }, - targetZoom?.let { NSNumber(float = it) }, - targetCoordinate, - ) - } -} - -actual open class Camera3dConfigFactory actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - actual companion object { - actual fun getBasicConfig(): Camera3dConfig = - Camera3dConfigFromMapCore(MapCoreSharedModule.MCCamera3dConfigFactory.getBasicConfig()) - - actual fun getRestorConfig(): Camera3dConfig = - Camera3dConfigFromMapCore(MapCoreSharedModule.MCCamera3dConfigFactory.getRestorConfig()) - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt deleted file mode 100644 index e31a8d44a..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreInterop.kt +++ /dev/null @@ -1,12 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapCoreInterop", exact = true) -actual object MapCoreInterop { - actual fun moveToCenter(coord: Coord) { - coord.hashCode() - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt deleted file mode 100644 index 1620f9875..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapCoreTypesIos.kt +++ /dev/null @@ -1,106 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCCameraInterfaceProtocol -import MapCoreSharedModule.MCComputePassInterfaceProtocol -import MapCoreSharedModule.MCErrorManager -import MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol -import MapCoreSharedModule.MCMaskingObjectInterfaceProtocol -import MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol -import MapCoreSharedModule.MCRenderPassInterfaceProtocol -import MapCoreSharedModule.MCRenderTargetInterfaceProtocol -import MapCoreSharedModule.MCRenderingContextInterfaceProtocol -import MapCoreSharedModule.MCSchedulerInterfaceProtocol -import MapCoreSharedModule.MCShaderFactoryInterfaceProtocol -import MapCoreSharedModule.MCTouchHandlerInterfaceProtocol -import MapCoreSharedModule.MCCoordinateConversionHelperInterface - -actual open class GraphicsObjectFactoryInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCGraphicsObjectFactoryInterfaceProtocol? = - nativeHandle as? MCGraphicsObjectFactoryInterfaceProtocol -} - -actual open class ShaderFactoryInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCShaderFactoryInterfaceProtocol? = - nativeHandle as? MCShaderFactoryInterfaceProtocol -} - -actual open class RenderingContextInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCRenderingContextInterfaceProtocol? = - nativeHandle as? MCRenderingContextInterfaceProtocol -} - -actual open class SchedulerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCSchedulerInterfaceProtocol? = - nativeHandle as? MCSchedulerInterfaceProtocol -} - -actual open class TouchHandlerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCTouchHandlerInterfaceProtocol? = - nativeHandle as? MCTouchHandlerInterfaceProtocol -} - -actual open class PerformanceLoggerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCPerformanceLoggerInterfaceProtocol? = - nativeHandle as? MCPerformanceLoggerInterfaceProtocol -} - -actual open class CoordinateConversionHelperInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCCoordinateConversionHelperInterface? = - nativeHandle as? MCCoordinateConversionHelperInterface -} - -actual open class RenderTargetInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCRenderTargetInterfaceProtocol? = - nativeHandle as? MCRenderTargetInterfaceProtocol -} - -actual open class RenderPassInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCRenderPassInterfaceProtocol? = - nativeHandle as? MCRenderPassInterfaceProtocol -} - -actual open class ComputePassInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCComputePassInterfaceProtocol? = - nativeHandle as? MCComputePassInterfaceProtocol -} - -actual open class MaskingObjectInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCMaskingObjectInterfaceProtocol? = - nativeHandle as? MCMaskingObjectInterfaceProtocol -} - -actual open class ErrorManager actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCErrorManager? = - nativeHandle as? MCErrorManager -} - -actual open class CameraInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCCameraInterfaceProtocol? = - nativeHandle as? MCCameraInterfaceProtocol -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt deleted file mode 100644 index c35b5f699..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapDataProviderLocalDataProviderImplementation.kt +++ /dev/null @@ -1,66 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCDataLoaderResult -import MapCoreSharedModule.DJFuture -import MapCoreSharedModule.DJPromise -import MapCoreSharedModule.MCLoaderStatusOK -import MapCoreSharedModule.MCTextureLoaderResult -import MapCoreSharedModule.MCTextureHolderInterfaceProtocol -import MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol -import MapCoreKmp.MapCoreKmpBridge -import kotlinx.cinterop.addressOf -import kotlinx.cinterop.usePinned -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.SupervisorJob -import kotlinx.coroutines.launch -import platform.Foundation.NSData -import platform.Foundation.create -import platform.darwin.NSObject - -internal class MapDataProviderLocalDataProviderImplementation( - private val dataProvider: MapDataProviderProtocol, -) : NSObject(), MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol { - private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default) - - override fun getStyleJson(): String? = dataProvider.getStyleJson() - - override fun loadGeojson(sourceName: String, url: String): DJFuture { - val promise = DJPromise() - scope.launch { - val result = runCatching { dataProvider.loadGeojson(sourceName, url) }.getOrNull() - val data = result?.toNSData() - promise.setValue(MCDataLoaderResult(data = data, etag = null, status = MCLoaderStatusOK, errorCode = null)) - } - return promise.getFuture() - } - - override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): DJFuture { - val promise = DJPromise() - scope.launch { - val result = runCatching { dataProvider.loadSpriteAsync(spriteId, url, scale) }.getOrNull() - val holder = result?.toNSData() - ?.let { MapCoreKmpBridge.createTextureHolderWithData(it) as? MCTextureHolderInterfaceProtocol } - promise.setValue(MCTextureLoaderResult(data = holder, etag = null, status = MCLoaderStatusOK, errorCode = null)) - } - return promise.getFuture() - } - - override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): DJFuture { - val promise = DJPromise() - scope.launch { - val result = runCatching { dataProvider.loadSpriteJsonAsync(spriteId, url, scale) }.getOrNull() - val data = result?.toNSData() - promise.setValue(MCDataLoaderResult(data = data, etag = null, status = MCLoaderStatusOK, errorCode = null)) - } - return promise.getFuture() - } -} - -@OptIn(kotlinx.cinterop.BetaInteropApi::class) -private fun ByteArray.toNSData(): NSData { - if (isEmpty()) return NSData() - return usePinned { pinned -> - NSData.create(bytes = pinned.addressOf(0), length = size.toULong()) - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt deleted file mode 100644 index 391a90938..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapFactoryImplementation.kt +++ /dev/null @@ -1,124 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - -import MapCoreKmp.MapCoreKmpBridge -import MapCoreSharedModule.MCFontLoaderInterfaceProtocol -import MapCoreSharedModule.MCLoaderInterfaceProtocol -import platform.Foundation.NSBundle -import platform.Foundation.NSLog - -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapFactory", exact = true) -actual abstract class MapFactory actual constructor( - platformContext: Any?, - coroutineScope: kotlinx.coroutines.CoroutineScope?, - lifecycle: Any?, -) { - protected val platformContext: Any? = platformContext - protected val coroutineScope: kotlinx.coroutines.CoroutineScope? = coroutineScope - protected val lifecycle: Any? = lifecycle - - actual abstract fun createVectorLayer( - layerName: String, - dataProvider: MapDataProviderProtocol, - ): MapVectorLayer? - actual abstract fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? - actual abstract fun createGpsLayer(): MapGpsLayer? - - actual companion object { - actual fun create( - platformContext: Any?, - coroutineScope: kotlinx.coroutines.CoroutineScope?, - lifecycle: Any?, - ): MapFactory = MapFactoryImpl(platformContext, coroutineScope, lifecycle) - } - - protected fun findMapBundle(): NSBundle? { - return sharedResourcesBundle() - } - - protected fun logMissing(resource: String) { - NSLog("MapFactory: missing %s", resource) - } - - protected fun sharedResourcesBundle(): NSBundle? { - return MapResourceBundleRegistry.bundleProvider?.invoke() - } - -} - -private class MapFactoryImpl( - platformContext: Any?, - coroutineScope: kotlinx.coroutines.CoroutineScope?, - lifecycle: Any?, -) : MapFactory(platformContext, coroutineScope, lifecycle) { - override fun createVectorLayer( - layerName: String, - dataProvider: MapDataProviderProtocol, - ): MapVectorLayer? { - val styleJson = dataProvider.getStyleJson() ?: run { - logMissing("style json for $layerName") - return null - } - val bundle = findMapBundle() ?: run { - logMissing("bundle for MapFonts") - return null - } - val fontLoader = MapCoreKmpBridge.createFontLoaderWithBundle(bundle) as? MCFontLoaderInterfaceProtocol - ?: run { - logMissing("font loader") - return null - } - val loader = MapCoreKmpBridge.createTextureLoader() as? MCLoaderInterfaceProtocol - ?: run { - logMissing("texture loader") - return null - } - val loaders = listOf(loader) - val provider = MapDataProviderLocalDataProviderImplementation(dataProvider) - val layer = Tiled2dMapVectorLayerInterface.createExplicitly( - layerName = layerName, - styleJson = styleJson, - localStyleJson = true, - loaders = loaders.map { LoaderInterface(it) }, - fontLoader = FontLoaderInterface(fontLoader), - localDataProvider = Tiled2dMapVectorLayerLocalDataProviderInterface(provider), - customZoomInfo = null, - symbolDelegate = null, - sourceUrlParams = null, - ) ?: return null - return MapVectorLayer(layer) - } - - override fun createRasterLayer(config: MapTiled2dMapLayerConfig): MapRasterLayer? { - val loader = MapCoreKmpBridge.createTextureLoader() as? MCLoaderInterfaceProtocol - ?: run { - logMissing("texture loader") - return null - } - val layer = Tiled2dMapRasterLayerInterface.create( - layerConfig = config, - loaders = listOf(LoaderInterface(loader)), - ) ?: return null - return MapRasterLayer(layer) - } - - override fun createGpsLayer(): MapGpsLayer? { - return MapGpsLayerImpl.create() - } -} - -private val fontNames = listOf( - "Frutiger Neue Bold", - "Frutiger Neue Condensed Bold", - "Frutiger Neue Condensed Medium", - "Frutiger Neue Condensed Regular", - "Frutiger Neue Italic", - "Frutiger Neue LT Condensed Bold", - "Frutiger Neue Light", - "Frutiger Neue Medium", - "Frutiger Neue Regular", - "FrutigerLTStd-Roman", -) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt deleted file mode 100644 index 1f834a1e3..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapGpsLayerImplementation.kt +++ /dev/null @@ -1,178 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import LayerGpsSharedModule.MCGpsLayerCallbackInterfaceProtocol -import LayerGpsSharedModule.MCGpsLayerInterface -import LayerGpsSharedModule.MCGpsMode -import LayerGpsSharedModule.MCGpsModeDISABLED -import LayerGpsSharedModule.MCGpsModeFOLLOW -import LayerGpsSharedModule.MCGpsModeFOLLOW_AND_TURN -import LayerGpsSharedModule.MCGpsModeSTANDARD -import LayerGpsSharedModule.MCGpsStyleInfoInterface -import LayerGpsSharedModule.MCColor -import LayerGpsSharedModule.MCTextureHolderInterfaceProtocol as GpsTextureHolderInterfaceProtocol -import MapCoreKmp.MapCoreKmpBridge -import MapCoreSharedModule.MCCoordinateSystemIdentifiers -import io.openmobilemaps.mapscore.kmp.feature.map.model.GpsMode -import kotlinx.cinterop.useContents -import platform.CoreLocation.CLHeading -import platform.CoreLocation.CLLocation -import platform.CoreLocation.CLLocationManager -import platform.CoreLocation.CLLocationManagerDelegateProtocol -import platform.darwin.NSObject -import platform.UIKit.UIImage -import platform.UIKit.UIImagePNGRepresentation - -actual abstract class MapGpsLayer actual constructor(nativeHandle: Any?) : LayerInterface( - (nativeHandle as? MCGpsLayerInterface)?.asLayerInterface(), -) { - actual abstract fun setMode(mode: GpsMode) - actual abstract fun getMode(): GpsMode - actual abstract fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) - actual abstract fun notifyPermissionGranted() - actual abstract fun lastLocation(): Coord? - - actual companion object { - actual fun create(platformContext: Any?, lifecycle: Any?): MapGpsLayer? { - return MapGpsLayerImpl.create() - } - } -} - -class MapGpsLayerImpl private constructor( - private val gpsLayer: MCGpsLayerInterface, -) : MapGpsLayer(gpsLayer) { - private val locationManager = CLLocationManager() - private val locationDelegate = GpsLocationDelegate(this) - private val callbackHandler = GpsLayerCallbackHandler(this) - private var modeListener: ((GpsMode) -> Unit)? = null - private var lastKnownLocation: Coord? = null - - init { - gpsLayer.setCallbackHandler(callbackHandler) - gpsLayer.enableHeading(true) - locationManager.delegate = locationDelegate - locationManager.desiredAccuracy = platform.CoreLocation.kCLLocationAccuracyBest - locationManager.headingFilter = 1.0 - } - - override fun setMode(mode: GpsMode) { - gpsLayer.setMode(mode.asLayerMode()) - } - - override fun getMode(): GpsMode = gpsLayer.getMode().asSharedMode() - - override fun setOnModeChangedListener(listener: ((GpsMode) -> Unit)?) { - modeListener = listener - } - - override fun notifyPermissionGranted() { - locationManager.startUpdatingLocation() - locationManager.startUpdatingHeading() - } - - override fun lastLocation(): Coord? = lastKnownLocation - - internal fun updateLocation(location: CLLocation) { - val coord = location.coordinate.useContents { - GpsCoord( - systemIdentifier = MCCoordinateSystemIdentifiers.EPSG4326(), - x = longitude, - y = latitude, - z = location.altitude, - ) - } - gpsLayer.setDrawPoint(shouldDrawHeading()) - gpsLayer.setDrawHeading(shouldDrawHeading()) - gpsLayer.updatePosition(coord, horizontalAccuracyM = location.horizontalAccuracy) - lastKnownLocation = Coord( - systemIdentifier = coord.systemIdentifier(), - x = coord.x(), - y = coord.y(), - z = coord.z(), - ) - } - - internal fun updateHeading(heading: Double) { - gpsLayer.updateHeading(heading.toFloat()) - } - - internal fun handleModeChanged(mode: MCGpsMode) { - modeListener?.invoke(mode.asSharedMode()) - } - - private fun shouldDrawHeading(): Boolean = true - - companion object { - fun create(): MapGpsLayerImpl? { - val layer = MCGpsLayerInterface.create(styleInfo = defaultStyle()) ?: return null - return MapGpsLayerImpl(layer) - } - } -} - -private class GpsLayerCallbackHandler( - private val layer: MapGpsLayerImpl, -) : NSObject(), MCGpsLayerCallbackInterfaceProtocol { - override fun modeDidChange(mode: MCGpsMode) { - layer.handleModeChanged(mode) - } - - override fun onPointClick(coordinate: GpsCoord) { - // no-op - } -} - -private class GpsLocationDelegate( - private val layer: MapGpsLayerImpl, -) : NSObject(), CLLocationManagerDelegateProtocol { - override fun locationManager(manager: CLLocationManager, didUpdateLocations: List<*>) { - val location = didUpdateLocations.lastOrNull() as? CLLocation ?: return - layer.updateLocation(location) - } - - override fun locationManager(manager: CLLocationManager, didUpdateHeading: CLHeading) { - layer.updateHeading(didUpdateHeading.trueHeading) - } - - override fun locationManager(manager: CLLocationManager, didFailWithError: platform.Foundation.NSError) { - layer.setMode(GpsMode.DISABLED) - } -} - -private fun GpsMode.asLayerMode(): MCGpsMode = when (this) { - GpsMode.DISABLED -> MCGpsModeDISABLED - GpsMode.STANDARD -> MCGpsModeSTANDARD - GpsMode.FOLLOW -> MCGpsModeFOLLOW -} - -private fun MCGpsMode.asSharedMode(): GpsMode = when (this) { - MCGpsModeDISABLED -> GpsMode.DISABLED - MCGpsModeSTANDARD -> GpsMode.STANDARD - MCGpsModeFOLLOW -> GpsMode.FOLLOW - MCGpsModeFOLLOW_AND_TURN -> GpsMode.FOLLOW - else -> GpsMode.STANDARD -} - -private fun defaultStyle(): MCGpsStyleInfoInterface? { - val pointTexture = loadTexture("ic_gps_point") - val headingTexture = loadTexture("ic_gps_direction") - val accuracyColor = MCColor(r = 112f / 255f, g = 173f / 255f, b = 204f / 255f, a = 0.2f) - return MCGpsStyleInfoInterface.create(pointTexture, headingTexture = headingTexture, courseTexture = null, accuracyColor = accuracyColor) -} - -private fun loadTexture(name: String): GpsTextureHolderInterfaceProtocol? { - val bundle = findBundleWithImage(name) ?: return null - val image = UIImage.imageNamed(name, inBundle = bundle, compatibleWithTraitCollection = null) ?: return null - val data = UIImagePNGRepresentation(image) ?: return null - return MapCoreKmpBridge.createTextureHolderWithData(data) as? GpsTextureHolderInterfaceProtocol -} - -private fun findBundleWithImage(name: String): platform.Foundation.NSBundle? { - val bundles = (platform.Foundation.NSBundle.allBundles + platform.Foundation.NSBundle.allFrameworks) - .mapNotNull { it as? platform.Foundation.NSBundle } - for (bundle in bundles) { - val image = UIImage.imageNamed(name, inBundle = bundle, compatibleWithTraitCollection = null) - if (image != null) return bundle - } - return null -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt deleted file mode 100644 index 4a92d8a4c..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapInterfaceImplementation.kt +++ /dev/null @@ -1,210 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCMapCallbackInterfaceProtocol -import MapCoreSharedModule.MCMapInterface -import MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol -import MapCoreSharedModule.MCLayerReadyState -import MapCoreSharedModule.MCLayerReadyStateERROR -import MapCoreSharedModule.MCLayerReadyStateNOT_READY -import MapCoreSharedModule.MCLayerReadyStateREADY -import MapCoreSharedModule.MCLayerReadyStateTIMEOUT_ERROR -import platform.darwin.NSObject - -actual open class MapInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val map = nativeHandle as? MCMapInterface - - internal fun asMapCore(): MCMapInterface? = - nativeHandle as? MCMapInterface - - actual companion object { - actual fun create( - graphicsFactory: GraphicsObjectFactoryInterface, - shaderFactory: ShaderFactoryInterface, - renderingContext: RenderingContextInterface, - mapConfig: MapConfig, - scheduler: SchedulerInterface, - pixelDensity: Float, - is3d: Boolean, - ): MapInterface { - val created = MCMapInterface.create( - graphicsFactory.asMapCore(), - shaderFactory.asMapCore(), - renderingContext.asMapCore(), - mapConfig, - scheduler.asMapCore(), - pixelDensity, - is3d, - ) - return MapInterface(created) - } - - actual fun createWithOpenGl( - mapConfig: MapConfig, - scheduler: SchedulerInterface, - pixelDensity: Float, - is3d: Boolean, - ): MapInterface { - val created = MCMapInterface.createWithOpenGl( - mapConfig, - scheduler.asMapCore(), - pixelDensity, - is3d, - ) - return MapInterface(created) - } - } - - actual fun setCallbackHandler(callbackInterface: MapCallbackInterface?) { - val proxy = callbackInterface?.let { MapCallbackInterfaceProxy(it) } - map?.setCallbackHandler(proxy) - } - - actual fun getGraphicsObjectFactory(): GraphicsObjectFactoryInterface = - GraphicsObjectFactoryInterface(map?.getGraphicsObjectFactory()) - - actual fun getShaderFactory(): ShaderFactoryInterface = - ShaderFactoryInterface(map?.getShaderFactory()) - - actual fun getScheduler(): SchedulerInterface = - SchedulerInterface(map?.getScheduler()) - - actual fun getRenderingContext(): RenderingContextInterface = - RenderingContextInterface(map?.getRenderingContext()) - - actual fun getMapConfig(): MapConfig = requireNotNull(map?.getMapConfig()) - - actual fun getCoordinateConverterHelper(): CoordinateConversionHelperInterface = - CoordinateConversionHelperInterface(map?.getCoordinateConverterHelper()) - - actual fun setCamera(camera: MapCameraInterface) { - map?.setCamera(camera.asMapCore()) - } - - actual fun getCamera(): MapCameraInterface = MapCameraInterface(map?.getCamera()) - - actual fun setTouchHandler(touchHandler: TouchHandlerInterface) { - map?.setTouchHandler(touchHandler.asMapCore()) - } - - actual fun getTouchHandler(): TouchHandlerInterface = - TouchHandlerInterface(map?.getTouchHandler()) - - actual fun setPerformanceLoggers(performanceLoggers: List) { - map?.setPerformanceLoggers(performanceLoggers.mapNotNull { it.asMapCore() }) - } - - actual fun getPerformanceLoggers(): List = - map?.getPerformanceLoggers()?.map { PerformanceLoggerInterface(it) } ?: emptyList() - - actual fun getLayers(): List = - map?.getLayers()?.map { LayerInterface(it) } ?: emptyList() - - actual fun getLayersIndexed(): List = - map?.getLayersIndexed()?.map { IndexedLayerInterface(it) } ?: emptyList() - - actual fun addLayer(layer: LayerInterface) { - map?.addLayer(layer.asMapCore()) - } - - actual fun insertLayerAt(layer: LayerInterface, atIndex: Int) { - map?.insertLayerAt(layer.asMapCore(), atIndex) - } - - actual fun insertLayerAbove(layer: LayerInterface, above: LayerInterface) { - map?.insertLayerAbove(layer.asMapCore(), above.asMapCore()) - } - - actual fun insertLayerBelow(layer: LayerInterface, below: LayerInterface) { - map?.insertLayerBelow(layer.asMapCore(), below.asMapCore()) - } - - actual fun removeLayer(layer: LayerInterface) { - map?.removeLayer(layer.asMapCore()) - } - - actual fun setViewportSize(size: Vec2I) { - map?.setViewportSize(size) - } - - actual fun setBackgroundColor(color: Color) { - map?.setBackgroundColor(color) - } - - actual fun is3d(): Boolean = map?.is3d() ?: false - - actual fun invalidate() { - map?.invalidate() - } - - actual fun resetIsInvalidated() { - map?.resetIsInvalidated() - } - - actual fun prepare() { - map?.prepare() - } - - actual fun getNeedsCompute(): Boolean = map?.getNeedsCompute() ?: false - - actual fun drawOffscreenFrame(target: RenderTargetInterface) { - map?.drawOffscreenFrame(target.asMapCore()) - } - - actual fun drawFrame() { - map?.drawFrame() - } - - actual fun compute() { - map?.compute() - } - - actual fun resume() { - map?.resume() - } - - actual fun pause() { - map?.pause() - } - - actual fun destroy() { - map?.destroy() - } - - actual fun drawReadyFrame(bounds: RectCoord, paddingPc: Float, timeout: Float, callbacks: MapReadyCallbackInterface) { - val proxy = MapReadyCallbackInterfaceProxy(callbacks) - map?.drawReadyFrame(bounds, paddingPc, timeout, proxy) - } - - actual fun forceReload() { - map?.forceReload() - } -} - -private class MapCallbackInterfaceProxy( - private val handler: MapCallbackInterface, -) : NSObject(), MCMapCallbackInterfaceProtocol { - override fun invalidate() { - handler.invalidate() - } - - override fun onMapResumed() { - handler.onMapResumed() - } -} - -private class MapReadyCallbackInterfaceProxy( - private val handler: MapReadyCallbackInterface, -) : NSObject(), MCMapReadyCallbackInterfaceProtocol { - override fun stateDidUpdate(state: MCLayerReadyState) { - handler.stateDidUpdate(state.asShared()) - } -} - -private fun MCLayerReadyState.asShared(): LayerReadyState = when (this) { - MCLayerReadyStateREADY -> LayerReadyState.READY - MCLayerReadyStateNOT_READY -> LayerReadyState.NOT_READY - MCLayerReadyStateERROR -> LayerReadyState.ERROR - MCLayerReadyStateTIMEOUT_ERROR -> LayerReadyState.TIMEOUT_ERROR - else -> LayerReadyState.NOT_READY -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt deleted file mode 100644 index 3c626bc12..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapRasterLayerImplementation.kt +++ /dev/null @@ -1,15 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface - -actual open class MapRasterLayer actual constructor( - nativeHandle: Any?, -) : LayerInterface( - (nativeHandle as? MCTiled2dMapRasterLayerInterface)?.asLayerInterface(), -) { - private val layer = nativeHandle as? MCTiled2dMapRasterLayerInterface - - actual constructor(layerInterface: Tiled2dMapRasterLayerInterface) : this(layerInterface.asMapCore()) - - internal fun rasterLayerInterface(): MCTiled2dMapRasterLayerInterface? = layer -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt deleted file mode 100644 index 33e68d396..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapResourceBundleRegistry.kt +++ /dev/null @@ -1,7 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import platform.Foundation.NSBundle - -object MapResourceBundleRegistry { - var bundleProvider: (() -> NSBundle?)? = null -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt deleted file mode 100644 index a2425474c..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapTiled2dMapLayerConfigImplementation.kt +++ /dev/null @@ -1,100 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCCoordinateConversionHelperInterface -import MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol -import MapCoreSharedModule.MCTiled2dMapVectorSettings -import MapCoreSharedModule.MCTiled2dMapZoomInfo -import MapCoreSharedModule.MCTiled2dMapZoomLevelInfo -import kotlin.math.pow -import platform.darwin.NSObject - -class MapTiled2dMapLayerConfigImplementation( - private val config: MapTiled2dMapLayerConfig, -) : NSObject(), MCTiled2dMapLayerConfigProtocol { - private val coordinateConverter = MCCoordinateConversionHelperInterface.independentInstance() - - override fun getCoordinateSystemIdentifier(): Int = config.coordinateSystemIdentifier - - override fun getTileUrl(x: Int, y: Int, t: Int, zoom: Int): String { - var url = config.urlFormat - val tilesPerAxis = 2.0.pow(zoom.toDouble()) - - val bounds = config.bounds - val wmMinX = bounds.topLeft.x - val wmMaxX = bounds.bottomRight.x - val wmMaxY = bounds.topLeft.y - val wmMinY = bounds.bottomRight.y - - val totalWidth = wmMaxX - wmMinX - val totalHeight = wmMaxY - wmMinY - - val tileWidth = totalWidth / tilesPerAxis - val tileHeight = totalHeight / tilesPerAxis - - val wmMinTileX = wmMinX + x.toDouble() * tileWidth - val wmMaxTileX = wmMinX + (x + 1.0) * tileWidth - val wmMaxTileY = wmMaxY - y.toDouble() * tileHeight - val wmMinTileY = wmMaxY - (y + 1.0) * tileHeight - - val wmTopLeft = Coord( - systemIdentifier = config.coordinateSystemIdentifier, - x = wmMinTileX, - y = wmMaxTileY, - z = 0.0, - ) - val wmBottomRight = Coord( - systemIdentifier = config.coordinateSystemIdentifier, - x = wmMaxTileX, - y = wmMinTileY, - z = 0.0, - ) - - val targetSystem = config.bboxCoordinateSystemIdentifier - val topLeft = coordinateConverter?.convert(targetSystem, coordinate = wmTopLeft) ?: wmTopLeft - val bottomRight = coordinateConverter?.convert(targetSystem, coordinate = wmBottomRight) ?: wmBottomRight - - val bboxString = "${topLeft.x},${bottomRight.y},${bottomRight.x},${topLeft.y}" - - url = url.replace("{bbox}", bboxString) - url = url.replace("{width}", config.tileWidth.toString()) - url = url.replace("{height}", config.tileHeight.toString()) - url = url.replace("{WIDTH}", config.tileWidth.toString()) - url = url.replace("{HEIGHT}", config.tileHeight.toString()) - return url - } - - override fun getZoomLevelInfos(): List { - return (config.minZoomLevel..config.maxZoomLevel).map { getZoomLevelInfo(it) } - } - - override fun getVirtualZoomLevelInfos(): List { - val minZoom = config.minZoomLevel - if (minZoom <= 0) return emptyList() - return (0 until minZoom).map { getZoomLevelInfo(it) } - } - - override fun getZoomInfo(): MCTiled2dMapZoomInfo { - return config.zoomInfo - } - - override fun getLayerName(): String = config.layerName - - override fun getVectorSettings(): MCTiled2dMapVectorSettings? = null - - override fun getBounds(): RectCoord? = config.bounds - - private fun getZoomLevelInfo(zoomLevel: Int): MCTiled2dMapZoomLevelInfo { - val tileCount = 2.0.pow(zoomLevel.toDouble()) - val zoom = config.baseZoom / tileCount - val width = config.baseWidth / tileCount - return MCTiled2dMapZoomLevelInfo( - zoom = zoom, - tileWidthLayerSystemUnits = width.toFloat(), - numTilesX = tileCount.toInt(), - numTilesY = tileCount.toInt(), - numTilesT = 1, - zoomLevelIdentifier = zoomLevel, - bounds = config.bounds, - ) - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt deleted file mode 100644 index d0aa79ae3..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerImplementation.kt +++ /dev/null @@ -1,42 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface -import MapCoreSharedModule.MCVectorLayerFeatureInfoValue -import platform.Foundation.NSNumber - -actual class MapVectorLayer actual constructor(nativeHandle: Any?) : LayerInterface( - (nativeHandle as? MCTiled2dMapVectorLayerInterface)?.asLayerInterface(), -) { - private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface - - actual constructor(layerInterface: Tiled2dMapVectorLayerInterface) : this(layerInterface.asMapCore()) - - actual fun setSelectionDelegate(delegate: MapVectorLayerSelectionCallback?) { - val proxy = delegate?.let { MapVectorLayerSelectionCallbackProxy(it) } - layer?.setSelectionDelegate(proxy) - } - - actual fun setGlobalState(state: Map) { - val mapped = mutableMapOf() - state.forEach { (key, value) -> - mapped[key] = value.asMapCore() - } - layer?.setGlobalState(mapped) - } - - internal fun vectorLayerInterface(): MCTiled2dMapVectorLayerInterface? = layer -} - -private fun MapVectorLayerFeatureInfoValue.asMapCore(): MCVectorLayerFeatureInfoValue { - val floatList = listFloatVal?.map { NSNumber(float = it) } - val stringList = listStringVal?.map { it } - return MCVectorLayerFeatureInfoValue( - stringVal = stringVal, - doubleVal = doubleVal?.let { NSNumber(double = it) }, - intVal = intVal?.let { NSNumber(longLong = it) }, - boolVal = boolVal?.let { NSNumber(bool = it) }, - colorVal = colorVal, - listFloatVal = floatList, - listStringVal = stringList, - ) -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt deleted file mode 100644 index b9ac7bff2..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerLocalDataProviderFactory.kt +++ /dev/null @@ -1,14 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlinx.coroutines.CoroutineScope - -actual object MapVectorLayerLocalDataProviderFactory { - actual fun create( - dataProvider: MapDataProviderProtocol, - coroutineScope: CoroutineScope?, - ): Tiled2dMapVectorLayerLocalDataProviderInterface { - return Tiled2dMapVectorLayerLocalDataProviderInterface( - MapDataProviderLocalDataProviderImplementation(dataProvider), - ) - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt deleted file mode 100644 index fcba8bdba..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapVectorLayerSelectionCallbackProxy.kt +++ /dev/null @@ -1,71 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - -import MapCoreSharedModule.MCVectorLayerFeatureInfo -import MapCoreSharedModule.MCVectorLayerFeatureInfoValue -import MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol -import platform.Foundation.NSNumber -import platform.darwin.NSObject - -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapVectorLayerSelectionCallbackProxy", exact = true) -actual class MapVectorLayerSelectionCallbackProxy actual constructor( - handler: MapVectorLayerSelectionCallback, -) : NSObject(), MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol { - actual val handler: MapVectorLayerSelectionCallback = handler - override fun didSelectFeature(featureInfo: MCVectorLayerFeatureInfo, layerIdentifier: String, coord: Coord): Boolean { - val sharedFeatureInfo = featureInfo.asShared() - return handler.didSelectFeature(featureInfo = sharedFeatureInfo, layerIdentifier = layerIdentifier, coord = coord) - } - - override fun didMultiSelectLayerFeatures( - featureInfos: List<*>, - layerIdentifier: String, - coord: Coord, - ): Boolean { - val sharedFeatureInfos = featureInfos.mapNotNull { it as? MCVectorLayerFeatureInfo } - .map { it.asShared() } - return handler.didMultiSelectLayerFeatures( - featureInfos = sharedFeatureInfos, - layerIdentifier = layerIdentifier, - coord = coord, - ) - } - - override fun didClickBackgroundConfirmed(coord: Coord): Boolean { - return handler.didClickBackgroundConfirmed(coord = coord) - } -} - -private fun MCVectorLayerFeatureInfo.asShared(): MapVectorLayerFeatureInfo { - val props = HashMap() - for (entry in properties.entries) { - val key = entry.key as? String ?: continue - val value = entry.value as? MCVectorLayerFeatureInfoValue ?: continue - props[key] = value.asShared() - } - return MapVectorLayerFeatureInfo( - identifier = identifier, - properties = props, - ) -} - -private fun MCVectorLayerFeatureInfoValue.asShared(): MapVectorLayerFeatureInfoValue { - val floatList = listFloatVal - ?.mapNotNull { (it as? NSNumber)?.floatValue } - ?.let { ArrayList(it) } - val stringList = listStringVal - ?.mapNotNull { it as? String } - ?.let { ArrayList(it) } - return MapVectorLayerFeatureInfoValue( - stringVal = stringVal, - doubleVal = doubleVal?.doubleValue, - intVal = intVal?.longLongValue, - boolVal = boolVal?.boolValue, - colorVal = colorVal, - listFloatVal = floatList, - listStringVal = stringList, - ) -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt deleted file mode 100644 index 0bed9f2ea..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/MapViewWrapper.kt +++ /dev/null @@ -1,20 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import kotlin.experimental.ExperimentalObjCName -import kotlin.native.ObjCName - -import MapCoreSharedModule.MCMapInterface -import platform.UIKit.UIView - -actual typealias PlatformMapView = UIView - -@OptIn(ExperimentalObjCName::class) -@ObjCName("MapViewWrapper", exact = true) -actual class MapViewWrapper actual constructor() { - private val mapView = MCMapViewObjC() - @Suppress("CAST_NEVER_SUCCEEDS") - private val mapInterfaceImplementation = MapInterface(mapView.mapInterface as MCMapInterface) - - actual val view: UIView = mapView - actual val mapInterface: MapInterface = mapInterfaceImplementation -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt deleted file mode 100644 index 18243138a..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RecordTypealiases.kt +++ /dev/null @@ -1,17 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCMapConfig as MapCoreMapConfig -import MapCoreSharedModule.MCMapCoordinateSystem as MapCoreMapCoordinateSystem -import MapCoreSharedModule.MCVec2F as MapCoreVec2F -import MapCoreSharedModule.MCVec2I as MapCoreVec2I -import MapCoreSharedModule.MCVec3D as MapCoreVec3D -import MapCoreSharedModule.MCRectI as MapCoreRectI -import MapCoreSharedModule.MCTiled2dMapZoomInfo as MapCoreTiled2dMapZoomInfo - -actual typealias Vec2F = MapCoreVec2F -actual typealias Vec2I = MapCoreVec2I -actual typealias Vec3D = MapCoreVec3D -actual typealias RectI = MapCoreRectI -actual typealias MapConfig = MapCoreMapConfig -actual typealias MapCoordinateSystem = MapCoreMapCoordinateSystem -actual typealias Tiled2dMapZoomInfo = MapCoreTiled2dMapZoomInfo diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt deleted file mode 100644 index 5d87abc56..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/RectCoord.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCRectCoord - -actual typealias RectCoord = MCRectCoord diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt deleted file mode 100644 index a602a105c..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapRasterLayerInterface.kt +++ /dev/null @@ -1,24 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCTiled2dMapRasterLayerInterface - -actual open class Tiled2dMapRasterLayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCTiled2dMapRasterLayerInterface? = - nativeHandle as? MCTiled2dMapRasterLayerInterface - - actual companion object { - actual fun create( - layerConfig: MapTiled2dMapLayerConfig, - loaders: List, - ): Tiled2dMapRasterLayerInterface? { - val typedLoaders = loaders.map { requireNotNull(it.asMapCore()) } - val layer = MCTiled2dMapRasterLayerInterface.create( - MapTiled2dMapLayerConfigImplementation(layerConfig), - loaders = typedLoaders, - ) - return layer?.let { Tiled2dMapRasterLayerInterface(it) } - } - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt deleted file mode 100644 index ba93843da..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerInterface.kt +++ /dev/null @@ -1,46 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCTiled2dMapVectorLayerInterface -import platform.Foundation.NSNumber - -actual open class Tiled2dMapVectorLayerInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCTiled2dMapVectorLayerInterface? = - nativeHandle as? MCTiled2dMapVectorLayerInterface - - actual companion object { - actual fun createExplicitly( - layerName: String, - styleJson: String?, - localStyleJson: Boolean?, - loaders: List, - fontLoader: FontLoaderInterface?, - localDataProvider: Tiled2dMapVectorLayerLocalDataProviderInterface?, - customZoomInfo: Tiled2dMapZoomInfo?, - symbolDelegate: Tiled2dMapVectorLayerSymbolDelegateInterface?, - sourceUrlParams: Map?, - ): Tiled2dMapVectorLayerInterface? { - val typedLoaders = loaders.map { requireNotNull(it.asMapCore()) } - val typedFontLoader = fontLoader?.asMapCore() - val typedLocalDataProvider = localDataProvider?.asMapCore() - val typedZoomInfo = customZoomInfo - val typedSymbolDelegate = symbolDelegate?.asMapCore() - val localStyleJsonNumber = localStyleJson?.let { NSNumber(bool = it) } - @Suppress("UNCHECKED_CAST") - val typedSourceUrlParams = sourceUrlParams?.let { it as Map } - val layer = MCTiled2dMapVectorLayerInterface.createExplicitly( - layerName = layerName, - styleJson = styleJson, - localStyleJson = localStyleJsonNumber, - loaders = typedLoaders, - fontLoader = typedFontLoader, - localDataProvider = typedLocalDataProvider, - customZoomInfo = typedZoomInfo, - symbolDelegate = typedSymbolDelegate, - sourceUrlParams = typedSourceUrlParams, - ) - return layer?.let { Tiled2dMapVectorLayerInterface(it) } - } - } -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt deleted file mode 100644 index 0aa64844e..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/core/feature/map/interop/Tiled2dMapVectorLayerTypesIos.kt +++ /dev/null @@ -1,34 +0,0 @@ -package io.openmobilemaps.mapscore.kmp.feature.map.interop - -import MapCoreSharedModule.MCFontLoaderInterfaceProtocol -import MapCoreSharedModule.MCLoaderInterfaceProtocol -import MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol -import MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol - -actual open class LoaderInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCLoaderInterfaceProtocol? = - nativeHandle as? MCLoaderInterfaceProtocol -} - -actual open class FontLoaderInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCFontLoaderInterfaceProtocol? = - nativeHandle as? MCFontLoaderInterfaceProtocol -} - -actual open class Tiled2dMapVectorLayerLocalDataProviderInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol? = - nativeHandle as? MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol -} - -actual open class Tiled2dMapVectorLayerSymbolDelegateInterface actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - - internal fun asMapCore(): MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol? = - nativeHandle as? MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol -} From 931ee5f93af0e7fe79401ebe5ff5f5fcd11bf73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 08:22:05 +0100 Subject: [PATCH 46/63] improved spmforkmp setup --- build.gradle.kts | 1 + .../MapCoreKmp/MapCoreKmpBridge.swift | 0 .../frankois944/spmForKmp/SpmForKmpPlugin.kt | 0 .../definition/PackageRootDefinitionExtension.kt | 0 .../CompileSwiftPackageTask.kt | 0 .../apple/compileSwiftPackage/ConfigureTask.kt | 0 kmp/swift/MapCoreKmp/Bundle+Shared.swift | 7 ------- kmp/swift/MapCoreKmp/StartYourBridgeHere.swift | 15 --------------- src/swift/MapCoreKmp/StartYourBridgeHere.swift | 15 --------------- 9 files changed, 1 insertion(+), 37 deletions(-) rename {src/swift => kmp}/MapCoreKmp/MapCoreKmpBridge.swift (100%) rename {src/swift => kmp}/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt (100%) rename {src/swift => kmp}/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt (100%) rename {src/swift => kmp}/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt (100%) rename {src/swift => kmp}/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt (100%) delete mode 100644 kmp/swift/MapCoreKmp/Bundle+Shared.swift delete mode 100644 kmp/swift/MapCoreKmp/StartYourBridgeHere.swift delete mode 100644 src/swift/MapCoreKmp/StartYourBridgeHere.swift diff --git a/build.gradle.kts b/build.gradle.kts index 760c870a5..4a0a62478 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -117,6 +117,7 @@ kotlin { } } iosTarget.swiftPackageConfig(cinteropName = mapCoreCinteropName) { + customPackageSourcePath = "$mapCoreCheckoutPath/kmp" minIos = "16.4" debug = mapCoreSpmBuildType == "debug" bridgeSettings { diff --git a/src/swift/MapCoreKmp/MapCoreKmpBridge.swift b/kmp/MapCoreKmp/MapCoreKmpBridge.swift similarity index 100% rename from src/swift/MapCoreKmp/MapCoreKmpBridge.swift rename to kmp/MapCoreKmp/MapCoreKmpBridge.swift diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt similarity index 100% rename from src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt rename to kmp/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt similarity index 100% rename from src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt rename to kmp/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt similarity index 100% rename from src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt rename to kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt diff --git a/src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt similarity index 100% rename from src/swift/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt rename to kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt diff --git a/kmp/swift/MapCoreKmp/Bundle+Shared.swift b/kmp/swift/MapCoreKmp/Bundle+Shared.swift deleted file mode 100644 index 7c04bf7a7..000000000 --- a/kmp/swift/MapCoreKmp/Bundle+Shared.swift +++ /dev/null @@ -1,7 +0,0 @@ -import Foundation - -extension Bundle { - static var shared: Bundle { - Bundle.module - } -} diff --git a/kmp/swift/MapCoreKmp/StartYourBridgeHere.swift b/kmp/swift/MapCoreKmp/StartYourBridgeHere.swift deleted file mode 100644 index 057ec9525..000000000 --- a/kmp/swift/MapCoreKmp/StartYourBridgeHere.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Foundation -/** -This is a starting class to set up your bridge. -Ensure that your class is public and has the @objcMembers / @objc annotation. -This file has been created because the folder is empty. -Ignore this file if you don't need it. -**/ - -/** -@objcMembers public class StartHere: NSObject { - public override init() { - super.init() - } -} -**/ diff --git a/src/swift/MapCoreKmp/StartYourBridgeHere.swift b/src/swift/MapCoreKmp/StartYourBridgeHere.swift deleted file mode 100644 index 057ec9525..000000000 --- a/src/swift/MapCoreKmp/StartYourBridgeHere.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Foundation -/** -This is a starting class to set up your bridge. -Ensure that your class is public and has the @objcMembers / @objc annotation. -This file has been created because the folder is empty. -Ignore this file if you don't need it. -**/ - -/** -@objcMembers public class StartHere: NSObject { - public override init() { - super.init() - } -} -**/ From ef370395eeaf7f2b658258e4d6048d019b3e6ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 08:57:04 +0100 Subject: [PATCH 47/63] simpler kmp setup --- build.gradle.kts | 2 + djinni/run_djinni.sh | 10 +- gradle.properties | 1 + .../frankois944/spmForKmp/SpmForKmpPlugin.kt | 190 --------- .../PackageRootDefinitionExtension.kt | 374 ------------------ .../CompileSwiftPackageTask.kt | 222 ----------- .../compileSwiftPackage/ConfigureTask.kt | 52 --- .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 0 .../openmobilemaps/mapscore/kmp/KMFuture.kt | 0 .../mapscore/kmp/KMMapInterfaceBridge.kt | 0 .../openmobilemaps/mapscore/kmp/KMDataRef.kt} | 0 .../openmobilemaps/mapscore/kmp/KMFuture.kt} | 0 .../mapscore/kmp/KMMapInterfaceBridge.kt | 0 .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 0 .../openmobilemaps/mapscore/kmp/KMFuture.kt | 0 .../mapscore/kmp/KMMapInterfaceBridge.kt | 0 .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 0 .../openmobilemaps/mapscore/kmp/KMFuture.kt | 0 .../mapscore/kmp/KMMapInterfaceBridge.kt} | 0 .../mapscore/kmp/{DataRef.kt => KMDataRef.kt} | 0 .../mapscore/kmp/{Future.kt => KMFuture.kt} | 0 ...rfaceBridge.kt => KMMapInterfaceBridge.kt} | 0 .../mapscore/kmp/{DataRef.kt => KMDataRef.kt} | 0 .../mapscore/kmp/{Future.kt => KMFuture.kt} | 0 ...rfaceBridge.kt => KMMapInterfaceBridge.kt} | 0 25 files changed, 12 insertions(+), 839 deletions(-) delete mode 100644 kmp/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt delete mode 100644 kmp/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt delete mode 100644 kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt delete mode 100644 kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt rename djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt => kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt (100%) rename djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt => kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt (100%) rename djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt => kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt (100%) rename kmp/{androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt => bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt} (100%) rename kmp/{androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt => bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt} (100%) rename djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt => kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt (100%) rename djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt => kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt (100%) rename djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt => kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt (100%) rename djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt => kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt (100%) rename djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt => kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt (100%) rename djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt => kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt (100%) rename kmp/{androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt => bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt} (100%) rename kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/{DataRef.kt => KMDataRef.kt} (100%) rename kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/{Future.kt => KMFuture.kt} (100%) rename kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/{MapInterfaceBridge.kt => KMMapInterfaceBridge.kt} (100%) rename kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/{DataRef.kt => KMDataRef.kt} (100%) rename kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/{Future.kt => KMFuture.kt} (100%) rename kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/{MapInterfaceBridge.kt => KMMapInterfaceBridge.kt} (100%) diff --git a/build.gradle.kts b/build.gradle.kts index 4a0a62478..f769f2476 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -110,6 +110,8 @@ kotlin { iosTargets.forEach { iosTarget -> iosTarget.binaries.framework { isStatic = false + // Allow unresolved Obj-C symbols; they will be provided by another binary at final app link. + linkerOpts("-Wl,-undefined,dynamic_lookup") } iosTarget.compilations { val main by getting { diff --git a/djinni/run_djinni.sh b/djinni/run_djinni.sh index c1ff3daec..5fe9adcbf 100755 --- a/djinni/run_djinni.sh +++ b/djinni/run_djinni.sh @@ -117,8 +117,16 @@ for file in $(find . -name "*.djinni" -type f -print); do done +for dir in "$KMP_COMMON_OUT" "$KMP_ANDROID_OUT" "$KMP_IOS_OUT"; do + for base in DataRef Future MapInterfaceBridge; do + if [ -f "$dir/$base.kt" ]; then + mv "$dir/$base.kt" "$dir/KM$base.kt" + fi + done +done + -MANUAL_KMP_DIR="$base_dir/kmp_manual" +MANUAL_KMP_DIR="$base_dir/../kmp/bridging" MANUAL_KMP_COMMON="$MANUAL_KMP_DIR/commonMain/kotlin/io/openmobilemaps/mapscore/kmp" MANUAL_KMP_ANDROID="$MANUAL_KMP_DIR/androidMain/kotlin/io/openmobilemaps/mapscore/kmp" MANUAL_KMP_IOS="$MANUAL_KMP_DIR/iosMain/kotlin/io/openmobilemaps/mapscore/kmp" diff --git a/gradle.properties b/gradle.properties index b65e5f51d..7e70fc934 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ android.useAndroidX=true kotlin.mpp.enableCInteropCommonization=true +kotlin.native.cacheKind.iosSimulatorArm64=none diff --git a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt deleted file mode 100644 index 9793d0c3b..000000000 --- a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/SpmForKmpPlugin.kt +++ /dev/null @@ -1,190 +0,0 @@ -@file:OptIn(ExperimentalStdlibApi::class) - -package io.github.frankois944.spmForKmp - -import io.github.frankois944.spmForKmp.config.AppleCompileTarget -import io.github.frankois944.spmForKmp.config.PackageDirectoriesConfig -import io.github.frankois944.spmForKmp.definition.PackageRootDefinitionExtension -import io.github.frankois944.spmForKmp.tasks.checkExistCInteropTask -import io.github.frankois944.spmForKmp.tasks.configAppleTargets -import io.github.frankois944.spmForKmp.tasks.createCInteropTask -import io.github.frankois944.spmForKmp.utils.StartingFile -import io.github.frankois944.spmForKmp.utils.getAndCreateFakeDefinitionFile -import org.gradle.api.GradleException -import org.gradle.api.NamedDomainObjectContainer -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.Task -import org.gradle.api.reflect.TypeOf -import org.gradle.internal.extensions.stdlib.capitalized -import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget -import org.jetbrains.kotlin.gradle.tasks.CInteropProcess -import org.jetbrains.kotlin.konan.target.HostManager -import java.io.File -import kotlin.reflect.javaType -import kotlin.reflect.typeOf - -internal const val PLUGIN_NAME: String = "swiftPackageConfig" -internal const val SWIFT_PACKAGE_NAME = "Package.swift" -internal const val SWIFT_PACKAGE_RESOLVE_NAME = "Package.resolved" -internal const val TASK_GENERATE_MANIFEST: String = "generateSwiftPackage" -internal const val TASK_COMPILE_PACKAGE: String = "compileSwiftPackage" -internal const val TASK_GENERATE_CINTEROP_DEF: String = "generateCInteropDefinition" -internal const val TASK_GENERATE_EXPORTABLE_PACKAGE: String = "generateExportableSwiftPackage" -internal const val TASK_GENERATE_REGISTRY_FILE: String = "generateRegistryFilePackage" -internal const val TASK_COPY_PACKAGE_RESOURCES: String = "CopyPackageResources" -internal const val SPM_TRACE_NAME: String = "spmForKmpTrace" - -@Suppress("UnnecessaryAbstractClass") -public abstract class SpmForKmpPlugin : Plugin { - @Suppress("LongMethod") - override fun apply(target: Project): Unit = - with(target) { - val swiftPackageEntries: NamedDomainObjectContainer = - objects.domainObjectContainer(PackageRootDefinitionExtension::class.java) { name -> - objects.newInstance(PackageRootDefinitionExtension::class.java, name) - } - - val type = - TypeOf.typeOf>( - typeOf>().javaType, - ) - - extensions.add(type, PLUGIN_NAME, swiftPackageEntries) - - afterEvaluate { - // Contains the group of task (with their dependency) by target - val taskGroup = mutableMapOf() - // Contains the cinterop .def file linked with the task name - val cInteropTaskNamesWithDefFile = mutableMapOf() - val entries = swiftPackageEntries + project.swiftContainer() - createMissingCinteropTask(entries) - mergeEntries(entries).forEach { swiftPackageEntry -> - val spmWorkingDir = - resolveAndCreateDir( - File(swiftPackageEntry.spmWorkingPath), - "spmKmpPlugin", - swiftPackageEntry.internalName, - ) - - val packageScratchDir = resolveAndCreateDir(spmWorkingDir, "scratch") - val sharedCacheDir = swiftPackageEntry.sharedCachePath?.let { resolveAndCreateDir(File(it)) } - val sharedConfigDir = swiftPackageEntry.sharedConfigPath?.let { resolveAndCreateDir(File(it)) } - val sharedSecurityDir = swiftPackageEntry.sharedSecurityPath?.let { resolveAndCreateDir(File(it)) } - val bridgeSourceDir = - resolveAndCreateDir( - File(swiftPackageEntry.customPackageSourcePath), - swiftPackageEntry.internalName, - ) - - StartingFile.createStartingFileIfNeeded(bridgeSourceDir) - - tasks - .withType(CInteropProcess::class.java) - .forEach { - logger.debug("CInteropProcess task found: {}", it) - } - - configAppleTargets( - taskGroup = taskGroup, - cInteropTaskNamesWithDefFile = cInteropTaskNamesWithDefFile, - swiftPackageEntry = swiftPackageEntry, - packageDirectoriesConfig = - PackageDirectoriesConfig( - spmWorkingDir = spmWorkingDir, - packageScratchDir = packageScratchDir, - sharedCacheDir = sharedCacheDir, - sharedConfigDir = sharedConfigDir, - sharedSecurityDir = sharedSecurityDir, - bridgeSourceDir = bridgeSourceDir, - ), - ) - } - - // link the main definition File - tasks.withType(CInteropProcess::class.java).configureEach { cinterop -> - if (HostManager.hostIsMac) { - val cinteropTarget = - AppleCompileTarget.fromKonanTarget(cinterop.konanTarget) - ?: return@configureEach - taskGroup[cinteropTarget]?.let { - cinterop.dependsOn(taskGroup[cinteropTarget]) - cinterop.mustRunAfter(taskGroup[cinteropTarget]) - } ?: run { - // If there is no task, there is something really wrong somewhere. - // the user must make an issue with its configuration - throw GradleException( - """ - spmForKmp failed : - No task found for target ${cinteropTarget.name} - make an issue with your plugin configuration - """.trimIndent(), - ) - } - val definitionFile = cInteropTaskNamesWithDefFile[cinterop.name] - // Note: the definitionFile doesn't exist yet, but we know where it will be. - cinterop.settings.definitionFile.set(definitionFile) - } else { - cinterop.settings.definitionFile.set(getAndCreateFakeDefinitionFile()) - } - } - } - } - - private fun Project.resolvePath(destination: File): File = - if (destination.isAbsolute) { - destination - } else { - layout.projectDirectory.asFile - .resolve(destination) - } - - private fun Project.resolveAndCreateDir( - base: File, - vararg nestedPath: String = emptyArray(), - ): File { - var resolved = resolvePath(base) - nestedPath.forEach { resolved = resolved.resolve(it) } - resolved.mkdirs() - return resolved - } - - private fun Project.createMissingCinteropTask(swiftPackageEntry: Set) { - swiftPackageEntry.forEach { entry -> - if (!entry.useExtension) { - return - } - entry.targetName?.let { targetName -> - val ktTarget = - extensions - .getByType(KotlinMultiplatformExtension::class.java) - .targets - .findByName(targetName) as KotlinNativeTarget - val mainCompilationTarget = ktTarget.compilations.getByName("main") - if (!checkExistCInteropTask(mainCompilationTarget, entry.internalName.capitalized())) { - createCInteropTask( - mainCompilationTarget, - cinteropName = entry.internalName.capitalized(), - file = getAndCreateFakeDefinitionFile(), - ) - } - } - } - } - - private fun mergeEntries(entries: Set): Set { - val mergedEntries = mutableSetOf() - entries.forEach { entry -> - val foundEntry = - mergedEntries - .firstOrNull { mergedEntry -> - mergedEntry.internalName == entry.internalName - } - if (foundEntry == null) { - mergedEntries.add(entry) - } - } - return mergedEntries - } -} diff --git a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt deleted file mode 100644 index 6add654e9..000000000 --- a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/definition/PackageRootDefinitionExtension.kt +++ /dev/null @@ -1,374 +0,0 @@ -@file:OptIn(ExperimentalStdlibApi::class) - -package io.github.frankois944.spmForKmp.definition - -import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_IOS_VERSION -import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_MAC_OS_VERSION -import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_TV_OS_VERSION -import io.github.frankois944.spmForKmp.config.DEFAULT_MIN_WATCH_OS_VERSION -import io.github.frankois944.spmForKmp.config.DEFAULT_TOOL_VERSION -import io.github.frankois944.spmForKmp.definition.dependency.Dependency -import io.github.frankois944.spmForKmp.definition.dependency.DependencyConfig -import io.github.frankois944.spmForKmp.definition.exported.ExportedPackage -import io.github.frankois944.spmForKmp.definition.exported.ExportedPackageConfig -import io.github.frankois944.spmForKmp.definition.packageRegistry.auth.PackageRegistryAuth -import io.github.frankois944.spmForKmp.definition.packageSetting.BridgeSettings -import io.github.frankois944.spmForKmp.definition.packageSetting.BridgeSettingsConfig -import org.gradle.api.Project -import java.io.File -import java.net.URI -import javax.inject.Inject -import kotlin.io.path.Path -import kotlin.io.path.pathString - -/** - * Represents a definition extension for a Swift package root within a Kotlin Multiplatform project. - * - * This abstract class provides configuration properties and methods to define a Swift package root during - * project setup. It allows setting up package parameters such as minimum platform versions, toolchains, - * and handling dependencies for Swift packages. - * - * @constructor Initializes the package root definition extension with a name and associated project. - * @param name The name of the package root definition. - * @param project The Gradle project instance associated with this configuration. - */ -@Suppress("UnnecessaryAbstractClass") -public abstract class PackageRootDefinitionExtension - @Inject - constructor( - public val name: String, - project: Project, - ) { - internal var useExtension: Boolean = false - internal var targetName: String? = null - internal var internalName: String = this.name - - /** - * Specifies the custom source path for the Swift package in the Kotlin Multiplatform project. - * - * By default, this path is set to the `src/swift` directory within the project's root directory. - * This property allows defining a different directory for the Swift package source files, - * enabling customized project structure organization. - */ - public var customPackageSourcePath: String = - Path(project.projectDir.path, "src", "swift").pathString - - /** - * Specifies the minimum iOS platform version required for the Swift package integration. - * - * This property determines the deployment target for the iOS platform when building the Swift package - * within the Kotlin Multiplatform project. Modifying this value adjusts the generated build configuration - * and compatibility of the resulting package with iOS devices and emulators. - * - * Default value: [DEFAULT_MIN_IOS_VERSION] - * - * If `null`, the platform is skipped inside the Package manifest. - */ - public var minIos: String? = DEFAULT_MIN_IOS_VERSION - - /** - * Specifies the minimum supported macOS version for the Swift Package Manager (SPM) integration. - * - * This property defines the macOS version targeted by the Swift package and its dependencies. - * Used during the generation of SPM manifests and the compilation of Swift packages to ensure compatibility - * with the specified macOS version. - * - * Default value: [DEFAULT_MIN_MAC_OS_VERSION] - * - * If `null`, the platform is skipped inside the Package manifest. - */ - public var minMacos: String? = DEFAULT_MIN_MAC_OS_VERSION - - /** - * Specifies the minimum required version of tvOS for the Swift package definition. - * - * This property is used to configure the minimum tvOS version that the Swift package - * dependencies and targets must support. - * - * Default value: [DEFAULT_MIN_TV_OS_VERSION] - * - * If `null`, the platform is skipped inside the Package manifest. - */ - public var minTvos: String? = DEFAULT_MIN_TV_OS_VERSION - - /** - * Minimum watchOS version required for the Swift package. - * - * This variable is used to specify the minimum version of watchOS that a Swift package targets - * when building or running tasks involving watchOS-specific code. It ensures compatibility - * with the defined platform version during build processes or runtime configurations. - * - * Default value: [DEFAULT_MIN_WATCH_OS_VERSION] - * - * If `null`, the platform is skipped inside the Package manifest. - */ - public var minWatchos: String? = DEFAULT_MIN_WATCH_OS_VERSION - - /** - * Specifies the version of Swift tools that will be used. - * This version determines the compatibility and features available for the Swift Package Manager. - * - * The `toolsVersion` value impacts the structure of the `Package.swift` manifest file and - * the behavior of the Swift package dependencies during resolution and compilation. - * - * Default value: [DEFAULT_TOOL_VERSION] - */ - public var toolsVersion: String = DEFAULT_TOOL_VERSION - - /** - * Indicates whether the Swift package is built in debug mode. - * - * If set to `true`, the package is being built with debug configuration. This can be useful for - * testing or development purposes where debug symbols and additional information are required. - * - * Note: release build is faster - * - * Default value: `false` - */ - public var debug: Boolean = false - - /** - * Represents a prefix used for resolving conflicts or distinguishing between multiple - * package dependencies within a Kotlin Multiplatform project. - * This variable can be used to customize or uniquely identify package names or references when required. - * - * It is nullable and, when set, the prefix will be applied to all dependencies. - */ - public var packageDependencyPrefix: String? = null - - /** - * Add a custom linker flag when exporting the product to kotlin - */ - public var linkerOpts: List = emptyList() - - /** - * Add a custom compiler flag when exporting the product to kotlin - */ - public var compilerOpts: List = emptyList() - - internal val packageDependenciesConfig: Dependency = Dependency() - - /** - * Adds one or more Swift dependencies to the dependency list. - * - * @param dependencies - * This can include local or remote dependencies in the form of - * Swift packages or binary `xcframework` bundles. - * It supports different dependency models such as local, versioned - * remote, branch-based remote, or commit-based remote dependencies. - */ - public fun dependency(dependencies: DependencyConfig.() -> Unit) { - packageDependenciesConfig.apply(dependencies) - } - - /** - * Represents the file path to the shared cache directory used by the package. - * This path is used for caching purposes to optimize dependency management, - * reducing redundant network calls or disk operations during the build process. - * The cache directory can store downloaded Swift package artifacts or other - * reusable build-related data. - * - * If set to `null`, the default cache location will be used, determined - * by the underlying build tool configuration or environment settings. - */ - public var sharedCachePath: String? = null - - /** - * Represents the file path to the shared configuration directory. - * - * It is optional and can be set to null if no such shared directory is required or uses the default one. - * - */ - public var sharedConfigPath: String? = null - - /** - * Specifies the shared directory path for security-related resources or configurations. - * - * It is optional and can be set to null if no such shared directory is required or uses the default one. - */ - public var sharedSecurityPath: String? = null - - /** - * The path of the directory where working SPM file(s) will be written. - * - * Default : `{buildDirectory}/spmKmpPlugin/` - */ - public var spmWorkingPath: String = - project.layout.buildDirectory.asFile - .get() - .path - - internal var bridgeSettings: BridgeSettingsConfig = BridgeSettings() - - /** - * Configures bridge-level settings by applying the specified configuration options. - * - * This method allows customization of the bridge's build settings by providing - * a configuration block where settings can be defined for compilers (C, C++, Swift) - * and linker options. These settings adjust the behavior of the bridge during the build process. - * - * @param setting A configuration block of type `PackageSettingConfig`. The block allows - * specifying various compiler and linker settings needed for the bridge build. - */ - public fun bridgeSettings(setting: BridgeSettingsConfig.() -> Unit) { - bridgeSettings.apply(setting) - } - - /** - * The path of the Swift command line used to build the bridge - * You can change the version of swift used for building the bridge by setting another binary - * - * Default: uses the command `xcrun --sdk macosx swift` to find the Swift binary - */ - public var swiftBinPath: String? = null - - internal var exportedPackageSettings: ExportedPackage = ExportedPackage() - - /** - * Exported package settings - * - * @param setting - * @receiver - */ - public fun exportedPackageSettings(setting: ExportedPackageConfig.() -> Unit) { - exportedPackageSettings.apply(setting) - } - - /** - * A list of enums that should be generated as Kotlin enums. - * - * Default: emptyList() - * - * [configure-enums-generation](https://kotlinlang.org/docs/native-definition-file.html#configure-enums-generation) - */ - public var strictEnums: List = emptyList() - - /** - * A list of enums that should be generated as integral values. Strict enums - * - * Default: emptyList() - * - * [configure-enums-generation](https://kotlinlang.org/docs/native-definition-file.html#configure-enums-generation) - */ - public var nonStrictEnums: List = emptyList() - - /** - * Wraps exceptions from Objective-C code into Kotlin exceptions with the ForeignException type - * - * Default: null - * - * [handle-objective-c-exceptions](https://kotlinlang.org/docs/native-definition-file.html#handle-objective-c-exceptions) - */ - public var foreignExceptionMode: String? = null - - /** - * Disables the compiler check that doesn't allow calling a non-designated Objective-C initializer as a super() constructor - * - * Default: null - * - * [allow-calling-a-non-designated-initializer](https://kotlinlang.org/docs/native-definition-file.html#allow-calling-a-non-designated-initializer) - */ - @Suppress("MaxLineLength") - public var disableDesignatedInitializerChecks: Boolean? = null - - /** - * Adds a custom message, for example, to help users resolve linker errors - * - * Default : null - * - * [help-resolve-linker-errors](https://kotlinlang.org/docs/native-definition-file.html#help-resolve-linker-errors) - */ - public var userSetupHint: String? = null - - internal val packageRegistryConfigs: MutableList = mutableListOf() - - /** - * Configures a package registry using the specified URL. - * This method adds a new registry configuration to the list of package registry settings. - * - * @param url The URL of the package registry to be added. - */ - public fun registry(url: URI) { - packageRegistryConfigs - .add( - PackageRegistryAuth( - url = url, - ), - ) - } - - /** - * Configures authentication settings for a package registry by associating - * a URL with a username and password. These settings are used to authenticate - * access to the package registry during operations involving Swift package dependencies. - * - * @param url The URL of the package registry. - * @param username The username for authenticating with the registry. - * @param password The password for authenticating with the registry. - */ - public fun registry( - url: URI, - username: String, - password: String, - ) { - require(url.scheme == "https") { - "Package registry URL must use HTTPS scheme when using username/password credential" - } - packageRegistryConfigs - .add( - PackageRegistryAuth( - url = url, - username = username, - password = password, - ), - ) - } - - /** - * Configures authentication settings for a package registry by associating - * a URL with a token. These settings are used to authenticate access - * to the package registry during operations involving Swift package dependencies. - * - * @param url The URL of the package registry. - * @param token The token used for authenticating with the registry. - */ - public fun registry( - url: URI, - token: String, - ) { - require(url.scheme == "https") { - "Package registry URL must use HTTPS scheme when using token authentication" - } - packageRegistryConfigs - .add( - PackageRegistryAuth( - url = url, - token = token, - ), - ) - } - - /** - * Configures authentication settings for a package registry by associating - * a URL with a token file. These settings are used to authenticate access - * to the package registry during operations involving Swift package dependencies. - * - * @param url The URL of the package registry. - * @param tokenFile The file containing the token for authenticating with the registry. - */ - public fun registry( - url: URI, - tokenFile: File, - ) { - require(url.scheme == "https") { - "Package registry URL must use HTTPS scheme when using token file authentication" - } - packageRegistryConfigs - .add( - PackageRegistryAuth( - url = url, - tokenFile = tokenFile, - ), - ) - } - } diff --git a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt deleted file mode 100644 index 9441f4360..000000000 --- a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/CompileSwiftPackageTask.kt +++ /dev/null @@ -1,222 +0,0 @@ -package io.github.frankois944.spmForKmp.tasks.apple.compileSwiftPackage - -import io.github.frankois944.spmForKmp.config.AppleCompileTarget -import io.github.frankois944.spmForKmp.operations.getSDKPath -import io.github.frankois944.spmForKmp.operations.printExecLogs -import io.github.frankois944.spmForKmp.tasks.utils.TaskTracer -import org.gradle.api.DefaultTask -import org.gradle.api.file.DirectoryProperty -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.provider.ListProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.CacheableTask -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.InputDirectory -import org.gradle.api.tasks.InputFile -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Optional -import org.gradle.api.tasks.OutputDirectories -import org.gradle.api.tasks.OutputFile -import org.gradle.api.tasks.PathSensitive -import org.gradle.api.tasks.PathSensitivity -import org.gradle.api.tasks.TaskAction -import org.gradle.process.ExecOperations -import org.jetbrains.kotlin.konan.target.HostManager -import java.io.ByteArrayOutputStream -import java.io.File -import java.nio.file.Files -import javax.inject.Inject -import kotlin.io.path.deleteIfExists -import kotlin.io.path.exists - -@CacheableTask -internal abstract class CompileSwiftPackageTask : DefaultTask() { - @get:Internal - abstract val workingDir: Property - - @get:OutputFile - abstract val packageResolveFile: RegularFileProperty - - @get:Input - abstract val cinteropTarget: Property - - @get:InputFile - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val packageSwift: RegularFileProperty - - @get:Input - abstract val debugMode: Property - - @get:Input - abstract val packageScratchDir: Property - - @get:OutputDirectories - abstract val generatedDirs: ListProperty - - @get:Input - @get:Optional - abstract val osVersion: Property - - @get:Input - @get:Optional - abstract val sharedCacheDir: Property - - @get:Input - @get:Optional - abstract val sharedConfigDir: Property - - @get:Input - @get:Optional - abstract val sharedSecurityDir: Property - - @get:Input - @get:Optional - abstract val swiftBinPath: Property - - @get:InputDirectory - @get:PathSensitive(PathSensitivity.RELATIVE) - abstract val bridgeSourceDir: DirectoryProperty - - @get:Internal - abstract val bridgeSourceBuiltDir: DirectoryProperty - - @get:Input - abstract val traceEnabled: Property - - @get:Internal - abstract val storedTraceFile: RegularFileProperty - - @get:Inject - abstract val execOps: ExecOperations - - init { - description = "Compile the Swift Package manifest" - group = "io.github.frankois944.spmForKmp.tasks" - onlyIf { - HostManager.hostIsMac - } - } - - @Suppress("LongMethod") - @TaskAction - fun compilePackage() { - val tracer = - TaskTracer( - "CompileSwiftPackageTask-${cinteropTarget.get()}", - traceEnabled.get(), - outputFile = - storedTraceFile - .get() - .asFile, - ) - tracer.trace("CompileSwiftPackageTask") { - tracer.trace("prepareWorkingDir") { - prepareWorkingDir() - } - - val args = - buildList { - if (swiftBinPath.orNull == null) { - add("--sdk") - add("macosx") - add("swift") - } - add("build") - add("-q") - add("--sdk") - tracer.trace("getSDKPath") { - add(execOps.getSDKPath(cinteropTarget.get(), logger)) - } - add("--triple") - add(cinteropTarget.get().triple(osVersion.orNull.orEmpty())) - add("--scratch-path") - add(packageScratchDir.get()) - add("--disable-sandbox") - add("-c") - add(if (debugMode.get()) "debug" else "release") - add("--jobs") - add(Runtime.getRuntime().availableProcessors().toString()) - sharedCacheDir.orNull?.let { - add("--cache-path") - add(it) - } - sharedConfigDir.orNull?.let { - add("--config-path") - add(it) - } - sharedSecurityDir.orNull?.let { - add("--security-path") - add(it) - } - add("--disable-index-store") - add("-debug-info-format") - add("none") - } - - val standardOutput = ByteArrayOutputStream() - val errorOutput = ByteArrayOutputStream() - tracer.trace("build") { - execOps - .exec { - it.executable = swiftBinPath.orNull ?: "xcrun" - it.workingDir = File(workingDir.get()) - it.args = args - it.standardOutput = standardOutput - it.errorOutput = errorOutput - it.isIgnoreExitValue = true - }.also { - logger.printExecLogs( - "buildPackage", - args, - it.exitValue != 0, - standardOutput, - errorOutput, - ) - } - } - } - tracer.writeHtmlReport() - } - - private fun prepareWorkingDir() { - if (Files.isSymbolicLink(bridgeSourceBuiltDir.get().asFile.toPath())) { - bridgeSourceBuiltDir - .get() - .asFile - .toPath() - .deleteIfExists() - } - if (bridgeSourceDir.get().asFileTree.isEmpty) { - val dummyFile = bridgeSourceBuiltDir.get().asFile.resolve("DummySPMFile.swift") - if (!dummyFile.exists()) { - logger.debug("Copy Dummy swift file to directory {}", bridgeSourceBuiltDir) - bridgeSourceBuiltDir.get().asFile.mkdirs() - dummyFile.writeText("import Foundation") - } - } else { - if (bridgeSourceBuiltDir - .get() - .asFile - .toPath() - .exists() - ) { - logger.debug("bridgeSourceBuiltDir exist") - if (!Files.isSymbolicLink(bridgeSourceBuiltDir.get().asFile.toPath())) { - logger.debug("bridgeSourceBuiltDir is not a symbolic link") - logger.debug("it must be deleted and be a symbolic link") - bridgeSourceBuiltDir.get().asFile.deleteRecursively() - Files.createSymbolicLink( - bridgeSourceBuiltDir.get().asFile.toPath(), - bridgeSourceDir.get().asFile.toPath(), - ) - } - } else { - logger.debug("bridgeSourceBuiltDir doesn't exist, create a symbolic Link") - Files.createSymbolicLink( - bridgeSourceBuiltDir.get().asFile.toPath(), - bridgeSourceDir.get().asFile.toPath(), - ) - } - } - } -} diff --git a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt b/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt deleted file mode 100644 index 08cc1c3b6..000000000 --- a/kmp/MapCoreKmp/io/github/frankois944/spmForKmp/tasks/apple/compileSwiftPackage/ConfigureTask.kt +++ /dev/null @@ -1,52 +0,0 @@ -package io.github.frankois944.spmForKmp.tasks.apple.compileSwiftPackage - -import io.github.frankois944.spmForKmp.SPM_TRACE_NAME -import io.github.frankois944.spmForKmp.SWIFT_PACKAGE_NAME -import io.github.frankois944.spmForKmp.SWIFT_PACKAGE_RESOLVE_NAME -import io.github.frankois944.spmForKmp.config.AppleCompileTarget -import io.github.frankois944.spmForKmp.config.PackageDirectoriesConfig -import io.github.frankois944.spmForKmp.definition.PackageRootDefinitionExtension -import io.github.frankois944.spmForKmp.tasks.utils.computeOsVersion -import io.github.frankois944.spmForKmp.tasks.utils.isTraceEnabled -import java.io.File - -internal fun CompileSwiftPackageTask.configureTask( - cinteropTarget: AppleCompileTarget, - swiftPackageEntry: PackageRootDefinitionExtension, - packageDirectoriesConfig: PackageDirectoriesConfig, - targetBuildDir: File, - isFirstTarget: Boolean, -) { - this.cinteropTarget.set(cinteropTarget) - this.debugMode.set(swiftPackageEntry.debug) - this.packageSwift.set(packageDirectoriesConfig.spmWorkingDir.resolve(SWIFT_PACKAGE_NAME)) - this.workingDir.set(packageDirectoriesConfig.spmWorkingDir.absolutePath) - this.packageScratchDir.set(packageDirectoriesConfig.packageScratchDir.absolutePath) - this.bridgeSourceDir.set(packageDirectoriesConfig.bridgeSourceDir) - this.osVersion.set(computeOsVersion(cinteropTarget, swiftPackageEntry)) - this.sharedCacheDir.set(packageDirectoriesConfig.sharedCacheDir?.absolutePath) - this.sharedConfigDir.set(packageDirectoriesConfig.sharedConfigDir?.absolutePath) - this.sharedSecurityDir.set(packageDirectoriesConfig.sharedSecurityDir?.absolutePath) - this.swiftBinPath.set(swiftPackageEntry.swiftBinPath) - this.bridgeSourceBuiltDir.set(packageDirectoriesConfig.spmWorkingDir.resolve("Sources")) - this.traceEnabled.set(project.isTraceEnabled) - this.storedTraceFile.set( - project.projectDir - .resolve(SPM_TRACE_NAME) - .resolve(packageDirectoriesConfig.spmWorkingDir.name) - .resolve(cinteropTarget.toString()) - .resolve("CompileSwiftPackageTask.html"), - ) - this.packageResolveFile.set(packageDirectoriesConfig.spmWorkingDir.resolve(SWIFT_PACKAGE_RESOLVE_NAME)) - this.generatedDirs.set( - buildList { - if (isFirstTarget) { - add(packageDirectoriesConfig.packageScratchDir.resolve("artifacts")) - add(packageDirectoriesConfig.packageScratchDir.resolve("plugins")) - add(packageDirectoriesConfig.packageScratchDir.resolve("registry")) - add(packageDirectoriesConfig.packageScratchDir.resolve("checkouts")) - } - add(targetBuildDir) - }, - ) -} diff --git a/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from djinni/kmp_manual/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt rename to kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt rename to kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt rename to kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt rename to kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt rename to kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt rename to kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from djinni/kmp_manual/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt rename to kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt rename to kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from djinni/kmp_manual/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt rename to kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt rename to kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt rename to kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/DataRef.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/Future.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapInterfaceBridge.kt rename to kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt From 81a84cfd799c1d0bbcb470fe33715515b6f8cbb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 08:59:31 +0100 Subject: [PATCH 48/63] delete outdated specs --- kmp/INTEROP_MAPPING.md | 263 ----------------------------------------- 1 file changed, 263 deletions(-) delete mode 100644 kmp/INTEROP_MAPPING.md diff --git a/kmp/INTEROP_MAPPING.md b/kmp/INTEROP_MAPPING.md deleted file mode 100644 index 5aba999ae..000000000 --- a/kmp/INTEROP_MAPPING.md +++ /dev/null @@ -1,263 +0,0 @@ -# KMP ↔ Djinni Interop Mapping (Maps Core) - -This document defines **the canonical mapping patterns** for KMP APIs that must be **drop‑in replacements on Android** (using Djinni types) and **wrappable on iOS** (ObjC/Swift interop). It is intended to be a **consistent recipe** for all maps‑core APIs. - -## Goals - -- **Common API is KMP‑first**: `expect` declarations in `commonMain`. -- **Android is drop‑in**: actuals map to Djinni types wherever possible. -- **iOS is implementable**: actuals wrap ObjC interfaces with minimal glue. -- **Predictable patterns**: same shapes across all APIs, minimal surprises. - ---- - -## 1) Type Mapping Decisions - -### Djinni records (structs / data) -- [x] **Selected:** `expect class` in `commonMain` with constructor + properties. Actuals are **`typealias`** to Djinni records when signatures match. -- [ ] Wrapper class (custom Kotlin data class, manual mapping). -- [ ] `expect data class` always (even if actual can be alias). - -**Why:** Djinni records already match Kotlin data classes. `typealias` makes Android drop‑in and iOS easy (ObjC record classes). Wrapper is only used when names or defaults differ. - -### Djinni enums -- [x] **Selected:** `expect enum class` with **actual `typealias`** on Android and iOS when possible. -- [ ] Wrapper enum mapping to Djinni enum values. - -**Why:** Direct alias avoids extra mapping and stays drop‑in on Android. - -### Djinni interfaces (class‑like) -- [x] **Selected:** `expect class` with `nativeHandle: Any?` and instance methods. Actuals: - - **Android:** wrapper around Djinni interface (not typealias), unless the Djinni type already exactly matches expected API. - - **iOS:** wrapper around ObjC interface (store ObjC instance in `nativeHandle`). -- [ ] `typealias` for all interfaces. - -**Why:** iOS needs a wrapper to manage ObjC lifetimes and method translation. Keeping a wrapper in both platforms makes the API consistent and allows optional adaptation. - ---- - -## 2) Factory / Static Methods - -### Djinni static creators -- [x] **Selected:** `companion object` in the `expect class` with factory methods. Actuals forward to Djinni static and return **wrapper instances**. -- [ ] Standalone `expect object` for all factories. -- [ ] Global top‑level functions. - -**Why:** Mirrors Djinni static methods closely and keeps the type cohesive. Works for both platforms and preserves Android drop‑in behavior. - -**Pattern:** -```kotlin -// commonMain -expect class Foo constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - companion object { - fun create(...): Foo? - } -} -``` - ---- - -## 3) Arguments & Return Types - -### Non‑primitive arguments -- [x] **Selected:** Common API uses **KMP wrapper types**, not Djinni types directly. -- [ ] Expose Djinni types in common API. - -**Why:** Common API should be platform‑agnostic. Wrappers give room for platform differences. - -### Collections -- [x] **Selected:** Use `List` / `Map` in common. Convert to `ArrayList` / `HashMap` in platform actuals as needed. -- [ ] Use mutable collections everywhere. - -**Why:** `List`/`Map` is idiomatic and safer in common. Convert only where Djinni requires mutable types. - -### Optionals -- [x] **Selected:** Kotlin nullable types (`T?`) for Djinni `optional`. - ---- - -## 4) Callbacks - -### Djinni callback interfaces -- [x] **Selected:** Common `interface` for callbacks, plus **platform proxy** that implements Djinni callback interface and forwards to the common callback. -- [ ] Expose Djinni callback interface directly in common. - -**Why:** Common code should not depend on Djinni types. A proxy keeps the boundary clean. - -**Selected API shape:** -```kotlin -// commonMain -interface SelectionCallback { - fun didSelectFeature(feature: FeatureInfo, layerIdentifier: String, coord: Coord): Boolean - fun didMultiSelectLayerFeatures(features: List, layerIdentifier: String, coord: Coord): Boolean - fun didClickBackgroundConfirmed(coord: Coord): Boolean -} -``` - ---- - -## 5) Async & Future Types - -- [x] **Selected:** Keep Djinni future types **in platform layer only**, translate to `suspend` in common API when needed. -- [ ] Expose Djinni Future in common. - -**Why:** KMP callers should use Kotlin concurrency primitives. Platform adapters can bridge futures. - ---- - -## 6) Ownership & Lifecycle - -- [x] **Selected:** Wrapper types may expose `close()`/`destroy()` if Djinni object requires disposal. If not, omit. -- [ ] Always expose `close()` even if unused. - -**Why:** Keep API minimal but safe when required by Djinni. - ---- - -## 7) Naming & Interop - -- [x] **Selected:** Keep KMP names close to Djinni names, but **no `MC` prefix** in common. -- [ ] Mirror ObjC names exactly in common. - -**Why:** KMP API should be platform‑agnostic and readable. Prefixes are implementation details. - ---- - -# Templates - -## A) Record (Djinni `record`) -```kotlin -// commonMain -expect class Coord( - systemIdentifier: Int, - x: Double, - y: Double, - z: Double, -) { - val systemIdentifier: Int - val x: Double - val y: Double - val z: Double -} - -// androidMain -actual typealias Coord = io.openmobilemaps.mapscore.shared.map.coordinates.Coord - -// iosMain -actual typealias Coord = MapCoreSharedModule.MCCoord -``` - -## B) Interface Wrapper (Djinni `interface`) -```kotlin -// commonMain -expect class MapVectorLayer constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - fun setSelectionDelegate(delegate: SelectionCallback?) - fun setGlobalState(state: Map) -} - -// androidMain -actual class MapVectorLayer actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val layer = nativeHandle as? MapscoreVectorLayerInterface - - actual fun setSelectionDelegate(delegate: SelectionCallback?) { - val proxy = delegate?.let { SelectionCallbackProxy(it) } - layer?.setSelectionDelegate(proxy) - } - - actual fun setGlobalState(state: Map) { - // map → Djinni - } -} - -// iosMain -actual class MapVectorLayer actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - private val layer = nativeHandle as? MCTiled2dMapVectorLayerInterface - - actual fun setSelectionDelegate(delegate: SelectionCallback?) { - val proxy = delegate?.let { SelectionCallbackProxy(it) } - layer?.setSelectionDelegate(proxy) - } - - actual fun setGlobalState(state: Map) { - // map → ObjC - } -} -``` - -## C) Static Creator (Djinni `static`) -```kotlin -// commonMain -expect class VectorLayer constructor(nativeHandle: Any? = null) { - protected val nativeHandle: Any? - companion object { - fun createExplicitly(...): VectorLayer? - } -} - -// androidMain -actual class VectorLayer actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - actual companion object { - actual fun createExplicitly(...): VectorLayer? { - val raw = DjinniVectorLayerInterface.createExplicitly(...) - return raw?.let { VectorLayer(it) } - } - } -} - -// iosMain -actual class VectorLayer actual constructor(nativeHandle: Any?) { - protected actual val nativeHandle: Any? = nativeHandle - actual companion object { - actual fun createExplicitly(...): VectorLayer? { - val raw = MCVectorLayerInterface.createExplicitly(...) - return raw?.let { VectorLayer(it) } - } - } -} -``` - -## D) Callback Proxy -```kotlin -// commonMain -interface SelectionCallback { ... } - -// androidMain -actual class SelectionCallbackProxy actual constructor( - private val handler: SelectionCallback, -) : MapscoreSelectionCallbackInterface() { - override fun didSelectFeature(...): Boolean = - handler.didSelectFeature(...) -} - -// iosMain -actual class SelectionCallbackProxy actual constructor( - private val handler: SelectionCallback, -) : NSObject(), MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol { - override fun didSelectFeature(...): Boolean = - handler.didSelectFeature(...) -} -``` - ---- - -## When to Deviate -- **Defaults / renames required:** use a wrapper instead of typealias. -- **Async API surface:** expose suspend/Flow in common and bridge in actuals. -- **Performance‑critical:** consider direct alias on Android only, but keep wrapper for iOS. - ---- - -## Checklist for New API -1. Does it exist in Djinni? → use these mappings. -2. Record/enum? → expect + typealias. -3. Interface? → wrapper + `nativeHandle`. -4. Static creators? → companion object forwarding. -5. Callback? → common interface + platform proxy. -6. Any list/map? → use Kotlin `List/Map`, convert in actuals. -7. Any optional? → Kotlin nullable. - From 65a520c4758fc102a63b41bdafe55f84557fbebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 10:21:05 +0100 Subject: [PATCH 49/63] less warnings --- external/djinni | 2 +- .../kmp/KMAlphaInstancedShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMAlphaShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMBoundingBoxInterface.kt | 5 +++-- .../mapscore/kmp/KMCamera3dConfigFactory.kt | 5 +++-- .../kmp/KMColorCircleShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMColorShaderInterface.kt | 5 +++-- .../KMCoordinateConversionHelperInterface.kt | 5 +++-- .../mapscore/kmp/KMCoordinateSystemFactory.kt | 5 +++-- .../kmp/KMCoordinateSystemIdentifiers.kt | 5 +++-- .../kmp/KMCpuPerformanceLoggerInterface.kt | 5 +++-- .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 5 +++-- .../kmp/KMDefaultTouchHandlerInterface.kt | 5 +++-- ...KMElevationInterpolationShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMErrorManager.kt | 5 +++-- .../kmp/KMExceptionLoggerInterface.kt | 5 +++-- .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 5 +++-- .../kmp/KMGeoJsonFeatureParserInterface.kt | 5 +++-- .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 5 +++-- .../mapscore/kmp/KMIconFactory.kt | 5 +++-- .../mapscore/kmp/KMIconInfoInterface.kt | 5 +++-- .../mapscore/kmp/KMIconLayerInterface.kt | 5 +++-- .../kmp/KMIcosahedronLayerInterface.kt | 5 +++-- .../mapscore/kmp/KMLayerObjectInterface.kt | 5 +++-- .../mapscore/kmp/KMLineFactory.kt | 5 +++-- .../kmp/KMLineGroupShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMLineInfoInterface.kt | 5 +++-- .../mapscore/kmp/KMLineLayerInterface.kt | 5 +++-- .../mapscore/kmp/KMMapCamera3dInterface.kt | 5 +++-- .../mapscore/kmp/KMMapCameraInterface.kt | 5 +++-- .../mapscore/kmp/KMMapInterface.kt | 5 +++-- .../mapscore/kmp/KMMapsCoreSharedModule.kt | 5 +++-- .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 5 +++-- .../kmp/KMPolygonGroupShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMPolygonLayerInterface.kt | 5 +++-- .../kmp/KMPolygonMaskObjectInterface.kt | 5 +++-- .../KMPolygonPatternGroupShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMRasterShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMRectanglePacker.kt | 5 +++-- .../mapscore/kmp/KMRenderConfigInterface.kt | 5 +++-- .../kmp/KMReverseGeocoderInterface.kt | 5 +++-- .../mapscore/kmp/KMSceneInterface.kt | 5 +++-- .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 5 +++-- .../mapscore/kmp/KMShaderProgramInterface.kt | 5 +++-- .../mapscore/kmp/KMSkySphereLayerInterface.kt | 5 +++-- .../kmp/KMSkySphereShaderInterface.kt | 5 +++-- .../kmp/KMSphereEffectLayerInterface.kt | 5 +++-- .../kmp/KMSphereEffectShaderInterface.kt | 5 +++-- .../kmp/KMStretchInstancedShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMStretchShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMTextFactory.kt | 5 +++-- .../kmp/KMTextInstancedShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMTextLayerInterface.kt | 5 +++-- .../mapscore/kmp/KMTextShaderInterface.kt | 5 +++-- .../mapscore/kmp/KMThreadPoolScheduler.kt | 5 +++-- .../kmp/KMTiled2dMapRasterLayerInterface.kt | 5 +++-- .../kmp/KMTiled2dMapSourceInterface.kt | 5 +++-- .../kmp/KMTiled2dMapVectorLayerInterface.kt | 5 +++-- .../kmp/KMWmtsCapabilitiesResource.kt | 5 +++-- .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 5 +++-- .../kmp/KMAlphaInstancedShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMAlphaShaderInterface.kt | 7 +++++-- .../openmobilemaps/mapscore/kmp/KMAnchor.kt | 4 +++- .../mapscore/kmp/KMBlendMode.kt | 4 +++- .../mapscore/kmp/KMBoundingBoxInterface.kt | 7 +++++-- .../mapscore/kmp/KMCamera3dConfig.kt | 4 +++- .../mapscore/kmp/KMCamera3dConfigFactory.kt | 7 +++++-- .../mapscore/kmp/KMCameraInterface.kt | 2 ++ .../mapscore/kmp/KMCameraInterpolation.kt | 4 +++- .../kmp/KMCameraInterpolationValue.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMCircleD.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMCircleF.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMCircleI.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMColor.kt | 4 +++- .../kmp/KMColorCircleShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMColorShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMColorStateList.kt | 4 +++- .../mapscore/kmp/KMComputeObjectInterface.kt | 2 ++ .../mapscore/kmp/KMComputePassInterface.kt | 2 ++ .../io/openmobilemaps/mapscore/kmp/KMCoord.kt | 4 +++- .../KMCoordinateConversionHelperInterface.kt | 7 +++++-- .../kmp/KMCoordinateConverterInterface.kt | 2 ++ .../mapscore/kmp/KMCoordinateSystemFactory.kt | 7 +++++-- .../kmp/KMCoordinateSystemIdentifiers.kt | 7 +++++-- .../kmp/KMCpuPerformanceLoggerInterface.kt | 7 +++++-- .../mapscore/kmp/KMDataLoaderResult.kt | 4 +++- .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 7 +++++-- .../kmp/KMDefaultTouchHandlerInterface.kt | 7 +++++-- ...KMElevationInterpolationShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMErrorManager.kt | 7 +++++-- .../mapscore/kmp/KMErrorManagerListener.kt | 2 ++ .../kmp/KMExceptionLoggerDelegateInterface.kt | 2 ++ .../kmp/KMExceptionLoggerInterface.kt | 7 +++++-- .../mapscore/kmp/KMExecutionEnvironment.kt | 4 +++- .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 7 +++++-- .../io/openmobilemaps/mapscore/kmp/KMFont.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMFontData.kt | 4 +++- .../mapscore/kmp/KMFontGlyph.kt | 4 +++- .../mapscore/kmp/KMFontLoaderInterface.kt | 2 ++ .../mapscore/kmp/KMFontLoaderResult.kt | 4 +++- .../mapscore/kmp/KMFontWrapper.kt | 4 +++- .../mapscore/kmp/KMFormattedStringEntry.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMFuture.kt | 2 +- .../kmp/KMGeoJsonFeatureParserInterface.kt | 7 +++++-- .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 7 +++++-- .../mapscore/kmp/KMGeoJsonLine.kt | 4 +++- .../mapscore/kmp/KMGeoJsonPoint.kt | 4 +++- .../mapscore/kmp/KMGlyphDescription.kt | 4 +++- .../kmp/KMGraphicsObjectFactoryInterface.kt | 2 ++ .../mapscore/kmp/KMGraphicsObjectInterface.kt | 2 ++ .../mapscore/kmp/KMIconFactory.kt | 7 +++++-- .../mapscore/kmp/KMIconInfoInterface.kt | 7 +++++-- .../kmp/KMIconLayerCallbackInterface.kt | 2 ++ .../mapscore/kmp/KMIconLayerInterface.kt | 7 +++++-- .../mapscore/kmp/KMIconTextFit.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMIconType.kt | 4 +++- .../mapscore/kmp/KMIcosahedronInterface.kt | 2 ++ .../KMIcosahedronLayerCallbackInterface.kt | 2 ++ .../kmp/KMIcosahedronLayerInterface.kt | 7 +++++-- .../mapscore/kmp/KMIndexedLayerInterface.kt | 2 ++ .../mapscore/kmp/KMLayerInterface.kt | 2 ++ .../mapscore/kmp/KMLayerObjectInterface.kt | 7 +++++-- .../mapscore/kmp/KMLayerReadyState.kt | 4 +++- .../mapscore/kmp/KMLineCapType.kt | 4 +++- .../mapscore/kmp/KMLineFactory.kt | 7 +++++-- .../mapscore/kmp/KMLineGroup2dInterface.kt | 2 ++ .../kmp/KMLineGroupShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMLineInfoInterface.kt | 7 +++++-- .../mapscore/kmp/KMLineJoinType.kt | 4 +++- .../kmp/KMLineLayerCallbackInterface.kt | 2 ++ .../mapscore/kmp/KMLineLayerInterface.kt | 7 +++++-- .../mapscore/kmp/KMLineStyle.kt | 4 +++- .../mapscore/kmp/KMLoaderInterface.kt | 2 ++ .../mapscore/kmp/KMLoaderStatus.kt | 4 +++- .../mapscore/kmp/KMLoggerData.kt | 4 +++- .../mapscore/kmp/KMMapCallbackInterface.kt | 2 ++ .../mapscore/kmp/KMMapCamera3dInterface.kt | 7 +++++-- .../mapscore/kmp/KMMapCameraInterface.kt | 7 +++++-- .../kmp/KMMapCameraListenerInterface.kt | 2 ++ .../mapscore/kmp/KMMapConfig.kt | 4 +++- .../mapscore/kmp/KMMapCoordinateSystem.kt | 4 +++- .../mapscore/kmp/KMMapCoreFactory.kt | 20 ------------------- .../mapscore/kmp/KMMapInterface.kt | 7 +++++-- .../kmp/KMMapReadyCallbackInterface.kt | 2 ++ .../mapscore/kmp/KMMapsCoreSharedModule.kt | 7 +++++-- .../mapscore/kmp/KMMaskingObjectInterface.kt | 2 ++ .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 7 +++++-- .../kmp/KMOpenGlRenderTargetInterface.kt | 2 ++ .../kmp/KMOpenGlRenderingContextInterface.kt | 2 ++ .../kmp/KMPerformanceLoggerInterface.kt | 2 ++ .../mapscore/kmp/KMPolygon2dInterface.kt | 2 ++ .../mapscore/kmp/KMPolygonCoord.kt | 4 +++- .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 2 ++ .../kmp/KMPolygonGroupShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMPolygonInfo.kt | 4 +++- .../kmp/KMPolygonLayerCallbackInterface.kt | 2 ++ .../mapscore/kmp/KMPolygonLayerInterface.kt | 7 +++++-- .../kmp/KMPolygonMaskObjectInterface.kt | 7 +++++-- .../kmp/KMPolygonPatternGroup2dInterface.kt | 2 ++ .../KMPolygonPatternGroupShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMPolygonStyle.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMPromise.kt | 11 ---------- .../openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 4 +++- .../kmp/KMQuad2dInstancedInterface.kt | 2 ++ .../mapscore/kmp/KMQuad2dInterface.kt | 2 ++ .../KMQuad2dStretchedInstancedInterface.kt | 2 ++ .../openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 4 +++- .../mapscore/kmp/KMQuadCoord.kt | 4 +++- .../mapscore/kmp/KMRasterShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMRasterShaderStyle.kt | 4 +++- .../mapscore/kmp/KMRectCoord.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMRectD.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMRectF.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMRectI.kt | 4 +++- .../mapscore/kmp/KMRectanglePacker.kt | 7 +++++-- .../mapscore/kmp/KMRectanglePackerPage.kt | 4 +++- .../mapscore/kmp/KMRenderConfigInterface.kt | 7 +++++-- .../mapscore/kmp/KMRenderLineDescription.kt | 4 +++- .../mapscore/kmp/KMRenderObjectInterface.kt | 2 ++ .../mapscore/kmp/KMRenderPassConfig.kt | 4 +++- .../mapscore/kmp/KMRenderPassInterface.kt | 2 ++ .../mapscore/kmp/KMRenderTargetInterface.kt | 2 ++ .../kmp/KMRenderVerticesDescription.kt | 4 +++- .../mapscore/kmp/KMRendererInterface.kt | 2 ++ .../kmp/KMRenderingContextInterface.kt | 2 ++ .../mapscore/kmp/KMRenderingCullMode.kt | 4 +++- .../kmp/KMReverseGeocoderInterface.kt | 7 +++++-- .../mapscore/kmp/KMSceneCallbackInterface.kt | 2 ++ .../mapscore/kmp/KMSceneInterface.kt | 7 +++++-- .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 7 +++++-- .../mapscore/kmp/KMSchedulerInterface.kt | 2 ++ .../mapscore/kmp/KMShaderFactoryInterface.kt | 2 ++ .../mapscore/kmp/KMShaderProgramInterface.kt | 7 +++++-- .../mapscore/kmp/KMSharedBytes.kt | 4 +++- .../openmobilemaps/mapscore/kmp/KMSizeType.kt | 4 +++- .../mapscore/kmp/KMSkySphereLayerInterface.kt | 7 +++++-- .../kmp/KMSkySphereShaderInterface.kt | 7 +++++-- .../kmp/KMSphereEffectLayerInterface.kt | 7 +++++-- .../kmp/KMSphereEffectShaderInterface.kt | 7 +++++-- .../kmp/KMStretchInstancedShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMStretchShaderInfo.kt | 4 +++- .../mapscore/kmp/KMStretchShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMSymbolAlignment.kt | 4 +++- .../mapscore/kmp/KMSymbolZOrder.kt | 4 +++- .../mapscore/kmp/KMTaskConfig.kt | 4 +++- .../mapscore/kmp/KMTaskInterface.kt | 2 ++ .../mapscore/kmp/KMTaskPriority.kt | 4 +++- .../mapscore/kmp/KMTextDescription.kt | 4 +++- .../mapscore/kmp/KMTextFactory.kt | 7 +++++-- .../mapscore/kmp/KMTextInfoInterface.kt | 2 ++ .../mapscore/kmp/KMTextInstancedInterface.kt | 2 ++ .../kmp/KMTextInstancedShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMTextInterface.kt | 2 ++ .../mapscore/kmp/KMTextJustify.kt | 4 +++- .../mapscore/kmp/KMTextLayerInterface.kt | 7 +++++-- .../mapscore/kmp/KMTextShaderInterface.kt | 7 +++++-- .../mapscore/kmp/KMTextSymbolPlacement.kt | 4 +++- .../mapscore/kmp/KMTextureAtlas.kt | 4 +++- .../mapscore/kmp/KMTextureFilterType.kt | 4 +++- .../mapscore/kmp/KMTextureHolderInterface.kt | 2 ++ .../mapscore/kmp/KMTextureLoaderResult.kt | 4 +++- .../mapscore/kmp/KMThreadPoolScheduler.kt | 7 +++++-- .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 2 ++ ...MTiled2dMapRasterLayerCallbackInterface.kt | 2 ++ .../kmp/KMTiled2dMapRasterLayerInterface.kt | 7 +++++-- .../kmp/KMTiled2dMapReadyStateListener.kt | 2 ++ .../kmp/KMTiled2dMapSourceInterface.kt | 7 +++++-- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 4 +++- .../kmp/KMTiled2dMapVectorLayerInterface.kt | 7 +++++-- ...apVectorLayerLocalDataProviderInterface.kt | 2 ++ ...apVectorLayerSelectionCallbackInterface.kt | 2 ++ ...2dMapVectorLayerSymbolDelegateInterface.kt | 2 ++ .../kmp/KMTiled2dMapVectorSettings.kt | 4 +++- .../kmp/KMTiled2dMapVectorTileOrigin.kt | 4 +++- .../mapscore/kmp/KMTiled2dMapZoomInfo.kt | 4 +++- .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 4 +++- .../mapscore/kmp/KMTiledLayerError.kt | 4 +++- .../mapscore/kmp/KMTouchAction.kt | 4 +++- .../mapscore/kmp/KMTouchEvent.kt | 4 +++- .../mapscore/kmp/KMTouchHandlerInterface.kt | 2 ++ .../mapscore/kmp/KMTouchInterface.kt | 2 ++ .../io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 4 +++- .../io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 4 +++- .../kmp/KMVectorLayerFeatureCoordInfo.kt | 4 +++- .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 4 +++- .../kmp/KMVectorLayerFeatureInfoValue.kt | 4 +++- .../kmp/KMWmtsCapabilitiesResource.kt | 7 +++++-- .../mapscore/kmp/KMWmtsLayerDescription.kt | 4 +++- .../mapscore/kmp/KMWmtsLayerDimension.kt | 4 +++- .../mapscore/kmp/KMWmtsTileMatrix.kt | 4 +++- .../mapscore/kmp/KMWmtsTileMatrixSet.kt | 4 +++- .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 7 +++++-- 256 files changed, 824 insertions(+), 351 deletions(-) delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt delete mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt diff --git a/external/djinni b/external/djinni index 979b542c7..7f6e948d9 160000 --- a/external/djinni +++ b/external/djinni @@ -1 +1 @@ -Subproject commit 979b542c76c97e24ea253e68a7c1c4b26a4e37a5 +Subproject commit 7f6e948d9a8f1719cb6178727d5c2f2c1c57a439 diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt index 8aa2ef9b8..c2d5dfc35 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMAlphaInstancedShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMAlphaInstancedShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt index cbe97039c..08cd99f70 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMAlphaShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMAlphaShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface actual fun updateAlpha(value: Float) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt index ca92708cc..a1cdf3288 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMBoundingBoxInterface actual constructor( - internal val nativeHandle: Any, +actual class KMBoundingBoxInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface actual fun addPoint(p: KMCoord) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt index a6aae3b8f..a3dc6c269 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMCamera3dConfigFactory actual constructor( - internal val nativeHandle: Any, +actual class KMCamera3dConfigFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt index a8fa1b6d8..3a1b66ec9 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMColorCircleShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMColorCircleShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt index cddb77fa1..6fdd75e92 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMColorShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMColorShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt index cc22377e2..a94d6061b 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMCoordinateConversionHelperInterface actual constructor( - internal val nativeHandle: Any, +actual class KMCoordinateConversionHelperInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface actual fun registerConverter(converter: KMCoordinateConverterInterface) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt index 2a5259383..1d2622155 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMCoordinateSystemFactory actual constructor( - internal val nativeHandle: Any, +actual class KMCoordinateSystemFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt index d2957ad3d..e0d41630a 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMCoordinateSystemIdentifiers actual constructor( - internal val nativeHandle: Any, +actual class KMCoordinateSystemIdentifiers actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt index 511b4ef64..3b4a2b63d 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMCpuPerformanceLoggerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMCpuPerformanceLoggerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt index be0c40d70..8c02df3a8 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMDefaultTiled2dMapLayerConfigs actual constructor( - internal val nativeHandle: Any, +actual class KMDefaultTiled2dMapLayerConfigs actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt index a60a275db..a59fc5d52 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMDefaultTouchHandlerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMDefaultTouchHandlerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt index 85fc38b31..1be0b33ac 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMElevationInterpolationShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMElevationInterpolationShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt index da423b661..ff7acec15 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMErrorManager actual constructor( - internal val nativeHandle: Any, +actual class KMErrorManager actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.ErrorManager actual fun addTiledLayerError(error: KMTiledLayerError) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt index d3b99890c..e52910e87 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMExceptionLoggerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMExceptionLoggerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt index 1d1731074..70fac4910 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMFeatureInfoValueFactory actual constructor( - internal val nativeHandle: Any, +actual class KMFeatureInfoValueFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt index 1ad69f355..9a8ba8663 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMGeoJsonFeatureParserInterface actual constructor( - internal val nativeHandle: Any, +actual class KMGeoJsonFeatureParserInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface actual fun parse(geoJson: String): ArrayList? { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt index 94c361565..5e757a46c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMGeoJsonHelperInterface actual constructor( - internal val nativeHandle: Any, +actual class KMGeoJsonHelperInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface actual fun geoJsonStringFromFeatureInfo(point: KMGeoJsonPoint): String { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt index 8a0d823a5..3accaa74d 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMIconFactory actual constructor( - internal val nativeHandle: Any, +actual class KMIconFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt index fd3049d36..b321ab356 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMIconInfoInterface actual constructor( - internal val nativeHandle: Any, +actual class KMIconInfoInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface actual fun getIdentifier(): String { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt index d412e7c85..b241631ca 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMIconLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMIconLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface actual fun setIcons(icons: ArrayList) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt index 89ee5c7bc..4eb17c426 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMIcosahedronLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMIcosahedronLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt index d9ee754d5..2919ba5bf 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMLayerObjectInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLayerObjectInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface actual fun update() { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt index 2f1108ef5..e6417575b 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMLineFactory actual constructor( - internal val nativeHandle: Any, +actual class KMLineFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt index 5736ffaa2..99a1423a4 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMLineGroupShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLineGroupShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface actual fun setStyles(styles: KMSharedBytes) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt index 69e60377d..733e4a56a 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMLineInfoInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLineInfoInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface actual fun getIdentifier(): String { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt index 893de5d59..2d0ebb09c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMLineLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLineLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface actual fun setLines(lines: ArrayList) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt index b10653580..cb2f3a705 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMMapCamera3dInterface actual constructor( - internal val nativeHandle: Any, +actual class KMMapCamera3dInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface actual fun getCameraConfig(): KMCamera3dConfig { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt index 0ca5cac1c..a80014e66 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMMapCameraInterface actual constructor( - internal val nativeHandle: Any, +actual class KMMapCameraInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCameraInterface actual fun freeze(freeze: Boolean) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt index 9b70ee62c..95375bc88 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMMapInterface actual constructor( - internal val nativeHandle: Any, +actual class KMMapInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapInterface actual fun setCallbackHandler(callbackInterface: KMMapCallbackInterface?) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt index ba4e9e67f..1c6195c81 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMMapsCoreSharedModule actual constructor( - internal val nativeHandle: Any, +actual class KMMapsCoreSharedModule actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.MapsCoreSharedModule actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt index 766ed6fe0..ce276f35b 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMOpenGlPerformanceLoggerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMOpenGlPerformanceLoggerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt index 7e9317699..9839eb60c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMPolygonGroupShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonGroupShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface actual fun setStyles(styles: KMSharedBytes) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt index f0eda6113..340437781 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMPolygonLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt index 4d1057347..bb96e7132 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMPolygonMaskObjectInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonMaskObjectInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt index 779274629..435ef1559 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMPolygonPatternGroupShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonPatternGroupShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt index d11f1e3d8..b8b7bd70c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMRasterShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMRasterShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface actual fun setStyle(style: KMRasterShaderStyle) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt index cf155eefa..f7e1c792c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMRectanglePacker actual constructor( - internal val nativeHandle: Any, +actual class KMRectanglePacker actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.RectanglePacker actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt index 9c0190772..340978e53 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMRenderConfigInterface actual constructor( - internal val nativeHandle: Any, +actual class KMRenderConfigInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface actual fun getGraphicsObject(): KMGraphicsObjectInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt index cb34983b1..53f7c9ac8 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMReverseGeocoderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMReverseGeocoderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface actual fun reverseGeocode(coord: KMCoord, thresholdMeters: Long): ArrayList { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt index 387023c76..298d0614a 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMSceneInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSceneInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.SceneInterface actual fun setCallbackHandler(callbackInterface: KMSceneCallbackInterface) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt index db9b5ba19..839849c9f 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMSchedulerGraphicsTaskCallbacks actual constructor( - internal val nativeHandle: Any, +actual class KMSchedulerGraphicsTaskCallbacks actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks actual fun requestGraphicsTaskExecution() { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt index 2fda3d129..d988ce4e9 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMShaderProgramInterface actual constructor( - internal val nativeHandle: Any, +actual class KMShaderProgramInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface actual fun getProgramName(): String { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt index 87e5d185f..a12e703fe 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMSkySphereLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSkySphereLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt index 0431f3f98..dbe5168c5 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMSkySphereShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSkySphereShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt index 81befee97..56787e86d 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMSphereEffectLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSphereEffectLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt index 66f351d10..716983717 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMSphereEffectShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSphereEffectShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt index b2f295d21..78543f42d 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMStretchInstancedShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMStretchInstancedShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt index da2692dc8..e122be011 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMStretchShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMStretchShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface actual fun updateAlpha(value: Float) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt index c725b4737..a4a8e7d17 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTextFactory actual constructor( - internal val nativeHandle: Any, +actual class KMTextFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt index 5441ab990..3af7baa74 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTextInstancedShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTextInstancedShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt index 059636be9..a00ebe38c 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTextLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTextLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface actual fun setTexts(texts: ArrayList) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt index 1ac12f4fb..67fd2b472 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTextShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTextShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface actual fun setColor(color: KMColor) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt index aeb14104e..b191b326d 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMThreadPoolScheduler actual constructor( - internal val nativeHandle: Any, +actual class KMThreadPoolScheduler actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler actual companion object diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt index 9882a4fc7..51bc2ac2f 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTiled2dMapRasterLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTiled2dMapRasterLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt index 0fec17ddb..fbd75edf4 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTiled2dMapSourceInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTiled2dMapSourceInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface actual fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, curT: Int, zoom: Double) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt index f61d5513d..bc9110827 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTiled2dMapVectorLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTiled2dMapVectorLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface actual fun setSelectionDelegate(selectionDelegate: KMTiled2dMapVectorLayerSelectionCallbackInterface?) { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt index 251e658b2..bf7f11650 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMWmtsCapabilitiesResource actual constructor( - internal val nativeHandle: Any, +actual class KMWmtsCapabilitiesResource actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource actual fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? { diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt index c9688655d..775ab399f 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -3,9 +3,10 @@ package io.openmobilemaps.mapscore.kmp -actual class KMWmtsTiled2dMapLayerConfigFactory actual constructor( - internal val nativeHandle: Any, +actual class KMWmtsTiled2dMapLayerConfigFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt index d91ef2748..b3c4de7b1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMAlphaInstancedShaderInterface", exact = true) -actual class KMAlphaInstancedShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMAlphaInstancedShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt index f6f67c043..c863b8e3f 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMAlphaShaderInterface", exact = true) -actual class KMAlphaShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMAlphaShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol actual fun updateAlpha(value: Float) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt index f9cebe618..15cc31dcc 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -22,7 +24,7 @@ actual enum class KMAnchor(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCAnchor): KMAnchor { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMAnchor.CENTER 1L -> KMAnchor.LEFT diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt index 5811c9606..bc49d6b80 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -15,7 +17,7 @@ actual enum class KMBlendMode(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCBlendMode): KMBlendMode { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMBlendMode.NORMAL 1L -> KMBlendMode.MULTIPLY diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt index a87572bf4..b0555fe82 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMBoundingBoxInterface", exact = true) -actual class KMBoundingBoxInterface actual constructor( - internal val nativeHandle: Any, +actual class KMBoundingBoxInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCBoundingBoxInterface actual fun addPoint(p: KMCoord) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt index edae771f3..fd01ba78e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCamera3dConfig", exact = true) -actual class KMCamera3dConfig actual constructor( +actual class KMCamera3dConfig actual public constructor( key: String, allowUserInteraction: Boolean, rotationSpeed: Float?, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt index 4a922d212..f6849df6c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCamera3dConfigFactory", exact = true) -actual class KMCamera3dConfigFactory actual constructor( - internal val nativeHandle: Any, +actual class KMCamera3dConfigFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCCamera3dConfigFactory actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt index 8bc89a4fe..c8136dfb2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt index a37ad02cd..acae655bc 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCameraInterpolation", exact = true) -actual class KMCameraInterpolation actual constructor( +actual class KMCameraInterpolation actual public constructor( stops: ArrayList, ) { actual val stops: ArrayList = stops diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt index cc2746685..f6e538b18 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCameraInterpolationValue", exact = true) -actual class KMCameraInterpolationValue actual constructor( +actual class KMCameraInterpolationValue actual public constructor( stop: Float, value: Float, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt index 6f2eaab5b..42240e033 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCircleD", exact = true) -actual class KMCircleD actual constructor( +actual class KMCircleD actual public constructor( x: Double, y: Double, radius: Double, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt index d1a1bbd5e..ed736a8e6 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCircleF", exact = true) -actual class KMCircleF actual constructor( +actual class KMCircleF actual public constructor( x: Float, y: Float, radius: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt index 375fcfdd9..9e30fb804 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCircleI", exact = true) -actual class KMCircleI actual constructor( +actual class KMCircleI actual public constructor( x: Int, y: Int, radius: Int, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt index 452015136..15118b851 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMColor", exact = true) -actual class KMColor actual constructor( +actual class KMColor actual public constructor( r: Float, g: Float, b: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt index 6eab7bee3..e124af744 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMColorCircleShaderInterface", exact = true) -actual class KMColorCircleShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMColorCircleShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt index 91e505709..fd00e9a33 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMColorShaderInterface", exact = true) -actual class KMColorShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMColorShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCColorShaderInterfaceProtocol actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt index 8c425f900..a8c8e2c6a 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from styling.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMColorStateList", exact = true) -actual class KMColorStateList actual constructor( +actual class KMColorStateList actual public constructor( normal: KMColor, highlighted: KMColor, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt index 5a5b4709a..216287b81 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt index b7dfcff5d..5c63d0cf2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt index 159d32240..f3c4ec611 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCoord", exact = true) -actual class KMCoord actual constructor( +actual class KMCoord actual public constructor( systemIdentifier: Int, x: Double, y: Double, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt index b685c0269..b1dc064be 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCoordinateConversionHelperInterface", exact = true) -actual class KMCoordinateConversionHelperInterface actual constructor( - internal val nativeHandle: Any, +actual class KMCoordinateConversionHelperInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCCoordinateConversionHelperInterface actual fun registerConverter(converter: KMCoordinateConverterInterface) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt index 4f10b6eb3..f0b49c37a 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt index c791f82e7..b767f0995 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCoordinateSystemFactory", exact = true) -actual class KMCoordinateSystemFactory actual constructor( - internal val nativeHandle: Any, +actual class KMCoordinateSystemFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCCoordinateSystemFactory actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt index 947f36c5f..2f477f986 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCoordinateSystemIdentifiers", exact = true) -actual class KMCoordinateSystemIdentifiers actual constructor( - internal val nativeHandle: Any, +actual class KMCoordinateSystemIdentifiers actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCCoordinateSystemIdentifiers actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt index fbc26e539..511e0c611 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from map_helpers.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMCpuPerformanceLoggerInterface", exact = true) -actual class KMCpuPerformanceLoggerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMCpuPerformanceLoggerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCCpuPerformanceLoggerInterface actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt index 28a91e49a..439233cae 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMDataLoaderResult", exact = true) -actual class KMDataLoaderResult actual constructor( +actual class KMDataLoaderResult actual public constructor( data: KMDataRef?, etag: String?, status: KMLoaderStatus, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt index 218e5672c..e40c28cad 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMDefaultTiled2dMapLayerConfigs", exact = true) -actual class KMDefaultTiled2dMapLayerConfigs actual constructor( - internal val nativeHandle: Any, +actual class KMDefaultTiled2dMapLayerConfigs actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt index de04d7a47..3f6288d25 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from touch_handler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMDefaultTouchHandlerInterface", exact = true) -actual class KMDefaultTouchHandlerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMDefaultTouchHandlerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCDefaultTouchHandlerInterface actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt index 24c9e5fd1..bb474a52c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMElevationInterpolationShaderInterface", exact = true) -actual class KMElevationInterpolationShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMElevationInterpolationShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt index b1db6be59..d43bc4822 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from map_helpers.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMErrorManager", exact = true) -actual class KMErrorManager actual constructor( - internal val nativeHandle: Any, +actual class KMErrorManager actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCErrorManager actual fun addTiledLayerError(error: KMTiledLayerError) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt index 1551cbfed..3a4f9a23a 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from map_helpers.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt index 5982d7723..00600c5e0 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from exception_logger.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt index e85189edf..666cd18b8 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from exception_logger.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMExceptionLoggerInterface", exact = true) -actual class KMExceptionLoggerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMExceptionLoggerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCExceptionLoggerInterface actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt index 482537836..2b5bb04b8 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from task_scheduler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMExecutionEnvironment(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCExecutionEnvironment): KMExecutionEnvironment { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMExecutionEnvironment.IO 1L -> KMExecutionEnvironment.COMPUTATION diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt index 3e17f90e5..2e2a74f63 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMFeatureInfoValueFactory", exact = true) -actual class KMFeatureInfoValueFactory actual constructor( - internal val nativeHandle: Any, +actual class KMFeatureInfoValueFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCFeatureInfoValueFactory actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt index 65c1e2c60..edf8a5529 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMFont", exact = true) -actual class KMFont actual constructor( +actual class KMFont actual public constructor( name: String, ) { actual val name: String = name diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt index 21d32864d..58adcd6ec 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMFontData", exact = true) -actual class KMFontData actual constructor( +actual class KMFontData actual public constructor( info: KMFontWrapper, glyphs: ArrayList, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt index 0393a3c29..d8d5e9517 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMFontGlyph", exact = true) -actual class KMFontGlyph actual constructor( +actual class KMFontGlyph actual public constructor( charCode: String, advance: KMVec2D, boundingBoxSize: KMVec2D, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt index 93a326547..47d407324 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index 0e0c54ae4..4aa63d3da 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMFontLoaderResult", exact = true) -actual class KMFontLoaderResult actual constructor( +actual class KMFontLoaderResult actual public constructor( imageData: KMTextureHolderInterface?, fontData: KMFontData?, status: KMLoaderStatus, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt index 808b1fd2e..23d8895d9 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMFontWrapper", exact = true) -actual class KMFontWrapper actual constructor( +actual class KMFontWrapper actual public constructor( name: String, lineHeight: Double, base: Double, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt index 138715337..1bcadbc95 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMFormattedStringEntry", exact = true) -actual class KMFormattedStringEntry actual constructor( +actual class KMFormattedStringEntry actual public constructor( text: String, scale: Float, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index 79cfcc226..2fd6b0a7d 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -7,7 +7,7 @@ actual class KMFuture { native = null } - constructor(native: MapCoreSharedModule.DJFuture) { + internal constructor(native: MapCoreSharedModule.DJFuture) { this.native = native } } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt index dd58cd226..ab852e44b 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from geo_json_parser.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMGeoJsonFeatureParserInterface", exact = true) -actual class KMGeoJsonFeatureParserInterface actual constructor( - internal val nativeHandle: Any, +actual class KMGeoJsonFeatureParserInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCGeoJsonFeatureParserInterface actual fun parse(geoJson: String): ArrayList? { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt index cc99836c5..302639f50 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from geo_json_parser.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMGeoJsonHelperInterface", exact = true) -actual class KMGeoJsonHelperInterface actual constructor( - internal val nativeHandle: Any, +actual class KMGeoJsonHelperInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCGeoJsonHelperInterface actual fun geoJsonStringFromFeatureInfo(point: KMGeoJsonPoint): String { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt index b5b356131..227bc9c15 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from geo_json_parser.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMGeoJsonLine", exact = true) -actual class KMGeoJsonLine actual constructor( +actual class KMGeoJsonLine actual public constructor( points: ArrayList, featureInfo: KMVectorLayerFeatureInfo, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt index 8f3893eaf..0109d4330 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from geo_json_parser.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMGeoJsonPoint", exact = true) -actual class KMGeoJsonPoint actual constructor( +actual class KMGeoJsonPoint actual public constructor( point: KMCoord, featureInfo: KMVectorLayerFeatureInfo, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt index a9df8f8b2..62f7599f3 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMGlyphDescription", exact = true) -actual class KMGlyphDescription actual constructor( +actual class KMGlyphDescription actual public constructor( frame: KMQuad2dD, textureCoordinates: KMQuad2dD, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index fbdd7990c..29eb0bd73 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt index 41bbe112b..3fda975c5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt index 8f19e568b..38dc52a14 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from icon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMIconFactory", exact = true) -actual class KMIconFactory actual constructor( - internal val nativeHandle: Any, +actual class KMIconFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCIconFactory actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt index 2505693f7..21515eff5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from icon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMIconInfoInterface", exact = true) -actual class KMIconInfoInterface actual constructor( - internal val nativeHandle: Any, +actual class KMIconInfoInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCIconInfoInterface actual fun getIdentifier(): String { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt index a64660674..043811cd5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from icon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt index f1b7eb34f..00f1d7647 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from icon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMIconLayerInterface", exact = true) -actual class KMIconLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMIconLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCIconLayerInterface actual fun setIcons(icons: ArrayList) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt index 8024bee3d..331895dc5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -17,7 +19,7 @@ actual enum class KMIconTextFit(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCIconTextFit): KMIconTextFit { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMIconTextFit.NONE 1L -> KMIconTextFit.WIDTH diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt index 83939aad7..9a0388dae 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from icon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -17,7 +19,7 @@ actual enum class KMIconType(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCIconType): KMIconType { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMIconType.SCALE_INVARIANT 1L -> KMIconType.ROTATION_INVARIANT diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt index 0a30f22e8..37a7e8317 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt index 2ea8d5ea3..4450d481d 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from icosahedron.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt index 980a03b54..0b0cb72d2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from icosahedron.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMIcosahedronLayerInterface", exact = true) -actual class KMIcosahedronLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMIcosahedronLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCIcosahedronLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt index f14fbb2f4..544071078 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt index 4e7784882..f8c2667da 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt index 0049ba57b..740a153c9 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from layer_object.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMLayerObjectInterface", exact = true) -actual class KMLayerObjectInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLayerObjectInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCLayerObjectInterface actual fun update() { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt index e4ba6e998..9408c5947 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -17,7 +19,7 @@ actual enum class KMLayerReadyState(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCLayerReadyState): KMLayerReadyState { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMLayerReadyState.READY 1L -> KMLayerReadyState.NOT_READY diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt index 5807d5ff0..f09894ea0 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from line.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMLineCapType(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCLineCapType): KMLineCapType { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMLineCapType.BUTT 1L -> KMLineCapType.ROUND diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt index 52488f100..c899f33e9 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from line.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMLineFactory", exact = true) -actual class KMLineFactory actual constructor( - internal val nativeHandle: Any, +actual class KMLineFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCLineFactory actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt index 08226005f..ff089bdd8 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt index 1d13459b8..95561a65b 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMLineGroupShaderInterface", exact = true) -actual class KMLineGroupShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLineGroupShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol actual fun setStyles(styles: KMSharedBytes) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt index 50c993ead..20e8b2c6c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from line.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMLineInfoInterface", exact = true) -actual class KMLineInfoInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLineInfoInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCLineInfoInterface actual fun getIdentifier(): String { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt index e5d21e10f..72845383c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from line.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMLineJoinType(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCLineJoinType): KMLineJoinType { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMLineJoinType.BEVEL 1L -> KMLineJoinType.ROUND diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt index 56098e5f3..ace125cd5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from line.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt index 6f06a5a58..58507cae8 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from line.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMLineLayerInterface", exact = true) -actual class KMLineLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMLineLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCLineLayerInterface actual fun setLines(lines: ArrayList) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt index 7a45c8746..6a95872b6 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from line.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMLineStyle", exact = true) -actual class KMLineStyle actual constructor( +actual class KMLineStyle actual public constructor( color: KMColorStateList, gapColor: KMColorStateList, opacity: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt index 238f78422..25ba93a53 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt index ecf7f10c3..f4aa29aaa 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -20,7 +22,7 @@ actual enum class KMLoaderStatus(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCLoaderStatus): KMLoaderStatus { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMLoaderStatus.OK 1L -> KMLoaderStatus.NOOP diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt index ba7bf14ce..c0f17f8e3 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from map_helpers.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMLoggerData", exact = true) -actual class KMLoggerData actual constructor( +actual class KMLoggerData actual public constructor( id: String, buckets: ArrayList, bucketSizeMs: Int, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt index 0675b4e4f..110bce2d5 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt index 8161f728a..2df1d6a80 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMMapCamera3dInterface", exact = true) -actual class KMMapCamera3dInterface actual constructor( - internal val nativeHandle: Any, +actual class KMMapCamera3dInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCMapCamera3dInterface actual fun getCameraConfig(): KMCamera3dConfig { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt index e3ffd9a8b..8c2fe92a0 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMMapCameraInterface", exact = true) -actual class KMMapCameraInterface actual constructor( - internal val nativeHandle: Any, +actual class KMMapCameraInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCMapCameraInterface actual fun freeze(freeze: Boolean) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt index b2591be37..a86271a77 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from camera.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt index b187a6710..2afea9bfd 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMMapConfig", exact = true) -actual class KMMapConfig actual constructor( +actual class KMMapConfig actual public constructor( mapCoordinateSystem: KMMapCoordinateSystem, ) { actual val mapCoordinateSystem: KMMapCoordinateSystem = mapCoordinateSystem diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt index 145ec8292..85ead253e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMMapCoordinateSystem", exact = true) -actual class KMMapCoordinateSystem actual constructor( +actual class KMMapCoordinateSystem actual public constructor( identifier: Int, bounds: KMRectCoord, unitToScreenMeterFactor: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt deleted file mode 100644 index 2d9ca4495..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoreFactory.kt +++ /dev/null @@ -1,20 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -import MapCoreKmp.MapCoreKmpBridge -import platform.Foundation.NSBundle -import platform.Foundation.NSData - -object KMMapCoreFactory { - fun createTextureLoader(): KMLoaderInterface = - (MapCoreKmpBridge.createTextureLoader() as MapCoreSharedModule.MCLoaderInterfaceProtocol).asKmp() - - fun createFontLoader(bundle: NSBundle, resourcePath: String? = null): KMFontLoaderInterface = - if (resourcePath == null) { - (MapCoreKmpBridge.createFontLoaderWithBundle(bundle) as MapCoreSharedModule.MCFontLoaderInterfaceProtocol).asKmp() - } else { - (MapCoreKmpBridge.createFontLoaderWithBundle(bundle, resourcePath) as MapCoreSharedModule.MCFontLoaderInterfaceProtocol).asKmp() - } - - fun createTextureHolder(data: NSData): KMTextureHolderInterface? = - (MapCoreKmpBridge.createTextureHolderWithData(data) as? MapCoreSharedModule.MCTextureHolderInterfaceProtocol)?.asKmp() -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt index 326b53615..cd1097078 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMMapInterface", exact = true) -actual class KMMapInterface actual constructor( - internal val nativeHandle: Any, +actual class KMMapInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCMapInterface actual fun setCallbackHandler(callbackInterface: KMMapCallbackInterface?) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt index a24a23b87..f8a97046b 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt index db355b61b..855a46cd1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from maps_core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMMapsCoreSharedModule", exact = true) -actual class KMMapsCoreSharedModule actual constructor( - internal val nativeHandle: Any, +actual class KMMapsCoreSharedModule actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCMapsCoreSharedModule actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt index 8372232fd..89ee7635e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt index f6aa52506..5195ea3f3 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from map_helpers.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMOpenGlPerformanceLoggerInterface", exact = true) -actual class KMOpenGlPerformanceLoggerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMOpenGlPerformanceLoggerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt index bfe10edc9..9e10752b2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt index eddf982d8..f754061a4 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt index 1f57636e3..492645f20 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from map_helpers.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index ae5aaab40..36983e183 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt index 51471b032..690430f91 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMPolygonCoord", exact = true) -actual class KMPolygonCoord actual constructor( +actual class KMPolygonCoord actual public constructor( positions: ArrayList, holes: ArrayList>, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt index f26834865..0efcda300 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt index 46e3e16c9..e7f4791a0 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMPolygonGroupShaderInterface", exact = true) -actual class KMPolygonGroupShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonGroupShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol actual fun setStyles(styles: KMSharedBytes) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt index 6e3607c46..ca69a7d62 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from polygon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMPolygonInfo", exact = true) -actual class KMPolygonInfo actual constructor( +actual class KMPolygonInfo actual public constructor( identifier: String, coordinates: KMPolygonCoord, color: KMColor, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt index 3ed4b47d1..67f686607 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from polygon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt index a6e00de2b..e346132d7 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from polygon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMPolygonLayerInterface", exact = true) -actual class KMPolygonLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCPolygonLayerInterface actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt index 68563e222..754adebe1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from polygon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMPolygonMaskObjectInterface", exact = true) -actual class KMPolygonMaskObjectInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonMaskObjectInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCPolygonMaskObjectInterface actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt index 82c4e4bee..6dc47706c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt index 7edf311f3..749ec6e18 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMPolygonPatternGroupShaderInterface", exact = true) -actual class KMPolygonPatternGroupShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMPolygonPatternGroupShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt index 178fda1cd..6d27ba7f8 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from polygon.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMPolygonStyle", exact = true) -actual class KMPolygonStyle actual constructor( +actual class KMPolygonStyle actual public constructor( color: KMColor, opacity: Float, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt deleted file mode 100644 index 7675274e3..000000000 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPromise.kt +++ /dev/null @@ -1,11 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -class KMPromise { - private val promise = MapCoreSharedModule.DJPromise() - - fun setValue(value: Any?) { - promise.setValue(value) - } - - fun getFuture(): KMFuture = promise.getFuture().asKmp() -} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt index 2a459b52a..434dc0d52 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMQuad2dD", exact = true) -actual class KMQuad2dD actual constructor( +actual class KMQuad2dD actual public constructor( topLeft: KMVec2D, topRight: KMVec2D, bottomRight: KMVec2D, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt index 719fb0079..8347fbeec 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt index 20f158c3e..f22f98eb1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt index 08e4c202f..504ce67ca 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt index b9521de3b..549e01461 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMQuad3dD", exact = true) -actual class KMQuad3dD actual constructor( +actual class KMQuad3dD actual public constructor( topLeft: KMVec3D, topRight: KMVec3D, bottomRight: KMVec3D, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt index ae8be59b4..6c7a10dec 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMQuadCoord", exact = true) -actual class KMQuadCoord actual constructor( +actual class KMQuadCoord actual public constructor( topLeft: KMCoord, topRight: KMCoord, bottomRight: KMCoord, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt index f42c8c770..af0ecff16 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRasterShaderInterface", exact = true) -actual class KMRasterShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMRasterShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCRasterShaderInterfaceProtocol actual fun setStyle(style: KMRasterShaderStyle) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt index e1f180bf0..cf8cd0bc1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRasterShaderStyle", exact = true) -actual class KMRasterShaderStyle actual constructor( +actual class KMRasterShaderStyle actual public constructor( opacity: Float, brightnessMin: Float, brightnessMax: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt index 603e42cbb..af1200708 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from coordinate_system.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRectCoord", exact = true) -actual class KMRectCoord actual constructor( +actual class KMRectCoord actual public constructor( topLeft: KMCoord, bottomRight: KMCoord, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt index 4f1015743..1729acb95 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRectD", exact = true) -actual class KMRectD actual constructor( +actual class KMRectD actual public constructor( x: Double, y: Double, width: Double, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt index 35b1ee342..d602f877f 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRectF", exact = true) -actual class KMRectF actual constructor( +actual class KMRectF actual public constructor( x: Float, y: Float, width: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt index 41b8fdfad..862554920 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRectI", exact = true) -actual class KMRectI actual constructor( +actual class KMRectI actual public constructor( x: Int, y: Int, width: Int, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt index d7f4a7840..c91f1fe71 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from packer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRectanglePacker", exact = true) -actual class KMRectanglePacker actual constructor( - internal val nativeHandle: Any, +actual class KMRectanglePacker actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCRectanglePacker actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt index 6d968a880..b58bf98e4 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from packer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRectanglePackerPage", exact = true) -actual class KMRectanglePackerPage actual constructor( +actual class KMRectanglePackerPage actual public constructor( uvs: HashMap, ) { actual val uvs: HashMap = uvs diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt index 03e3aafae..17841f80b 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from layer_object.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRenderConfigInterface", exact = true) -actual class KMRenderConfigInterface actual constructor( - internal val nativeHandle: Any, +actual class KMRenderConfigInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCRenderConfigInterface actual fun getGraphicsObject(): KMGraphicsObjectInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt index a4288dfac..62f52ddd2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRenderLineDescription", exact = true) -actual class KMRenderLineDescription actual constructor( +actual class KMRenderLineDescription actual public constructor( positions: ArrayList, styleIndex: Int, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt index 989eae240..a8a1e3379 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index 1cb2379f4..5621f5134 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRenderPassConfig", exact = true) -actual class KMRenderPassConfig actual constructor( +actual class KMRenderPassConfig actual public constructor( renderPassIndex: Int, isPassMasked: Boolean, renderTarget: KMRenderTargetInterface?, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt index e0a4ada7c..63a691421 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt index 4eea9dc29..02dde0b11 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt index 2e8dc103e..b4a416209 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMRenderVerticesDescription", exact = true) -actual class KMRenderVerticesDescription actual constructor( +actual class KMRenderVerticesDescription actual public constructor( vertices: ArrayList, styleIndex: Int, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt index d4f559e37..99be38df1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt index 7179a6c9f..136850c49 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt index 397d352b7..e5a5d0b35 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMRenderingCullMode(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCRenderingCullMode): KMRenderingCullMode { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMRenderingCullMode.FRONT 1L -> KMRenderingCullMode.BACK diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt index e21761d36..2d4819083 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from reverse_geocoder.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMReverseGeocoderInterface", exact = true) -actual class KMReverseGeocoderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMReverseGeocoderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCReverseGeocoderInterface actual fun reverseGeocode(coord: KMCoord, thresholdMeters: Long): ArrayList { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt index 4567ae287..8ee0a3598 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt index 22dd39998..4d5269ebe 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from core.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMSceneInterface", exact = true) -actual class KMSceneInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSceneInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCSceneInterface actual fun setCallbackHandler(callbackInterface: KMSceneCallbackInterface) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt index a2fd03996..378a22f6b 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from task_scheduler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMSchedulerGraphicsTaskCallbacks", exact = true) -actual class KMSchedulerGraphicsTaskCallbacks actual constructor( - internal val nativeHandle: Any, +actual class KMSchedulerGraphicsTaskCallbacks actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks actual fun requestGraphicsTaskExecution() { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt index f6c8e11ea..0cdf9dbc2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from task_scheduler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index 6d43810c7..d094e658c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt index 8b960271f..755f63d59 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMShaderProgramInterface", exact = true) -actual class KMShaderProgramInterface actual constructor( - internal val nativeHandle: Any, +actual class KMShaderProgramInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCShaderProgramInterfaceProtocol actual fun getProgramName(): String { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt index 585e841ad..0229d3c82 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMSharedBytes", exact = true) -actual class KMSharedBytes actual constructor( +actual class KMSharedBytes actual public constructor( address: Long, elementCount: Int, bytesPerElement: Int, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt index 83a0347c8..c6d1b1645 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from styling.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -15,7 +17,7 @@ actual enum class KMSizeType(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCSizeType): KMSizeType { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMSizeType.SCREEN_PIXEL 1L -> KMSizeType.MAP_UNIT diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt index aea88d6ea..60bf10007 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from sky_sphere.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMSkySphereLayerInterface", exact = true) -actual class KMSkySphereLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSkySphereLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCSkySphereLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt index 6e8615ab0..14b474e85 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMSkySphereShaderInterface", exact = true) -actual class KMSkySphereShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSkySphereShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt index 203f63df0..ce955c9e8 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from sphere_effect.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMSphereEffectLayerInterface", exact = true) -actual class KMSphereEffectLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSphereEffectLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCSphereEffectLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt index 418c2a9f8..8d77fdc95 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMSphereEffectShaderInterface", exact = true) -actual class KMSphereEffectShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMSphereEffectShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt index bdca4bd3d..c3e3fd518 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMStretchInstancedShaderInterface", exact = true) -actual class KMStretchInstancedShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMStretchInstancedShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt index bdfb0d739..827a216b2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMStretchShaderInfo", exact = true) -actual class KMStretchShaderInfo actual constructor( +actual class KMStretchShaderInfo actual public constructor( scaleX: Float, stretchX0Begin: Float, stretchX0End: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt index 59d27309a..1102f0343 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMStretchShaderInterface", exact = true) -actual class KMStretchShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMStretchShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCStretchShaderInterfaceProtocol actual fun updateAlpha(value: Float) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt index ad9c3d873..d364d3e2a 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMSymbolAlignment(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCSymbolAlignment): KMSymbolAlignment { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMSymbolAlignment.MAP 1L -> KMSymbolAlignment.VIEWPORT diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt index db50c98bb..13da66762 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMSymbolZOrder(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCSymbolZOrder): KMSymbolZOrder { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMSymbolZOrder.AUTO 1L -> KMSymbolZOrder.VIEWPORT_Y diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt index bb4b2df6b..7bc6e8eeb 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from task_scheduler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTaskConfig", exact = true) -actual class KMTaskConfig actual constructor( +actual class KMTaskConfig actual public constructor( id: String, delay: Long, priority: KMTaskPriority, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt index 059202ee2..350c44d98 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from task_scheduler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt index 9907db302..499ff755f 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from task_scheduler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMTaskPriority(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCTaskPriority): KMTaskPriority { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMTaskPriority.HIGH 1L -> KMTaskPriority.NORMAL diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt index 45305aa9b..202813acd 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTextDescription", exact = true) -actual class KMTextDescription actual constructor( +actual class KMTextDescription actual public constructor( glyphs: ArrayList, ) { actual val glyphs: ArrayList = glyphs diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt index 15d872866..de54dffb7 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTextFactory", exact = true) -actual class KMTextFactory actual constructor( - internal val nativeHandle: Any, +actual class KMTextFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCTextFactory actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt index 7f3c3bdcc..fdcedf7eb 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt index c52529988..e0eedeeb3 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt index b9a885275..8a4f9f79e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTextInstancedShaderInterface", exact = true) -actual class KMTextInstancedShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTextInstancedShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol actual fun asShaderProgramInterface(): KMShaderProgramInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt index f548afd94..abf4f879c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt index 798317be0..7d0d6bfef 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -17,7 +19,7 @@ actual enum class KMTextJustify(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCTextJustify): KMTextJustify { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMTextJustify.AUTO 1L -> KMTextJustify.LEFT diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt index 0687a028d..cb3c83510 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTextLayerInterface", exact = true) -actual class KMTextLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTextLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCTextLayerInterface actual fun setTexts(texts: ArrayList) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt index e39bb5b23..678cd90ec 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from shader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTextShaderInterface", exact = true) -actual class KMTextShaderInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTextShaderInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCTextShaderInterfaceProtocol actual fun setColor(color: KMColor) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt index 65f23e243..0f3fba43b 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from text.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -16,7 +18,7 @@ actual enum class KMTextSymbolPlacement(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCTextSymbolPlacement): KMTextSymbolPlacement { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMTextSymbolPlacement.POINT 1L -> KMTextSymbolPlacement.LINE diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index 0749b0af1..9d2489576 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from packer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTextureAtlas", exact = true) -actual class KMTextureAtlas actual constructor( +actual class KMTextureAtlas actual public constructor( uvMap: HashMap, texture: KMTextureHolderInterface?, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt index 25181a8b1..ecf24a2e2 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -15,7 +17,7 @@ actual enum class KMTextureFilterType(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCTextureFilterType): KMTextureFilterType { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMTextureFilterType.NEAREST 1L -> KMTextureFilterType.LINEAR diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt index 44d07b402..bea947cba 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from graphicsobjects.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index 80f6a2da1..e41ae6e54 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from loader.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTextureLoaderResult", exact = true) -actual class KMTextureLoaderResult actual constructor( +actual class KMTextureLoaderResult actual public constructor( data: KMTextureHolderInterface?, etag: String?, status: KMLoaderStatus, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt index 3f03e502a..499b24c71 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from task_scheduler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMThreadPoolScheduler", exact = true) -actual class KMThreadPoolScheduler actual constructor( - internal val nativeHandle: Any, +actual class KMThreadPoolScheduler actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCThreadPoolScheduler actual companion object diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt index 74438b8dd..bfc3170e1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt index b5ea62b1a..8a0069c8c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_raster_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt index 49126705c..345a771f4 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_raster_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiled2dMapRasterLayerInterface", exact = true) -actual class KMTiled2dMapRasterLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTiled2dMapRasterLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface actual fun asLayerInterface(): KMLayerInterface { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt index f5f3adb9b..8a3a1f1d8 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt index 8178dbf96..e49c9586b 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiled2dMapSourceInterface", exact = true) -actual class KMTiled2dMapSourceInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTiled2dMapSourceInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCTiled2dMapSourceInterface actual fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, curT: Int, zoom: Double) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index 4f123db6d..799db7e02 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiled2dMapVectorAssetInfo", exact = true) -actual class KMTiled2dMapVectorAssetInfo actual constructor( +actual class KMTiled2dMapVectorAssetInfo actual public constructor( featureIdentifiersUv: HashMap, texture: KMTextureHolderInterface?, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt index e8e7dfab6..a2f9f4211 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiled2dMapVectorLayerInterface", exact = true) -actual class KMTiled2dMapVectorLayerInterface actual constructor( - internal val nativeHandle: Any, +actual class KMTiled2dMapVectorLayerInterface actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface actual fun setSelectionDelegate(selectionDelegate: KMTiled2dMapVectorLayerSelectionCallbackInterface?) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt index 01b724191..867886ac6 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt index 220f4a773..975a12804 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt index 2e3d2d9dc..d40a01feb 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt index 8ae11d98e..bf717a024 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiled2dMapVectorSettings", exact = true) -actual class KMTiled2dMapVectorSettings actual constructor( +actual class KMTiled2dMapVectorSettings actual public constructor( tileOrigin: KMTiled2dMapVectorTileOrigin, ) { actual val tileOrigin: KMTiled2dMapVectorTileOrigin = tileOrigin diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt index f1ccc2e08..f32789af0 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -17,7 +19,7 @@ actual enum class KMTiled2dMapVectorTileOrigin(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCTiled2dMapVectorTileOrigin): KMTiled2dMapVectorTileOrigin { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMTiled2dMapVectorTileOrigin.TOP_LEFT 1L -> KMTiled2dMapVectorTileOrigin.BOTTOM_LEFT diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt index 140a16682..238f32f46 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiled2dMapZoomInfo", exact = true) -actual class KMTiled2dMapZoomInfo actual constructor( +actual class KMTiled2dMapZoomInfo actual public constructor( zoomLevelScaleFactor: Float, numDrawPreviousLayers: Int, numDrawPreviousOrLaterTLayers: Int, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt index 8f8a6e151..392507a42 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiled2dMapZoomLevelInfo", exact = true) -actual class KMTiled2dMapZoomLevelInfo actual constructor( +actual class KMTiled2dMapZoomLevelInfo actual public constructor( zoom: Double, tileWidthLayerSystemUnits: Float, numTilesX: Int, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt index b00ba2a42..c4f40026e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from map_helpers.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTiledLayerError", exact = true) -actual class KMTiledLayerError actual constructor( +actual class KMTiledLayerError actual public constructor( status: KMLoaderStatus, errorCode: String?, layerName: String, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt index 1c6d0afb4..8f0271793 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from touch_handler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -17,7 +19,7 @@ actual enum class KMTouchAction(val rawValue: Long) { companion object { internal fun fromPlatform(value: MapCoreSharedModule.MCTouchAction): KMTouchAction { - val raw = value.toLong() + val raw: Long = value return when (raw) { 0L -> KMTouchAction.DOWN 1L -> KMTouchAction.MOVE diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt index eea517832..4df5f119e 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from touch_handler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMTouchEvent", exact = true) -actual class KMTouchEvent actual constructor( +actual class KMTouchEvent actual public constructor( pointers: ArrayList, touchAction: KMTouchAction, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt index 0eec08674..5b80fd4db 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from touch_handler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt index 29bb934e4..582e7c9d1 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from touch_handler.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt index b46f52589..d8128cafd 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVec2D", exact = true) -actual class KMVec2D actual constructor( +actual class KMVec2D actual public constructor( x: Double, y: Double, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt index 611bfd1f8..c791645ec 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVec2F", exact = true) -actual class KMVec2F actual constructor( +actual class KMVec2F actual public constructor( x: Float, y: Float, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt index d210164fb..8c32e5168 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVec2I", exact = true) -actual class KMVec2I actual constructor( +actual class KMVec2I actual public constructor( x: Int, y: Int, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt index bab571181..22c841918 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVec3D", exact = true) -actual class KMVec3D actual constructor( +actual class KMVec3D actual public constructor( x: Double, y: Double, z: Double, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt index 14e0b66f1..3377e9062 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVec3F", exact = true) -actual class KMVec3F actual constructor( +actual class KMVec3F actual public constructor( x: Float, y: Float, z: Float, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt index 3a5fd641c..1e92541ca 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from common.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVec3I", exact = true) -actual class KMVec3I actual constructor( +actual class KMVec3I actual public constructor( x: Int, y: Int, z: Int, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt index 5564ef497..2f5c92d34 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVectorLayerFeatureCoordInfo", exact = true) -actual class KMVectorLayerFeatureCoordInfo actual constructor( +actual class KMVectorLayerFeatureCoordInfo actual public constructor( featureInfo: KMVectorLayerFeatureInfo, coordinates: KMCoord, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt index 4a9a1e3ec..7cadc3dfb 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVectorLayerFeatureInfo", exact = true) -actual class KMVectorLayerFeatureInfo actual constructor( +actual class KMVectorLayerFeatureInfo actual public constructor( identifier: String, properties: HashMap, ) { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt index 457b023b4..e8db43b3f 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from tiled_vector_layer.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMVectorLayerFeatureInfoValue", exact = true) -actual class KMVectorLayerFeatureInfoValue actual constructor( +actual class KMVectorLayerFeatureInfoValue actual public constructor( stringVal: String?, doubleVal: Double?, intVal: Long?, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt index ceef3a41a..bb1f0f28c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from wmts_capabilities.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMWmtsCapabilitiesResource", exact = true) -actual class KMWmtsCapabilitiesResource actual constructor( - internal val nativeHandle: Any, +actual class KMWmtsCapabilitiesResource actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCWmtsCapabilitiesResource actual fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? { diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt index 1cb3e0886..1ce150327 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from wmts_capabilities.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMWmtsLayerDescription", exact = true) -actual class KMWmtsLayerDescription actual constructor( +actual class KMWmtsLayerDescription actual public constructor( identifier: String, title: String?, abstractText: String?, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt index 63b0a2cf4..9c37cc830 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from wmts_capabilities.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMWmtsLayerDimension", exact = true) -actual class KMWmtsLayerDimension actual constructor( +actual class KMWmtsLayerDimension actual public constructor( identifier: String, defaultValue: String, values: ArrayList, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt index ca4479994..b7b4a040c 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from wmts_capabilities.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMWmtsTileMatrix", exact = true) -actual class KMWmtsTileMatrix actual constructor( +actual class KMWmtsTileMatrix actual public constructor( identifier: String, scaleDenominator: Double, topLeftCornerX: Double, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt index 19c900281..98391bb06 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from wmts_capabilities.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,7 +10,7 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMWmtsTileMatrixSet", exact = true) -actual class KMWmtsTileMatrixSet actual constructor( +actual class KMWmtsTileMatrixSet actual public constructor( identifier: String, coordinateSystemIdentifier: Int, matrices: ArrayList, diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt index c6ed71e97..19e36ab3d 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -1,6 +1,8 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file was generated by Djinni from wmts_capabilities.djinni +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + package io.openmobilemaps.mapscore.kmp import kotlin.experimental.ExperimentalObjCName @@ -8,9 +10,10 @@ import kotlin.native.ObjCName @OptIn(ExperimentalObjCName::class) @ObjCName("KMWmtsTiled2dMapLayerConfigFactory", exact = true) -actual class KMWmtsTiled2dMapLayerConfigFactory actual constructor( - internal val nativeHandle: Any, +actual class KMWmtsTiled2dMapLayerConfigFactory actual public constructor( + nativeHandle: Any, ) { + internal val nativeHandle: Any = nativeHandle private val native = nativeHandle as MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory actual companion object From fd83b08619544dda5f7f7d8c4e124207a44cfb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 10:30:29 +0100 Subject: [PATCH 50/63] update generated files --- .../mapscore/kmp/KMAlphaInstancedShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt | 0 .../openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt | 0 .../mapscore/kmp/KMCamera3dConfigFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt | 0 .../mapscore/kmp/KMCameraInterpolationValue.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt | 0 .../mapscore/kmp/KMColorCircleShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMColorStateList.kt | 0 .../mapscore/kmp/KMComputeObjectInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMComputePassInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt | 0 .../mapscore/kmp/KMCoordinateConversionHelperInterface.kt | 0 .../mapscore/kmp/KMCoordinateConverterInterface.kt | 0 .../mapscore/kmp/KMCoordinateSystemFactory.kt | 0 .../mapscore/kmp/KMCoordinateSystemIdentifiers.kt | 0 .../mapscore/kmp/KMCpuPerformanceLoggerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt | 0 .../mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt | 0 .../mapscore/kmp/KMDefaultTouchHandlerInterface.kt | 0 .../kmp/KMElevationInterpolationShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMErrorManager.kt | 0 .../openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt | 0 .../mapscore/kmp/KMExceptionLoggerDelegateInterface.kt | 0 .../mapscore/kmp/KMExceptionLoggerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt | 0 .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt | 0 .../openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt | 0 .../openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt | 0 .../mapscore/kmp/KMGeoJsonFeatureParserInterface.kt | 0 .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt | 0 .../mapscore/kmp/KMGraphicsObjectFactoryInterface.kt | 0 .../mapscore/kmp/KMGraphicsObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt | 0 .../mapscore/kmp/KMIconLayerCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt | 0 .../openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt | 0 .../mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMIcosahedronLayerInterface.kt | 0 .../mapscore/kmp/KMIndexedLayerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineCapType.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineFactory.kt | 0 .../openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt | 0 .../mapscore/kmp/KMLineGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt | 0 .../mapscore/kmp/KMLineLayerCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt | 0 .../mapscore/kmp/KMMapCameraListenerInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMMapInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt | 0 .../mapscore/kmp/KMMapReadyCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt | 0 .../mapscore/kmp/KMMaskingObjectInterface.kt | 0 .../mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt | 0 .../mapscore/kmp/KMOpenGlRenderTargetInterface.kt | 0 .../mapscore/kmp/KMOpenGlRenderingContextInterface.kt | 0 .../mapscore/kmp/KMPerformanceLoggerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt | 0 .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 0 .../mapscore/kmp/KMPolygonGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt | 0 .../mapscore/kmp/KMPolygonLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMPolygonLayerInterface.kt | 0 .../mapscore/kmp/KMPolygonMaskObjectInterface.kt | 0 .../mapscore/kmp/KMPolygonPatternGroup2dInterface.kt | 0 .../mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 0 .../mapscore/kmp/KMQuad2dInstancedInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt | 0 .../mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt | 0 .../mapscore/kmp/KMRasterShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt | 0 .../openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt | 0 .../mapscore/kmp/KMRenderConfigInterface.kt | 0 .../mapscore/kmp/KMRenderLineDescription.kt | 0 .../mapscore/kmp/KMRenderObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt | 0 .../openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt | 0 .../mapscore/kmp/KMRenderTargetInterface.kt | 0 .../mapscore/kmp/KMRenderVerticesDescription.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt | 0 .../mapscore/kmp/KMRenderingContextInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt | 0 .../mapscore/kmp/KMReverseGeocoderInterface.kt | 0 .../mapscore/kmp/KMSceneCallbackInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt | 0 .../mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt | 0 .../openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt | 0 .../mapscore/kmp/KMShaderFactoryInterface.kt | 0 .../mapscore/kmp/KMShaderProgramInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt | 0 .../mapscore/kmp/KMSkySphereLayerInterface.kt | 0 .../mapscore/kmp/KMSkySphereShaderInterface.kt | 0 .../mapscore/kmp/KMSphereEffectLayerInterface.kt | 0 .../mapscore/kmp/KMSphereEffectShaderInterface.kt | 0 .../mapscore/kmp/KMStretchInstancedShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt | 0 .../mapscore/kmp/KMStretchShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextDescription.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt | 0 .../mapscore/kmp/KMTextInstancedInterface.kt | 0 .../mapscore/kmp/KMTextInstancedShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextJustify.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt | 0 .../mapscore/kmp/KMTextureHolderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt | 0 .../openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt | 0 .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 0 .../kmp/KMTiled2dMapRasterLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapReadyStateListener.kt | 0 .../mapscore/kmp/KMTiled2dMapSourceInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt | 0 .../KMTiled2dMapVectorLayerLocalDataProviderInterface.kt | 0 .../KMTiled2dMapVectorLayerSelectionCallbackInterface.kt | 0 .../kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorSettings.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt | 0 .../openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt | 0 .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTouchAction.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt | 0 .../mapscore/kmp/KMTouchHandlerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureInfoValue.kt | 0 .../mapscore/kmp/KMWmtsCapabilitiesResource.kt | 0 .../openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt | 0 .../openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt | 0 .../mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 0 .../mapscore/kmp/KMAlphaInstancedShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt | 0 .../openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt | 0 .../mapscore/kmp/KMCamera3dConfigFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt | 0 .../mapscore/kmp/KMCameraInterpolationValue.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt | 0 .../mapscore/kmp/KMColorCircleShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMColorStateList.kt | 0 .../mapscore/kmp/KMComputeObjectInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMComputePassInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt | 0 .../mapscore/kmp/KMCoordinateConversionHelperInterface.kt | 0 .../mapscore/kmp/KMCoordinateConverterInterface.kt | 0 .../mapscore/kmp/KMCoordinateSystemFactory.kt | 0 .../mapscore/kmp/KMCoordinateSystemIdentifiers.kt | 0 .../mapscore/kmp/KMCpuPerformanceLoggerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt | 0 .../mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt | 0 .../mapscore/kmp/KMDefaultTouchHandlerInterface.kt | 0 .../kmp/KMElevationInterpolationShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMErrorManager.kt | 0 .../openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt | 0 .../mapscore/kmp/KMExceptionLoggerDelegateInterface.kt | 0 .../mapscore/kmp/KMExceptionLoggerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt | 0 .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt | 0 .../openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt | 0 .../openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt | 0 .../mapscore/kmp/KMGeoJsonFeatureParserInterface.kt | 0 .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt | 0 .../mapscore/kmp/KMGraphicsObjectFactoryInterface.kt | 0 .../mapscore/kmp/KMGraphicsObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt | 0 .../mapscore/kmp/KMIconLayerCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt | 0 .../openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt | 0 .../mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMIcosahedronLayerInterface.kt | 0 .../mapscore/kmp/KMIndexedLayerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineCapType.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineFactory.kt | 0 .../openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt | 0 .../mapscore/kmp/KMLineGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt | 0 .../mapscore/kmp/KMLineLayerCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt | 0 .../mapscore/kmp/KMMapCameraListenerInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMMapInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt | 0 .../mapscore/kmp/KMMapReadyCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt | 0 .../mapscore/kmp/KMMaskingObjectInterface.kt | 0 .../mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt | 0 .../mapscore/kmp/KMOpenGlRenderTargetInterface.kt | 0 .../mapscore/kmp/KMOpenGlRenderingContextInterface.kt | 0 .../mapscore/kmp/KMPerformanceLoggerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt | 0 .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 0 .../mapscore/kmp/KMPolygonGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt | 0 .../mapscore/kmp/KMPolygonLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMPolygonLayerInterface.kt | 0 .../mapscore/kmp/KMPolygonMaskObjectInterface.kt | 0 .../mapscore/kmp/KMPolygonPatternGroup2dInterface.kt | 0 .../mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 0 .../mapscore/kmp/KMQuad2dInstancedInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt | 0 .../mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt | 0 .../mapscore/kmp/KMRasterShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt | 0 .../openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt | 0 .../mapscore/kmp/KMRenderConfigInterface.kt | 0 .../mapscore/kmp/KMRenderLineDescription.kt | 0 .../mapscore/kmp/KMRenderObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt | 0 .../openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt | 0 .../mapscore/kmp/KMRenderTargetInterface.kt | 0 .../mapscore/kmp/KMRenderVerticesDescription.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt | 0 .../mapscore/kmp/KMRenderingContextInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt | 0 .../mapscore/kmp/KMReverseGeocoderInterface.kt | 0 .../mapscore/kmp/KMSceneCallbackInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt | 0 .../mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt | 0 .../openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt | 0 .../mapscore/kmp/KMShaderFactoryInterface.kt | 0 .../mapscore/kmp/KMShaderProgramInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt | 0 .../mapscore/kmp/KMSkySphereLayerInterface.kt | 0 .../mapscore/kmp/KMSkySphereShaderInterface.kt | 0 .../mapscore/kmp/KMSphereEffectLayerInterface.kt | 0 .../mapscore/kmp/KMSphereEffectShaderInterface.kt | 0 .../mapscore/kmp/KMStretchInstancedShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt | 0 .../mapscore/kmp/KMStretchShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextDescription.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt | 0 .../mapscore/kmp/KMTextInstancedInterface.kt | 0 .../mapscore/kmp/KMTextInstancedShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextJustify.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt | 0 .../mapscore/kmp/KMTextureHolderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt | 0 .../openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt | 0 .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 0 .../kmp/KMTiled2dMapRasterLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapReadyStateListener.kt | 0 .../mapscore/kmp/KMTiled2dMapSourceInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt | 0 .../KMTiled2dMapVectorLayerLocalDataProviderInterface.kt | 0 .../KMTiled2dMapVectorLayerSelectionCallbackInterface.kt | 0 .../kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorSettings.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt | 0 .../openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt | 0 .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTouchAction.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt | 0 .../mapscore/kmp/KMTouchHandlerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureInfoValue.kt | 0 .../mapscore/kmp/KMWmtsCapabilitiesResource.kt | 0 .../openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt | 0 .../openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt | 0 .../mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 0 .../mapscore/kmp/KMAlphaInstancedShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt | 0 .../openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt | 0 .../mapscore/kmp/KMCamera3dConfigFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt | 0 .../mapscore/kmp/KMCameraInterpolationValue.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt | 0 .../mapscore/kmp/KMColorCircleShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMColorStateList.kt | 0 .../mapscore/kmp/KMComputeObjectInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMComputePassInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt | 0 .../mapscore/kmp/KMCoordinateConversionHelperInterface.kt | 0 .../mapscore/kmp/KMCoordinateConverterInterface.kt | 0 .../mapscore/kmp/KMCoordinateSystemFactory.kt | 0 .../mapscore/kmp/KMCoordinateSystemIdentifiers.kt | 0 .../mapscore/kmp/KMCpuPerformanceLoggerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt | 0 .../mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt | 0 .../mapscore/kmp/KMDefaultTouchHandlerInterface.kt | 0 .../kmp/KMElevationInterpolationShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMErrorManager.kt | 0 .../openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt | 0 .../mapscore/kmp/KMExceptionLoggerDelegateInterface.kt | 0 .../mapscore/kmp/KMExceptionLoggerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt | 0 .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt | 0 .../openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt | 0 .../openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt | 0 .../mapscore/kmp/KMGeoJsonFeatureParserInterface.kt | 0 .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt | 0 .../mapscore/kmp/KMGraphicsObjectFactoryInterface.kt | 0 .../mapscore/kmp/KMGraphicsObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt | 0 .../mapscore/kmp/KMIconLayerCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt | 0 .../openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt | 0 .../mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMIcosahedronLayerInterface.kt | 0 .../mapscore/kmp/KMIndexedLayerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineCapType.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineFactory.kt | 0 .../openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt | 0 .../mapscore/kmp/KMLineGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt | 0 .../mapscore/kmp/KMLineLayerCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt | 0 .../mapscore/kmp/KMMapCameraListenerInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMMapInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt | 0 .../mapscore/kmp/KMMapReadyCallbackInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt | 0 .../mapscore/kmp/KMMaskingObjectInterface.kt | 0 .../mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt | 0 .../mapscore/kmp/KMOpenGlRenderTargetInterface.kt | 0 .../mapscore/kmp/KMOpenGlRenderingContextInterface.kt | 0 .../mapscore/kmp/KMPerformanceLoggerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt | 0 .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 0 .../mapscore/kmp/KMPolygonGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt | 0 .../mapscore/kmp/KMPolygonLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMPolygonLayerInterface.kt | 0 .../mapscore/kmp/KMPolygonMaskObjectInterface.kt | 0 .../mapscore/kmp/KMPolygonPatternGroup2dInterface.kt | 0 .../mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 0 .../mapscore/kmp/KMQuad2dInstancedInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt | 0 .../mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt | 0 .../mapscore/kmp/KMRasterShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt | 0 .../openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt | 0 .../mapscore/kmp/KMRenderConfigInterface.kt | 0 .../mapscore/kmp/KMRenderLineDescription.kt | 0 .../mapscore/kmp/KMRenderObjectInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt | 0 .../openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt | 0 .../mapscore/kmp/KMRenderTargetInterface.kt | 0 .../mapscore/kmp/KMRenderVerticesDescription.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt | 0 .../mapscore/kmp/KMRenderingContextInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt | 0 .../mapscore/kmp/KMReverseGeocoderInterface.kt | 0 .../mapscore/kmp/KMSceneCallbackInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt | 0 .../mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt | 0 .../openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt | 0 .../mapscore/kmp/KMShaderFactoryInterface.kt | 0 .../mapscore/kmp/KMShaderProgramInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt | 0 .../mapscore/kmp/KMSkySphereLayerInterface.kt | 0 .../mapscore/kmp/KMSkySphereShaderInterface.kt | 0 .../mapscore/kmp/KMSphereEffectLayerInterface.kt | 0 .../mapscore/kmp/KMSphereEffectShaderInterface.kt | 0 .../mapscore/kmp/KMStretchInstancedShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt | 0 .../mapscore/kmp/KMStretchShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextDescription.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextFactory.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt | 0 .../mapscore/kmp/KMTextInstancedInterface.kt | 0 .../mapscore/kmp/KMTextInstancedShaderInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextJustify.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt | 0 .../mapscore/kmp/KMTextureHolderInterface.kt | 0 .../openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt | 0 .../openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt | 0 .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 0 .../kmp/KMTiled2dMapRasterLayerCallbackInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapReadyStateListener.kt | 0 .../mapscore/kmp/KMTiled2dMapSourceInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt | 0 .../KMTiled2dMapVectorLayerLocalDataProviderInterface.kt | 0 .../KMTiled2dMapVectorLayerSelectionCallbackInterface.kt | 0 .../kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorSettings.kt | 0 .../mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt | 0 .../openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt | 0 .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTouchAction.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt | 0 .../mapscore/kmp/KMTouchHandlerInterface.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 0 .../kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 0 .../mapscore/kmp/KMVectorLayerFeatureInfoValue.kt | 0 .../mapscore/kmp/KMWmtsCapabilitiesResource.kt | 0 .../openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt | 0 .../openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt | 0 .../io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt | 0 .../mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 0 build.gradle.kts | 6 +++--- djinni/run_djinni.sh | 8 ++++---- 590 files changed, 7 insertions(+), 7 deletions(-) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt (100%) rename {kmp/bridging => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt (100%) rename {kmp/bridging => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt (100%) rename {kmp/bridging => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt (100%) rename {kmp => bridging/kmp}/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt (100%) rename {kmp/bridging => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt (100%) rename {kmp/bridging => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt (100%) rename {kmp/bridging => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt (100%) rename {kmp => bridging/kmp}/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt (100%) rename {kmp/bridging => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt (100%) rename {kmp/bridging => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt (100%) rename {kmp/bridging => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt (100%) rename {kmp => bridging/kmp}/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt (100%) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt diff --git a/kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt diff --git a/kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt diff --git a/kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from kmp/bridging/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt similarity index 100% rename from kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt rename to bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt diff --git a/kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt diff --git a/kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt diff --git a/kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from kmp/bridging/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt similarity index 100% rename from kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt rename to bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt diff --git a/kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt similarity index 100% rename from kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt diff --git a/kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt similarity index 100% rename from kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt diff --git a/kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt similarity index 100% rename from kmp/bridging/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt similarity index 100% rename from kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt rename to bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt diff --git a/build.gradle.kts b/build.gradle.kts index f769f2476..4d85abbcf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -141,13 +141,13 @@ kotlin { sourceSets { val commonMain by getting { - kotlin.srcDir("kmp/commonMain/kotlin") + kotlin.srcDir("bridging/kmp/commonMain/kotlin") dependencies { api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2") } } val androidMain by getting { - kotlin.srcDir("kmp/androidMain/kotlin") + kotlin.srcDir("bridging/kmp/androidMain/kotlin") dependencies { api("io.openmobilemaps:mapscore:3.6.0") implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.3") @@ -156,7 +156,7 @@ kotlin { } } val iosMain by getting { - kotlin.srcDir("kmp/iosMain/kotlin") + kotlin.srcDir("bridging/kmp/iosMain/kotlin") languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } val iosArm64Main by getting { diff --git a/djinni/run_djinni.sh b/djinni/run_djinni.sh index 5fe9adcbf..515f34eec 100755 --- a/djinni/run_djinni.sh +++ b/djinni/run_djinni.sh @@ -28,9 +28,9 @@ OBJCPP_OUT="$DJINNI_OUT_DIR/ios" KOTLIN_OUT="$DJINNI_OUT_DIR/android/java/io/openmobilemaps/mapscore/shared" JNI_OUT="$DJINNI_OUT_DIR/android/jni" -KMP_COMMON_OUT="$base_dir/../kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp" -KMP_ANDROID_OUT="$base_dir/../kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp" -KMP_IOS_OUT="$base_dir/../kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp" +KMP_COMMON_OUT="$base_dir/../bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp" +KMP_ANDROID_OUT="$base_dir/../bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp" +KMP_IOS_OUT="$base_dir/../bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp" KMP_PACKAGE="io.openmobilemaps.mapscore.kmp" KMP_IOS_MODULE="MapCoreSharedModule" KMP_BRIDGE_PREFIX="KM" @@ -126,7 +126,7 @@ for dir in "$KMP_COMMON_OUT" "$KMP_ANDROID_OUT" "$KMP_IOS_OUT"; do done -MANUAL_KMP_DIR="$base_dir/../kmp/bridging" +MANUAL_KMP_DIR="$base_dir/../kmp" MANUAL_KMP_COMMON="$MANUAL_KMP_DIR/commonMain/kotlin/io/openmobilemaps/mapscore/kmp" MANUAL_KMP_ANDROID="$MANUAL_KMP_DIR/androidMain/kotlin/io/openmobilemaps/mapscore/kmp" MANUAL_KMP_IOS="$MANUAL_KMP_DIR/iosMain/kotlin/io/openmobilemaps/mapscore/kmp" From 0022eb17cf818d78985e5d9293e51f96677b3eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 12:15:33 +0100 Subject: [PATCH 51/63] remove duplicates --- .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 6 ------ .../openmobilemaps/mapscore/kmp/KMFuture.kt | 6 ------ .../mapscore/kmp/KMMapInterfaceBridge.kt | 5 ----- .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 3 --- .../openmobilemaps/mapscore/kmp/KMFuture.kt | 3 --- .../mapscore/kmp/KMMapInterfaceBridge.kt | 5 ----- .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 6 ------ .../openmobilemaps/mapscore/kmp/KMFuture.kt | 18 ---------------- .../mapscore/kmp/KMMapInterfaceBridge.kt | 5 ----- build.gradle.kts | 3 +++ djinni/run_djinni.sh | 21 ------------------- 11 files changed, 3 insertions(+), 78 deletions(-) delete mode 100644 bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt delete mode 100644 bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt delete mode 100644 bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt delete mode 100644 bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt delete mode 100644 bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt delete mode 100644 bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt delete mode 100644 bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt delete mode 100644 bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt delete mode 100644 bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt deleted file mode 100644 index fd2a0ef9e..000000000 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt +++ /dev/null @@ -1,6 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -actual typealias KMDataRef = java.nio.ByteBuffer - -internal fun KMDataRef.asPlatform(): java.nio.ByteBuffer = this -internal fun java.nio.ByteBuffer.asKmp(): KMDataRef = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt deleted file mode 100644 index e06c79fb4..000000000 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ /dev/null @@ -1,6 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -actual typealias KMFuture = com.snapchat.djinni.Future - -internal fun KMFuture.asPlatform(): com.snapchat.djinni.Future = this -internal fun com.snapchat.djinni.Future.asKmp(): KMFuture = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt deleted file mode 100644 index 30e6ea85e..000000000 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -actual object KMMapInterfaceBridge { - actual fun wrap(nativeHandle: Any): KMMapInterface = KMMapInterface(nativeHandle) -} diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt deleted file mode 100644 index 81544d311..000000000 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt +++ /dev/null @@ -1,3 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -expect class KMDataRef diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt deleted file mode 100644 index 6e1c9d951..000000000 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ /dev/null @@ -1,3 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -expect class KMFuture diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt deleted file mode 100644 index c0dc45807..000000000 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -expect object KMMapInterfaceBridge { - fun wrap(nativeHandle: Any): KMMapInterface -} diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt deleted file mode 100644 index 8915a8ad9..000000000 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt +++ /dev/null @@ -1,6 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -actual typealias KMDataRef = platform.Foundation.NSData - -internal fun KMDataRef.asPlatform(): platform.Foundation.NSData = this -internal fun platform.Foundation.NSData.asKmp(): KMDataRef = this diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt deleted file mode 100644 index 2fd6b0a7d..000000000 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ /dev/null @@ -1,18 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -actual class KMFuture { - internal val native: MapCoreSharedModule.DJFuture? - - constructor() { - native = null - } - - internal constructor(native: MapCoreSharedModule.DJFuture) { - this.native = native - } -} - -internal fun KMFuture.asPlatform(): MapCoreSharedModule.DJFuture = - requireNotNull(native) - -internal fun MapCoreSharedModule.DJFuture.asKmp(): KMFuture = KMFuture(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt deleted file mode 100644 index 30e6ea85e..000000000 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterfaceBridge.kt +++ /dev/null @@ -1,5 +0,0 @@ -package io.openmobilemaps.mapscore.kmp - -actual object KMMapInterfaceBridge { - actual fun wrap(nativeHandle: Any): KMMapInterface = KMMapInterface(nativeHandle) -} diff --git a/build.gradle.kts b/build.gradle.kts index 4d85abbcf..4816fd3e5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -142,12 +142,14 @@ kotlin { sourceSets { val commonMain by getting { kotlin.srcDir("bridging/kmp/commonMain/kotlin") + kotlin.srcDir("kmp/commonMain/kotlin") dependencies { api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2") } } val androidMain by getting { kotlin.srcDir("bridging/kmp/androidMain/kotlin") + kotlin.srcDir("kmp/androidMain/kotlin") dependencies { api("io.openmobilemaps:mapscore:3.6.0") implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.3") @@ -157,6 +159,7 @@ kotlin { } val iosMain by getting { kotlin.srcDir("bridging/kmp/iosMain/kotlin") + kotlin.srcDir("kmp/iosMain/kotlin") languageSettings.optIn("kotlinx.cinterop.ExperimentalForeignApi") } val iosArm64Main by getting { diff --git a/djinni/run_djinni.sh b/djinni/run_djinni.sh index 515f34eec..0d2a37a0c 100755 --- a/djinni/run_djinni.sh +++ b/djinni/run_djinni.sh @@ -126,25 +126,4 @@ for dir in "$KMP_COMMON_OUT" "$KMP_ANDROID_OUT" "$KMP_IOS_OUT"; do done -MANUAL_KMP_DIR="$base_dir/../kmp" -MANUAL_KMP_COMMON="$MANUAL_KMP_DIR/commonMain/kotlin/io/openmobilemaps/mapscore/kmp" -MANUAL_KMP_ANDROID="$MANUAL_KMP_DIR/androidMain/kotlin/io/openmobilemaps/mapscore/kmp" -MANUAL_KMP_IOS="$MANUAL_KMP_DIR/iosMain/kotlin/io/openmobilemaps/mapscore/kmp" - -if [ -d "$MANUAL_KMP_DIR" ]; then - echo "Copying manual KMP files..." - if [ -d "$MANUAL_KMP_COMMON" ]; then - mkdir -p "$KMP_COMMON_OUT" - cp -R "$MANUAL_KMP_COMMON/." "$KMP_COMMON_OUT/" - fi - if [ -d "$MANUAL_KMP_ANDROID" ]; then - mkdir -p "$KMP_ANDROID_OUT" - cp -R "$MANUAL_KMP_ANDROID/." "$KMP_ANDROID_OUT/" - fi - if [ -d "$MANUAL_KMP_IOS" ]; then - mkdir -p "$KMP_IOS_OUT" - cp -R "$MANUAL_KMP_IOS/." "$KMP_IOS_OUT/" - fi -fi - echo "djinni completed." From 1c64c861e32784a93de7e15f73e628bcc2c54a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 12:19:59 +0100 Subject: [PATCH 52/63] allow cache --- gradle.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 7e70fc934..b65e5f51d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,2 @@ android.useAndroidX=true kotlin.mpp.enableCInteropCommonization=true -kotlin.native.cacheKind.iosSimulatorArm64=none From 27c8ccc90ccd51c5cf430947aa8d88777057ad25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 15:00:15 +0100 Subject: [PATCH 53/63] fix(kmp): convert KMPromise results --- .../io/openmobilemaps/mapscore/kmp/KMFuture.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index 2fd6b0a7d..cbb94e9c4 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -12,6 +12,24 @@ actual class KMFuture { } } +class KMPromise { + private val promise = MapCoreSharedModule.DJPromise() + + fun setValue(value: T) { + promise.setValue(value) + } + + fun setValue(value: KMDataLoaderResult) { + promise.setValue(value.asPlatform()) + } + + fun setValue(value: KMTextureLoaderResult) { + promise.setValue(value.asPlatform()) + } + + fun future(): KMFuture = promise.getFuture().asKmp() +} + internal fun KMFuture.asPlatform(): MapCoreSharedModule.DJFuture = requireNotNull(native) From 40ac705f39670f4faa0a85b50767f8af506ddec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Thu, 5 Feb 2026 15:08:23 +0100 Subject: [PATCH 54/63] improved interopt --- build.gradle.kts | 55 ++++++++++++++++--- kmp/MapCoreKmp/MapCoreKmpBridge.swift | 2 + .../mapscore/kmp/MapCoreKmpInterop.kt | 17 ++++++ 3 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt diff --git a/build.gradle.kts b/build.gradle.kts index 4816fd3e5..1694c523b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,6 +21,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinAndroidTarget import org.jetbrains.kotlin.gradle.tasks.CInteropProcess +import java.io.ByteArrayOutputStream import javax.inject.Inject group = "io.openmobilemaps.mapscore" @@ -81,7 +82,7 @@ fun stripLinkerOpts(defFile: File, optsToRemove: Set) { plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" - id("com.android.library") version "8.12.0" + id("com.android.library") version "8.13.2" id("maven-publish") id("io.github.frankois944.spmForKmp") version "1.4.6" } @@ -109,9 +110,7 @@ kotlin { iosTargets.forEach { iosTarget -> iosTarget.binaries.framework { - isStatic = false - // Allow unresolved Obj-C symbols; they will be provided by another binary at final app link. - linkerOpts("-Wl,-undefined,dynamic_lookup") + isStatic = true } iosTarget.compilations { val main by getting { @@ -179,7 +178,47 @@ android { } } +abstract class CheckMapCoreGitTagTask : DefaultTask() { + @get:Internal + abstract val repoDir: DirectoryProperty + @get:Inject + abstract val execOperations: ExecOperations + + @TaskAction + fun run() { + val stderr = ByteArrayOutputStream() + val result = + execOperations.exec { + workingDir(repoDir.get().asFile) + commandLine("git", "describe", "--tags", "--exact-match", "HEAD") + isIgnoreExitValue = true + errorOutput = stderr + } + if (result.exitValue == 0) return + val errorText = stderr.toString().trim() + val detail = if (errorText.isNotBlank()) ": $errorText" else "" + logger.warn( + "MapCore KMP build: current commit is not tagged. " + + "Please use a release-tagged version of maps-core. " + + "(git describe --tags --exact-match HEAD failed$detail)", + ) + } +} + +val checkMapCoreGitTag = tasks.register("checkMapCoreGitTag") { + group = "verification" + description = "Warn if the current maps-core commit does not have a tag." + repoDir.set(project.layout.projectDirectory) +} + +tasks.matching { it.name.startsWith("compileKotlin") } + .configureEach { dependsOn(checkMapCoreGitTag) } +tasks + .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackage") } + .configureEach { dependsOn(checkMapCoreGitTag) } +tasks.matching { it.name == "build" || it.name == "assemble" } + .configureEach { dependsOn(checkMapCoreGitTag) } // Avoid overlapping Package.resolved outputs between per-target SwiftPM compile tasks. tasks @@ -212,7 +251,7 @@ tasks } } -// Ensure MapCoreKmp is built as a dynamic SwiftPM library to avoid duplicate MapCore symbols. +// Ensure MapCoreKmp is built as a static SwiftPM library; MapCore symbols should be provided by the host app. tasks .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateSwiftPackage") } .configureEach { @@ -224,7 +263,7 @@ tasks .asFile if (!packageFile.exists()) return@doLast val original = packageFile.readText() - var updated = original.replace("type: .static", "type: .dynamic") + var updated = original.replace("type: .dynamic", "type: .static") updated = updated.replace( ".product(name: \"MapCore\", package: \"maps-core\"),.product(name: \"MapCoreSharedModule\", package: \"maps-core\")", @@ -248,7 +287,7 @@ tasks } } -// When MapCoreKmp is dynamic, SwiftPM emits libMapCoreKmp.dylib (no .a). Point cinterop to the dylib. +// SwiftPM emits libMapCoreKmp.a for static builds (debug + release). gradle.projectsEvaluated { tasks .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateCInteropDefinition") } @@ -263,7 +302,7 @@ tasks javaClass.getMethod("getCompiledBinary").invoke(this) as RegularFileProperty compiledBinaryProp.set( project.layout.buildDirectory.file( - "spmKmpPlugin/MapCoreKmp/scratch/$platformDir/$mapCoreSpmBuildType/libMapCoreKmp.dylib", + "spmKmpPlugin/MapCoreKmp/scratch/$platformDir/$mapCoreSpmBuildType/libMapCoreKmp.a", ), ) doLast { diff --git a/kmp/MapCoreKmp/MapCoreKmpBridge.swift b/kmp/MapCoreKmp/MapCoreKmpBridge.swift index ae0af688d..5526447be 100644 --- a/kmp/MapCoreKmp/MapCoreKmpBridge.swift +++ b/kmp/MapCoreKmp/MapCoreKmpBridge.swift @@ -2,6 +2,8 @@ import Foundation import MapCore import MapCoreSharedModule +/// Pure swift classes like MCTextureLoader or MCFontLoader can't be created in KMP +/// Bridge helps to expose those APIs. @objcMembers public class MapCoreKmpBridge: NSObject { @objc(createTextureLoader) diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt new file mode 100644 index 000000000..080ec3ad7 --- /dev/null +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt @@ -0,0 +1,17 @@ +package io.openmobilemaps.mapscore.kmp + +import MapCoreKmp.MapCoreKmpBridge +import MapCoreSharedModule.MCFontLoaderInterfaceProtocol +import MapCoreSharedModule.MCLoaderInterfaceProtocol +import MapCoreSharedModule.MCTextureHolderInterfaceProtocol +import platform.Foundation.NSBundle +import platform.Foundation.NSData + +fun createTextureLoader(): KMLoaderInterface = + (MapCoreKmpBridge.createTextureLoader() as MCLoaderInterfaceProtocol).asKmp() + +fun createFontLoader(bundle: NSBundle, resourcePath: String? = null): KMFontLoaderInterface = + (MapCoreKmpBridge.createFontLoaderWithBundle(bundle, resourcePath) as MCFontLoaderInterfaceProtocol).asKmp() + +fun createTextureHolder(data: NSData): KMTextureHolderInterface? = + (MapCoreKmpBridge.createTextureHolderWithData(data) as? MCTextureHolderInterfaceProtocol)?.asKmp() From 79960d47a61aaf59af4d660cbf00ce1a2a06b24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Fri, 6 Feb 2026 09:31:23 +0100 Subject: [PATCH 55/63] setup fixes --- android/build.gradle | 4 +- .../mapscore/kmp/KMFontLoaderResult.kt | 22 +- .../mapscore/kmp/KMLoaderInterface.kt | 6 +- .../mapscore/kmp/KMRenderPassConfig.kt | 22 +- .../mapscore/kmp/KMTextureAtlas.kt | 18 +- .../mapscore/kmp/KMTextureLoaderResult.kt | 26 +- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 18 +- ...apVectorLayerLocalDataProviderInterface.kt | 6 +- build.gradle.kts | 414 +++++++++++------- .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMDataRef.kt | 15 +- settings.gradle.kts | 29 ++ 12 files changed, 409 insertions(+), 173 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8743fc970..5a7e932df 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -17,7 +17,7 @@ buildscript { } ext{ - agp_version = "8.13.1" + agp_version = "8.13.2" kotlin_version = "2.2.0" ksp_version = "2.2.0-2.0.2" } @@ -208,4 +208,4 @@ clean.doLast { project.delete("${projectDir}/build") project.delete("${projectDir}/.cxx") project.delete("${projectDir}/.gradle") -} \ No newline at end of file +} diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index 55479e7bc..3966d079d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -3,7 +3,23 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMFontLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult +actual class KMFontLoaderResult actual public constructor( + imageData: KMTextureHolderInterface?, + fontData: KMFontData?, + status: KMLoaderStatus, +) { + actual val imageData: KMTextureHolderInterface? = imageData + actual val fontData: KMFontData? = fontData + actual val status: KMLoaderStatus = status +} -internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = this +internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult( + imageData = imageData?.let { it.asPlatform() }, + fontData = fontData?.let { it.asPlatform() }, + status = status.asPlatform(), +) +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( + imageData = imageData?.let { it.asKmp() }, + fontData = fontData?.let { it.asKmp() }, + status = status.asKmp(), +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt index 2d31ce594..fde71a0ca 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -32,7 +32,8 @@ private class KMLoaderInterfacePlatformWrapper(internal val nativeHandle: io.ope override fun loadTextureAsync(url: String, etag: String?): KMFuture { val result = nativeHandle.loadTextureAsync(url, etag?.let { it }) - return (result as com.snapchat.djinni.Future).asKmp() + @Suppress("UNCHECKED_CAST") + return (result as com.snapchat.djinni.Future).asKmp() } override fun loadDataAsync(url: String, etag: String?): KMFuture { @@ -60,7 +61,8 @@ private class KMLoaderInterfacePlatformProxy(private val delegate: KMLoaderInter override fun loadTextureAsync(url: String, etag: String?): com.snapchat.djinni.Future { val result = delegate.loadTextureAsync(url, etag?.let { it }) - return result.asPlatform() + @Suppress("UNCHECKED_CAST") + return result.asPlatform() as com.snapchat.djinni.Future } override fun loadDataAsync(url: String, etag: String?): com.snapchat.djinni.Future { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index 2f5318e64..552c3fdb5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -3,7 +3,23 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMRenderPassConfig = io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig +actual class KMRenderPassConfig actual public constructor( + renderPassIndex: Int, + isPassMasked: Boolean, + renderTarget: KMRenderTargetInterface?, +) { + actual val renderPassIndex: Int = renderPassIndex + actual val isPassMasked: Boolean = isPassMasked + actual val renderTarget: KMRenderTargetInterface? = renderTarget +} -internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig = this -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = this +internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig = io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig( + renderPassIndex = renderPassIndex, + isPassMasked = isPassMasked, + renderTarget = renderTarget?.let { it.asPlatform() }, +) +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( + renderPassIndex = renderPassIndex, + isPassMasked = isPassMasked, + renderTarget = renderTarget?.let { it.asKmp() }, +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index b02b255b6..fbbae3f68 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -3,7 +3,19 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMTextureAtlas = io.openmobilemaps.mapscore.shared.graphics.TextureAtlas +actual class KMTextureAtlas actual public constructor( + uvMap: HashMap, + texture: KMTextureHolderInterface?, +) { + actual val uvMap: HashMap = uvMap + actual val texture: KMTextureHolderInterface? = texture +} -internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.TextureAtlas = this -internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = this +internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.TextureAtlas = io.openmobilemaps.mapscore.shared.graphics.TextureAtlas( + uvMap = HashMap(uvMap.map { it.key to it.value.asPlatform() }.toMap()), + texture = texture?.let { it.asPlatform() }, +) +internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( + uvMap = HashMap(uvMap.map { it.key to it.value.asKmp() }.toMap()), + texture = texture?.let { it.asKmp() }, +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index 3d2ca145f..a283ca562 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -3,7 +3,27 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMTextureLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult +actual class KMTextureLoaderResult actual public constructor( + data: KMTextureHolderInterface?, + etag: String?, + status: KMLoaderStatus, + errorCode: String?, +) { + actual val data: KMTextureHolderInterface? = data + actual val etag: String? = etag + actual val status: KMLoaderStatus = status + actual val errorCode: String? = errorCode +} -internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = this +internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult( + data = data?.let { it.asPlatform() }, + etag = etag, + status = status.asPlatform(), + errorCode = errorCode, +) +internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( + data = data?.let { it.asKmp() }, + etag = etag, + status = status.asKmp(), + errorCode = errorCode, +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index 51837cf22..eaea90ab1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -3,7 +3,19 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMTiled2dMapVectorAssetInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo +actual class KMTiled2dMapVectorAssetInfo actual public constructor( + featureIdentifiersUv: HashMap, + texture: KMTextureHolderInterface?, +) { + actual val featureIdentifiersUv: HashMap = featureIdentifiersUv + actual val texture: KMTextureHolderInterface? = texture +} -internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = this +internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo( + featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asPlatform() }.toMap()), + texture = texture?.let { it.asPlatform() }, +) +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( + featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asKmp() }.toMap()), + texture = texture?.let { it.asKmp() }, +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt index 6441e3b37..1d87fde68 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -25,7 +25,8 @@ private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(i override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): KMFuture { val result = nativeHandle.loadSpriteAsync(spriteId, url, scale) - return (result as com.snapchat.djinni.Future).asKmp() + @Suppress("UNCHECKED_CAST") + return (result as com.snapchat.djinni.Future).asKmp() } override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): KMFuture { @@ -49,7 +50,8 @@ private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(pri override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): com.snapchat.djinni.Future { val result = delegate.loadSpriteAsync(spriteId, url, scale) - return result.asPlatform() + @Suppress("UNCHECKED_CAST") + return result.asPlatform() as com.snapchat.djinni.Future } override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): com.snapchat.djinni.Future { diff --git a/build.gradle.kts b/build.gradle.kts index 1694c523b..fbc7f058d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,11 +10,15 @@ import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputDirectory +import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.InputFiles import org.gradle.api.tasks.Internal import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.CacheableTask +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.TaskAction import org.gradle.process.ExecOperations import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi @@ -44,41 +48,28 @@ val mapCoreSpmBuildType = (project.findProperty("KOTLIN_FRAMEWORK_BUILD_TYPE") a ?.takeIf { it == "debug" || it == "release" } ?: "release" val mapCoreSpmScratchDir = project.layout.buildDirectory.dir("spmKmpPlugin/MapCoreKmp/scratch") - -fun ensureLinkerOpts(defFile: File, opts: List) { - if (!defFile.exists()) return - val lines = defFile.readLines().toMutableList() - val idx = lines.indexOfFirst { it.trimStart().startsWith("linkerOpts") } - val optsText = opts.joinToString(" ") { it } - if (idx >= 0) { - val current = lines[idx] - val missing = opts.filterNot { current.contains(it) } - if (missing.isNotEmpty()) { - lines[idx] = current + " " + missing.joinToString(" ") - defFile.writeText(lines.joinToString("\n")) - } - } else { - lines.add("linkerOpts = $optsText") - defFile.writeText(lines.joinToString("\n")) - } -} - -fun stripLinkerOpts(defFile: File, optsToRemove: Set) { - if (!defFile.exists()) return - val lines = defFile.readLines().toMutableList() - val idx = lines.indexOfFirst { it.trimStart().startsWith("linkerOpts") } - if (idx < 0) return - val line = lines[idx] - val prefix = line.substringBefore("=").trimEnd() + " =" - val tokens = line.substringAfter("=").trim().split(Regex("\\s+")) - val filtered = tokens.filterNot { it in optsToRemove } - if (filtered.isEmpty()) { - lines.removeAt(idx) - } else { - lines[idx] = "$prefix ${filtered.joinToString(" ")}" - } - defFile.writeText(lines.joinToString("\n")) -} +val isIosOnlyInvocationFromRoot = System.getProperty("b2g.iosOnlyInvocation")?.toBoolean() == true +val requestedTasksLower = gradle.startParameter.taskNames.map { it.lowercase() } +val isIosOnlyInvocation = + isIosOnlyInvocationFromRoot || + ( + requestedTasksLower.isNotEmpty() && + requestedTasksLower.all { task -> + val looksLikeIosTask = + task.contains("ios") || + task.contains("swiftpackage") || + task.contains("xcode") || + task.contains("cinterop") + val looksLikeAndroidTask = + task.contains("android") || + task.contains("assemble") || + task.contains("bundle") || + task.contains("lint") || + task.contains("install") || + task.contains("connected") + looksLikeIosTask && !looksLikeAndroidTask + } + ) plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" @@ -198,11 +189,165 @@ abstract class CheckMapCoreGitTagTask : DefaultTask() { if (result.exitValue == 0) return val errorText = stderr.toString().trim() val detail = if (errorText.isNotBlank()) ": $errorText" else "" - logger.warn( + val warningMessage = "MapCore KMP build: current commit is not tagged. " + "Please use a release-tagged version of maps-core. " + - "(git describe --tags --exact-match HEAD failed$detail)", - ) + "(git describe --tags --exact-match HEAD failed$detail)" + val buildFilePath = project.layout.projectDirectory.file("build.gradle.kts").asFile.absolutePath + println("$buildFilePath:1: warning: $warningMessage") + } +} + +abstract class CopyFileIfExistsTask : DefaultTask() { + @get:InputFile + @get:Optional + abstract val sourceFile: RegularFileProperty + + @get:OutputFile + abstract val targetFile: RegularFileProperty + + @TaskAction + fun run() { + val source = sourceFile.orNull?.asFile ?: return + if (!source.exists()) return + val target = targetFile.get().asFile + target.parentFile.mkdirs() + source.copyTo(target, overwrite = true) + } +} + +abstract class RewriteMapCorePackageManifestTask : DefaultTask() { + @get:InputFile + @get:Optional + abstract val packageFile: RegularFileProperty + + @TaskAction + fun run() { + val file = packageFile.orNull?.asFile ?: return + if (!file.exists()) return + val original = file.readText() + var updated = original.replace("type: .dynamic", "type: .static") + updated = + updated.replace( + ".product(name: \"MapCore\", package: \"maps-core\"),.product(name: \"MapCoreSharedModule\", package: \"maps-core\")", + ".product(name: \"MapCore\", package: \"maps-core\")", + ) + updated = + updated.replace( + ".product(name: \"MapCore\", package: \"maps-core\"), .product(name: \"MapCoreSharedModule\", package: \"maps-core\")", + ".product(name: \"MapCore\", package: \"maps-core\")", + ) + if (!updated.contains("linkerSettings:")) { + updated = + updated.replace( + ",cSettings: [.headerSearchPath(\"Sources/djinni-objc\")]", + ",cSettings: [.headerSearchPath(\"Sources/djinni-objc\")],linkerSettings: [.linkedLibrary(\"objc\"),.linkedFramework(\"Foundation\")]", + ) + } + if (updated != original) { + file.writeText(updated) + } + } +} + +abstract class PatchMapCoreCInteropDefsTask : DefaultTask() { + @get:Internal + abstract val buildDirRoot: DirectoryProperty + + @get:Input + abstract val targetDirName: Property + + @get:Input + abstract val platformDirName: Property + + @get:Input + abstract val buildType: Property + + @TaskAction + fun run() { + val buildRoot = buildDirRoot.get().asFile + val targetDir = targetDirName.get() + val platformDir = platformDirName.get() + val type = buildType.get() + val libDir = File(buildRoot, "spmKmpPlugin/MapCoreKmp/scratch/$platformDir/$type") + val defRoot = File(buildRoot, "spmKmpPlugin/MapCoreKmp/defFiles/$targetDir") + val defNames = listOf("MapCoreSharedModule", "MapCoreKmp_bridge", "MapCoreKmp") + + defNames.forEach { defName -> + val defFile = File(defRoot, "$defName.def") + if (!defFile.exists()) return@forEach + val extraOpts = + when (defName) { + "MapCoreKmp_bridge" -> listOf("-L\"${libDir.absolutePath}\"", "-lMapCoreKmp") + else -> emptyList() + } + if (extraOpts.isNotEmpty()) { + ensureLinkerOpts(defFile, extraOpts) + } + stripLinkerOpts(defFile, setOf("-lMapCoreSharedModule")) + } + } + + private fun ensureLinkerOpts(defFile: File, opts: List) { + val lines = defFile.readLines().toMutableList() + val idx = lines.indexOfFirst { it.trimStart().startsWith("linkerOpts") } + val optsText = opts.joinToString(" ") + if (idx >= 0) { + val current = lines[idx] + val missing = opts.filterNot { current.contains(it) } + if (missing.isNotEmpty()) { + lines[idx] = current + " " + missing.joinToString(" ") + } + } else { + lines.add("linkerOpts = $optsText") + } + defFile.writeText(lines.joinToString("\n")) + } + + private fun stripLinkerOpts(defFile: File, optsToRemove: Set) { + val lines = defFile.readLines().toMutableList() + val idx = lines.indexOfFirst { it.trimStart().startsWith("linkerOpts") } + if (idx < 0) return + val line = lines[idx] + val prefix = line.substringBefore("=").trimEnd() + " =" + val tokens = line.substringAfter("=").trim().split(Regex("\\s+")) + val filtered = tokens.filterNot { it in optsToRemove } + if (filtered.isEmpty()) { + lines.removeAt(idx) + } else { + lines[idx] = "$prefix ${filtered.joinToString(" ")}" + } + defFile.writeText(lines.joinToString("\n")) + } +} + +abstract class CopyDirectoryContentsIfExistsTask : DefaultTask() { + @get:InputDirectory + @get:Optional + @get:PathSensitive(PathSensitivity.RELATIVE) + abstract val sourceDir: DirectoryProperty + + @get:OutputDirectory + abstract val targetDir: DirectoryProperty + + @TaskAction + fun run() { + val sourceRoot = sourceDir.orNull?.asFile ?: return + if (!sourceRoot.exists()) return + val targetRoot = targetDir.get().asFile + targetRoot.mkdirs() + + sourceRoot.walkTopDown().forEach { source -> + val relativePath = source.relativeTo(sourceRoot).path + if (relativePath.isEmpty()) return@forEach + val target = File(targetRoot, relativePath) + if (source.isDirectory) { + target.mkdirs() + } else { + target.parentFile.mkdirs() + source.copyTo(target, overwrite = true) + } + } } } @@ -219,125 +364,103 @@ tasks .configureEach { dependsOn(checkMapCoreGitTag) } tasks.matching { it.name == "build" || it.name == "assemble" } .configureEach { dependsOn(checkMapCoreGitTag) } +tasks.matching { it.name == "kmpPartiallyResolvedDependenciesChecker" } + .configureEach { + enabled = !isIosOnlyInvocation + } -// Avoid overlapping Package.resolved outputs between per-target SwiftPM compile tasks. +// spmForKmp tasks still use non-cache-safe execution APIs. Keep them functional while +// allowing configuration cache reuse for compatible task graphs. tasks - .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackage") } + .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmp") } .configureEach { - val packageResolveFileGetter = javaClass.methods.firstOrNull { it.name == "getPackageResolveFile" } - val packageResolveFile = + notCompatibleWithConfigurationCache( + "spmForKmp tasks access task/project state during execution", + ) + } + +// Avoid overlapping Package.resolved outputs between per-target SwiftPM compile tasks. +val syncPackageResolvedIosArm64 = tasks.register("syncMapCorePackageResolvedIosArm64") { + sourceFile.set(project.layout.buildDirectory.file("spmKmpPlugin/MapCoreKmp/Package.resolved")) + targetFile.set( + project.layout.buildDirectory.file( + "spmKmpPlugin/MapCoreKmp/package-resolved/SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64/Package.resolved", + ), + ) +} +val syncPackageResolvedIosSimulatorArm64 = + tasks.register("syncMapCorePackageResolvedIosSimulatorArm64") { + sourceFile.set(project.layout.buildDirectory.file("spmKmpPlugin/MapCoreKmp/Package.resolved")) + targetFile.set( project.layout.buildDirectory.file( - "spmKmpPlugin/MapCoreKmp/package-resolved/${name}/Package.resolved", - ) + "spmKmpPlugin/MapCoreKmp/package-resolved/SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosSimulatorArm64/Package.resolved", + ), + ) + } + +tasks.matching { it.name == "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64" } + .configureEach { + val packageResolveFileGetter = javaClass.methods.firstOrNull { it.name == "getPackageResolveFile" } val packageResolveProperty = packageResolveFileGetter ?.invoke(this) as? RegularFileProperty - packageResolveProperty?.set(packageResolveFile) - - doLast { - val sourceFile = - project.layout.buildDirectory - .file("spmKmpPlugin/MapCoreKmp/Package.resolved") - .get() - .asFile - if (!sourceFile.exists()) return@doLast - val targetFile = - project.layout.buildDirectory - .file("spmKmpPlugin/MapCoreKmp/package-resolved/${name}/Package.resolved") - .get() - .asFile - targetFile.parentFile.mkdirs() - sourceFile.copyTo(targetFile, overwrite = true) - } + packageResolveProperty?.set(syncPackageResolvedIosArm64.flatMap { it.targetFile }) + finalizedBy(syncPackageResolvedIosArm64) } - -// Ensure MapCoreKmp is built as a static SwiftPM library; MapCore symbols should be provided by the host app. -tasks - .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateSwiftPackage") } +tasks.matching { it.name == "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosSimulatorArm64" } .configureEach { - doLast { - val packageFile = - project.layout.buildDirectory - .file("spmKmpPlugin/MapCoreKmp/Package.swift") - .get() - .asFile - if (!packageFile.exists()) return@doLast - val original = packageFile.readText() - var updated = original.replace("type: .dynamic", "type: .static") - updated = - updated.replace( - ".product(name: \"MapCore\", package: \"maps-core\"),.product(name: \"MapCoreSharedModule\", package: \"maps-core\")", - ".product(name: \"MapCore\", package: \"maps-core\")", - ) - updated = - updated.replace( - ".product(name: \"MapCore\", package: \"maps-core\"), .product(name: \"MapCoreSharedModule\", package: \"maps-core\")", - ".product(name: \"MapCore\", package: \"maps-core\")", - ) - if (!updated.contains("linkerSettings:")) { - updated = - updated.replace( - ",cSettings: [.headerSearchPath(\"Sources/djinni-objc\")]", - ",cSettings: [.headerSearchPath(\"Sources/djinni-objc\")],linkerSettings: [.linkedLibrary(\"objc\"),.linkedFramework(\"Foundation\")]", - ) - } - if (updated != original) { - packageFile.writeText(updated) - } - } + val packageResolveFileGetter = javaClass.methods.firstOrNull { it.name == "getPackageResolveFile" } + val packageResolveProperty = + packageResolveFileGetter + ?.invoke(this) as? RegularFileProperty + packageResolveProperty?.set(syncPackageResolvedIosSimulatorArm64.flatMap { it.targetFile }) + finalizedBy(syncPackageResolvedIosSimulatorArm64) } +// Ensure MapCoreKmp is built as a static SwiftPM library; MapCore symbols should be provided by the host app. +val rewriteMapCorePackageManifest = tasks.register("rewriteMapCorePackageManifest") { + packageFile.set(project.layout.buildDirectory.file("spmKmpPlugin/MapCoreKmp/Package.swift")) +} +tasks.matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateSwiftPackage") } + .configureEach { finalizedBy(rewriteMapCorePackageManifest) } + // SwiftPM emits libMapCoreKmp.a for static builds (debug + release). -gradle.projectsEvaluated { -tasks - .matching { it.name.startsWith("SwiftPackageConfigAppleMapCoreKmpGenerateCInteropDefinition") } +val patchMapCoreCInteropDefsIosArm64 = tasks.register("patchMapCoreCInteropDefsIosArm64") { + buildDirRoot.set(project.layout.buildDirectory) + targetDirName.set("iosArm64") + platformDirName.set("arm64-apple-ios") + buildType.set(mapCoreSpmBuildType) +} +val patchMapCoreCInteropDefsIosSimulatorArm64 = + tasks.register("patchMapCoreCInteropDefsIosSimulatorArm64") { + buildDirRoot.set(project.layout.buildDirectory) + targetDirName.set("iosSimulatorArm64") + platformDirName.set("arm64-apple-ios-simulator") + buildType.set(mapCoreSpmBuildType) + } + +tasks.matching { it.name == "SwiftPackageConfigAppleMapCoreKmpGenerateCInteropDefinitionIosArm64" } .configureEach { - val platformDir = - when { - name.contains("IosArm64") -> "arm64-apple-ios" - name.contains("IosSimulatorArm64") -> "arm64-apple-ios-simulator" - else -> return@configureEach - } val compiledBinaryProp = javaClass.getMethod("getCompiledBinary").invoke(this) as RegularFileProperty compiledBinaryProp.set( project.layout.buildDirectory.file( - "spmKmpPlugin/MapCoreKmp/scratch/$platformDir/$mapCoreSpmBuildType/libMapCoreKmp.a", + "spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios/$mapCoreSpmBuildType/libMapCoreKmp.a", ), ) - doLast { - val targetDir = - when { - name.contains("IosArm64") -> "iosArm64" - name.contains("IosSimulatorArm64") -> "iosSimulatorArm64" - else -> return@doLast - } - val defNames = listOf("MapCoreSharedModule", "MapCoreKmp_bridge", "MapCoreKmp") - val libDir = - project.layout.buildDirectory - .dir("spmKmpPlugin/MapCoreKmp/scratch/$platformDir/$mapCoreSpmBuildType") - .get() - .asFile - defNames.forEach { defName -> - val defFile = - project.layout.buildDirectory - .file("spmKmpPlugin/MapCoreKmp/defFiles/$targetDir/$defName.def") - .get() - .asFile - if (!defFile.exists()) return@forEach - val extraOpts = - when (defName) { - "MapCoreKmp_bridge" -> listOf("-L\"${libDir.absolutePath}\"", "-lMapCoreKmp") - else -> emptyList() - } - if (extraOpts.isNotEmpty()) { - ensureLinkerOpts(defFile, extraOpts) - } - stripLinkerOpts(defFile, setOf("-lMapCoreSharedModule")) - } - } + finalizedBy(patchMapCoreCInteropDefsIosArm64) + } +tasks.matching { it.name == "SwiftPackageConfigAppleMapCoreKmpGenerateCInteropDefinitionIosSimulatorArm64" } + .configureEach { + val compiledBinaryProp = + javaClass.getMethod("getCompiledBinary").invoke(this) as RegularFileProperty + compiledBinaryProp.set( + project.layout.buildDirectory.file( + "spmKmpPlugin/MapCoreKmp/scratch/arm64-apple-ios-simulator/$mapCoreSpmBuildType/libMapCoreKmp.a", + ), + ) + finalizedBy(patchMapCoreCInteropDefsIosSimulatorArm64) } -} tasks.withType().configureEach { if (name.contains("MapCore")) { @@ -360,20 +483,12 @@ afterEvaluate { val simulatorTaskName = "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosSimulatorArm64" if (tasks.findByName(deviceTaskName) != null) return@afterEvaluate runCatching { - tasks.register(deviceTaskName) { + tasks.register(deviceTaskName) { group = "io.github.frankois944.spmForKmp.tasks" description = "Fallback: copy simulator SwiftPM output for iOS device metal compilation" dependsOn(simulatorTaskName) - doLast { - val sourceDir = mapCoreSpmSimulatorDir.get().asFile - if (!sourceDir.exists()) return@doLast - val targetDir = mapCoreSpmDeviceDir.get().asFile - targetDir.mkdirs() - copy { - from(sourceDir) - into(targetDir) - } - } + sourceDir.set(mapCoreSpmSimulatorDir) + targetDir.set(mapCoreSpmDeviceDir) } }.onFailure { error -> val message = error.message.orEmpty() @@ -383,6 +498,7 @@ afterEvaluate { } } +@CacheableTask abstract class CompileMapCoreMetallibTask : DefaultTask() { @get:Input abstract val sdk: Property @@ -398,9 +514,11 @@ abstract class CompileMapCoreMetallibTask : DefaultTask() { @get:InputDirectory @get:Optional + @get:PathSensitive(PathSensitivity.RELATIVE) abstract val bundleDir: DirectoryProperty @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) abstract val metalSources: ConfigurableFileCollection @get:OutputDirectory diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt index 81544d311..8f2db2bc2 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt @@ -1,3 +1,3 @@ package io.openmobilemaps.mapscore.kmp -expect class KMDataRef +expect abstract class KMDataRef diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt index 8915a8ad9..adf79139a 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataRef.kt @@ -1,6 +1,15 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMDataRef = platform.Foundation.NSData +actual abstract class KMDataRef internal constructor() { + internal abstract fun asNSData(): platform.Foundation.NSData +} -internal fun KMDataRef.asPlatform(): platform.Foundation.NSData = this -internal fun platform.Foundation.NSData.asKmp(): KMDataRef = this +private class KMDataRefPlatformWrapper( + private val nativeHandle: platform.Foundation.NSData, +) : KMDataRef() { + override fun asNSData(): platform.Foundation.NSData = nativeHandle +} + +internal fun KMDataRef.asPlatform(): platform.Foundation.NSData = asNSData() +internal fun platform.Foundation.NSData.asKmp(): KMDataRef = KMDataRefPlatformWrapper(this) +fun platform.Foundation.NSData.toKMDataRef(): KMDataRef = KMDataRefPlatformWrapper(this) diff --git a/settings.gradle.kts b/settings.gradle.kts index f5330b064..9b9dfa89b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,26 @@ rootProject.name = "maps-core" +val requestedTasksLower = gradle.startParameter.taskNames.map { it.lowercase() } +val isIosOnlyInvocationFromProperty = System.getProperty("b2g.iosOnlyInvocation")?.toBoolean() == true +val isIosOnlyInvocationFromTasks = + requestedTasksLower.isNotEmpty() && + requestedTasksLower.all { task -> + val looksLikeIosTask = + task.contains("ios") || + task.contains("swiftpackage") || + task.contains("xcode") || + task.contains("cinterop") + val looksLikeAndroidTask = + task.contains("android") || + task.contains("assemble") || + task.contains("bundle") || + task.contains("lint") || + task.contains("install") || + task.contains("connected") + looksLikeIosTask && !looksLikeAndroidTask + } +val isIosOnlyInvocation = isIosOnlyInvocationFromProperty || isIosOnlyInvocationFromTasks + pluginManagement { repositories { google() @@ -14,3 +35,11 @@ dependencyResolutionManagement { mavenCentral() } } + +if (!isIosOnlyInvocation) { + includeBuild("android") { + dependencySubstitution { + substitute(module("io.openmobilemaps:mapscore")).using(project(":")) + } + } +} From 7ed9bad2daea5b5dac0b3190a89d0798f5072ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Fri, 6 Feb 2026 10:02:29 +0100 Subject: [PATCH 56/63] update djinni --- .../kmp/KMAlphaInstancedShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMAlphaShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMBoundingBoxInterface.kt | 10 ++++--- .../mapscore/kmp/KMCamera3dConfigFactory.kt | 12 +++++---- .../mapscore/kmp/KMCameraInterface.kt | 10 ++++--- .../kmp/KMColorCircleShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMColorShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMComputeObjectInterface.kt | 10 ++++--- .../mapscore/kmp/KMComputePassInterface.kt | 10 ++++--- .../KMCoordinateConversionHelperInterface.kt | 10 ++++--- .../kmp/KMCoordinateConverterInterface.kt | 10 ++++--- .../mapscore/kmp/KMCoordinateSystemFactory.kt | 18 +++++++------ .../kmp/KMCoordinateSystemIdentifiers.kt | 24 +++++++++-------- .../kmp/KMCpuPerformanceLoggerInterface.kt | 12 +++++---- .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 16 +++++++----- .../kmp/KMDefaultTouchHandlerInterface.kt | 10 ++++--- ...KMElevationInterpolationShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMErrorManager.kt | 10 ++++--- .../mapscore/kmp/KMErrorManagerListener.kt | 10 ++++--- .../kmp/KMExceptionLoggerDelegateInterface.kt | 10 ++++--- .../kmp/KMExceptionLoggerInterface.kt | 10 ++++--- .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 22 +++++++++------- .../mapscore/kmp/KMFontLoaderInterface.kt | 10 ++++--- .../mapscore/kmp/KMFontLoaderResult.kt | 22 +++------------- .../kmp/KMGeoJsonFeatureParserInterface.kt | 10 ++++--- .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 10 ++++--- .../kmp/KMGraphicsObjectFactoryInterface.kt | 10 ++++--- .../mapscore/kmp/KMGraphicsObjectInterface.kt | 10 ++++--- .../mapscore/kmp/KMIconFactory.kt | 12 +++++---- .../mapscore/kmp/KMIconInfoInterface.kt | 8 +++--- .../kmp/KMIconLayerCallbackInterface.kt | 10 ++++--- .../mapscore/kmp/KMIconLayerInterface.kt | 10 ++++--- .../mapscore/kmp/KMIcosahedronInterface.kt | 10 ++++--- .../KMIcosahedronLayerCallbackInterface.kt | 10 ++++--- .../kmp/KMIcosahedronLayerInterface.kt | 10 ++++--- .../mapscore/kmp/KMIndexedLayerInterface.kt | 10 ++++--- .../mapscore/kmp/KMLayerInterface.kt | 10 ++++--- .../mapscore/kmp/KMLayerObjectInterface.kt | 8 +++--- .../mapscore/kmp/KMLineFactory.kt | 10 ++++--- .../mapscore/kmp/KMLineGroup2dInterface.kt | 10 ++++--- .../kmp/KMLineGroupShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMLineInfoInterface.kt | 8 +++--- .../kmp/KMLineLayerCallbackInterface.kt | 10 ++++--- .../mapscore/kmp/KMLineLayerInterface.kt | 10 ++++--- .../mapscore/kmp/KMLoaderInterface.kt | 16 ++++++------ .../mapscore/kmp/KMMapCallbackInterface.kt | 10 ++++--- .../mapscore/kmp/KMMapCamera3dInterface.kt | 8 +++--- .../mapscore/kmp/KMMapCameraInterface.kt | 10 ++++--- .../kmp/KMMapCameraListenerInterface.kt | 10 ++++--- .../mapscore/kmp/KMMapInterface.kt | 12 +++++---- .../kmp/KMMapReadyCallbackInterface.kt | 10 ++++--- .../mapscore/kmp/KMMapsCoreSharedModule.kt | 10 ++++--- .../mapscore/kmp/KMMaskingObjectInterface.kt | 10 ++++--- .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 12 +++++---- .../kmp/KMOpenGlRenderTargetInterface.kt | 10 ++++--- .../kmp/KMOpenGlRenderingContextInterface.kt | 10 ++++--- .../kmp/KMPerformanceLoggerInterface.kt | 10 ++++--- .../mapscore/kmp/KMPolygon2dInterface.kt | 10 ++++--- .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 10 ++++--- .../kmp/KMPolygonGroupShaderInterface.kt | 8 +++--- .../kmp/KMPolygonLayerCallbackInterface.kt | 10 ++++--- .../mapscore/kmp/KMPolygonLayerInterface.kt | 10 ++++--- .../kmp/KMPolygonMaskObjectInterface.kt | 10 ++++--- .../kmp/KMPolygonPatternGroup2dInterface.kt | 10 ++++--- .../KMPolygonPatternGroupShaderInterface.kt | 8 +++--- .../kmp/KMQuad2dInstancedInterface.kt | 10 ++++--- .../mapscore/kmp/KMQuad2dInterface.kt | 10 ++++--- .../KMQuad2dStretchedInstancedInterface.kt | 10 ++++--- .../mapscore/kmp/KMRasterShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMRectanglePacker.kt | 10 ++++--- .../mapscore/kmp/KMRenderConfigInterface.kt | 8 +++--- .../mapscore/kmp/KMRenderObjectInterface.kt | 10 ++++--- .../mapscore/kmp/KMRenderPassConfig.kt | 22 +++------------- .../mapscore/kmp/KMRenderPassInterface.kt | 10 ++++--- .../mapscore/kmp/KMRenderTargetInterface.kt | 10 ++++--- .../mapscore/kmp/KMRendererInterface.kt | 10 ++++--- .../kmp/KMRenderingContextInterface.kt | 10 ++++--- .../kmp/KMReverseGeocoderInterface.kt | 10 ++++--- .../mapscore/kmp/KMSceneCallbackInterface.kt | 10 ++++--- .../mapscore/kmp/KMSceneInterface.kt | 12 +++++---- .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 8 +++--- .../mapscore/kmp/KMSchedulerInterface.kt | 10 ++++--- .../mapscore/kmp/KMShaderFactoryInterface.kt | 10 ++++--- .../mapscore/kmp/KMShaderProgramInterface.kt | 8 +++--- .../mapscore/kmp/KMSkySphereLayerInterface.kt | 10 ++++--- .../kmp/KMSkySphereShaderInterface.kt | 8 +++--- .../kmp/KMSphereEffectLayerInterface.kt | 10 ++++--- .../kmp/KMSphereEffectShaderInterface.kt | 8 +++--- .../kmp/KMStretchInstancedShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMStretchShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMTaskInterface.kt | 10 ++++--- .../mapscore/kmp/KMTextFactory.kt | 10 ++++--- .../mapscore/kmp/KMTextInfoInterface.kt | 10 ++++--- .../mapscore/kmp/KMTextInstancedInterface.kt | 10 ++++--- .../kmp/KMTextInstancedShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMTextInterface.kt | 10 ++++--- .../mapscore/kmp/KMTextLayerInterface.kt | 10 ++++--- .../mapscore/kmp/KMTextShaderInterface.kt | 8 +++--- .../mapscore/kmp/KMTextureAtlas.kt | 18 +++---------- .../mapscore/kmp/KMTextureHolderInterface.kt | 10 ++++--- .../mapscore/kmp/KMTextureLoaderResult.kt | 26 +++---------------- .../mapscore/kmp/KMThreadPoolScheduler.kt | 10 ++++--- .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 10 ++++--- ...MTiled2dMapRasterLayerCallbackInterface.kt | 10 ++++--- .../kmp/KMTiled2dMapRasterLayerInterface.kt | 14 +++++----- .../kmp/KMTiled2dMapReadyStateListener.kt | 10 ++++--- .../kmp/KMTiled2dMapSourceInterface.kt | 8 +++--- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 18 +++---------- .../kmp/KMTiled2dMapVectorLayerInterface.kt | 12 +++++---- ...apVectorLayerLocalDataProviderInterface.kt | 16 ++++++------ ...apVectorLayerSelectionCallbackInterface.kt | 10 ++++--- ...2dMapVectorLayerSymbolDelegateInterface.kt | 10 ++++--- .../mapscore/kmp/KMTouchHandlerInterface.kt | 10 ++++--- .../mapscore/kmp/KMTouchInterface.kt | 10 ++++--- .../kmp/KMWmtsCapabilitiesResource.kt | 10 ++++--- .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 10 ++++--- external/djinni | 2 +- 117 files changed, 692 insertions(+), 550 deletions(-) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt index c2d5dfc35..29043e09c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface + actual class KMAlphaInstancedShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface + private val native = nativeHandle as AlphaInstancedShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() @@ -15,5 +17,5 @@ actual class KMAlphaInstancedShaderInterface actual public constructor( } } -internal fun KMAlphaInstancedShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) +internal fun KMAlphaInstancedShaderInterface.asPlatform(): AlphaInstancedShaderInterface = nativeHandle as AlphaInstancedShaderInterface +internal fun AlphaInstancedShaderInterface.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt index 08cd99f70..e5abcbd75 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface + actual class KMAlphaShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface + private val native = nativeHandle as AlphaShaderInterface actual fun updateAlpha(value: Float) { native.updateAlpha(value) @@ -19,5 +21,5 @@ actual class KMAlphaShaderInterface actual public constructor( } } -internal fun KMAlphaShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) +internal fun KMAlphaShaderInterface.asPlatform(): AlphaShaderInterface = nativeHandle as AlphaShaderInterface +internal fun AlphaShaderInterface.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt index a1cdf3288..3544ede9f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface + actual class KMBoundingBoxInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface + private val native = nativeHandle as BoundingBoxInterface actual fun addPoint(p: KMCoord) { native.addPoint(p.asPlatform()) @@ -42,11 +44,11 @@ actual class KMBoundingBoxInterface actual public constructor( { actual fun create(systemIdentifier: Int): KMBoundingBoxInterface { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface.create(systemIdentifier) + val result = BoundingBoxInterface.create(systemIdentifier) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface)).asKmp() } } } -internal fun KMBoundingBoxInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) +internal fun KMBoundingBoxInterface.asPlatform(): BoundingBoxInterface = nativeHandle as BoundingBoxInterface +internal fun BoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt index a3dc6c269..eb94112f1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -3,26 +3,28 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory + actual class KMCamera3dConfigFactory actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory + private val native = nativeHandle as Camera3dConfigFactory actual companion object { actual fun getBasicConfig(): KMCamera3dConfig { - val result = io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getBasicConfig() + val result = Camera3dConfigFactory.getBasicConfig() return (result as io.openmobilemaps.mapscore.shared.map.Camera3dConfig).asKmp() } actual fun getRestorConfig(): KMCamera3dConfig { - val result = io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.getRestorConfig() + val result = Camera3dConfigFactory.getRestorConfig() return (result as io.openmobilemaps.mapscore.shared.map.Camera3dConfig).asKmp() } } } -internal fun KMCamera3dConfigFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory -internal fun io.openmobilemaps.mapscore.shared.map.Camera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) +internal fun KMCamera3dConfigFactory.asPlatform(): Camera3dConfigFactory = nativeHandle as Camera3dConfigFactory +internal fun Camera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt index 332e105fa..d69e5b93a 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.CameraInterface + actual interface KMCameraInterface { @@ -15,7 +17,7 @@ actual interface KMCameraInterface actual fun viewportSizeChanged() } -private class KMCameraInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.CameraInterface) : KMCameraInterface +private class KMCameraInterfacePlatformWrapper(internal val nativeHandle: CameraInterface) : KMCameraInterface { override fun getVpMatrix(): ArrayList { @@ -38,7 +40,7 @@ private class KMCameraInterfacePlatformWrapper(internal val nativeHandle: io.ope } } -private class KMCameraInterfacePlatformProxy(private val delegate: KMCameraInterface) : io.openmobilemaps.mapscore.shared.graphics.CameraInterface() +private class KMCameraInterfacePlatformProxy(private val delegate: KMCameraInterface) : CameraInterface() { override fun getVpMatrix(): ArrayList { @@ -61,8 +63,8 @@ private class KMCameraInterfacePlatformProxy(private val delegate: KMCameraInter } } -internal fun KMCameraInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.CameraInterface = when (this) { +internal fun KMCameraInterface.asPlatform(): CameraInterface = when (this) { is KMCameraInterfacePlatformWrapper -> this.nativeHandle else -> KMCameraInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.CameraInterface.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) +internal fun CameraInterface.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt index 3a1b66ec9..90b1a8983 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface + actual class KMColorCircleShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface + private val native = nativeHandle as ColorCircleShaderInterface actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { native.setColor(red, green, blue, alpha) @@ -19,5 +21,5 @@ actual class KMColorCircleShaderInterface actual public constructor( } } -internal fun KMColorCircleShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) +internal fun KMColorCircleShaderInterface.asPlatform(): ColorCircleShaderInterface = nativeHandle as ColorCircleShaderInterface +internal fun ColorCircleShaderInterface.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt index 6fdd75e92..13235541c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface + actual class KMColorShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface + private val native = nativeHandle as ColorShaderInterface actual fun setColor(red: Float, green: Float, blue: Float, alpha: Float) { native.setColor(red, green, blue, alpha) @@ -19,5 +21,5 @@ actual class KMColorShaderInterface actual public constructor( } } -internal fun KMColorShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) +internal fun KMColorShaderInterface.asPlatform(): ColorShaderInterface = nativeHandle as ColorShaderInterface +internal fun ColorShaderInterface.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt index 5510fd170..11b2eb40c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface + actual interface KMComputeObjectInterface { actual fun compute(context: KMRenderingContextInterface, vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) } -private class KMComputeObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface) : KMComputeObjectInterface +private class KMComputeObjectInterfacePlatformWrapper(internal val nativeHandle: ComputeObjectInterface) : KMComputeObjectInterface { override fun compute(context: KMRenderingContextInterface, vpMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double) { @@ -17,7 +19,7 @@ private class KMComputeObjectInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMComputeObjectInterfacePlatformProxy(private val delegate: KMComputeObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface() +private class KMComputeObjectInterfacePlatformProxy(private val delegate: KMComputeObjectInterface) : ComputeObjectInterface() { override fun compute(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, vpMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, screenPixelAsRealMeterFactor: Double) { @@ -25,8 +27,8 @@ private class KMComputeObjectInterfacePlatformProxy(private val delegate: KMComp } } -internal fun KMComputeObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface = when (this) { +internal fun KMComputeObjectInterface.asPlatform(): ComputeObjectInterface = when (this) { is KMComputeObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMComputeObjectInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) +internal fun ComputeObjectInterface.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt index 88beefc5c..4c08f8d10 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface + actual interface KMComputePassInterface { actual fun getComputeObjects(): ArrayList } -private class KMComputePassInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface) : KMComputePassInterface +private class KMComputePassInterfacePlatformWrapper(internal val nativeHandle: ComputePassInterface) : KMComputePassInterface { override fun getComputeObjects(): ArrayList { @@ -18,7 +20,7 @@ private class KMComputePassInterfacePlatformWrapper(internal val nativeHandle: i } } -private class KMComputePassInterfacePlatformProxy(private val delegate: KMComputePassInterface) : io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface() +private class KMComputePassInterfacePlatformProxy(private val delegate: KMComputePassInterface) : ComputePassInterface() { override fun getComputeObjects(): ArrayList { @@ -27,8 +29,8 @@ private class KMComputePassInterfacePlatformProxy(private val delegate: KMComput } } -internal fun KMComputePassInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface = when (this) { +internal fun KMComputePassInterface.asPlatform(): ComputePassInterface = when (this) { is KMComputePassInterfacePlatformWrapper -> this.nativeHandle else -> KMComputePassInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) +internal fun ComputePassInterface.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt index a94d6061b..85e1883c4 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface + actual class KMCoordinateConversionHelperInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface + private val native = nativeHandle as CoordinateConversionHelperInterface actual fun registerConverter(converter: KMCoordinateConverterInterface) { native.registerConverter(converter.asPlatform()) @@ -47,11 +49,11 @@ actual class KMCoordinateConversionHelperInterface actual public constructor( { actual fun independentInstance(): KMCoordinateConversionHelperInterface { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface.independentInstance() + val result = CoordinateConversionHelperInterface.independentInstance() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface)).asKmp() } } } -internal fun KMCoordinateConversionHelperInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) +internal fun KMCoordinateConversionHelperInterface.asPlatform(): CoordinateConversionHelperInterface = nativeHandle as CoordinateConversionHelperInterface +internal fun CoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt index bac7dc366..b2df15cae 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface + actual interface KMCoordinateConverterInterface { @@ -13,7 +15,7 @@ actual interface KMCoordinateConverterInterface actual fun getTo(): Int } -private class KMCoordinateConverterInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface) : KMCoordinateConverterInterface +private class KMCoordinateConverterInterfacePlatformWrapper(internal val nativeHandle: CoordinateConverterInterface) : KMCoordinateConverterInterface { override fun convert(coordinate: KMCoord): KMCoord { @@ -32,7 +34,7 @@ private class KMCoordinateConverterInterfacePlatformWrapper(internal val nativeH } } -private class KMCoordinateConverterInterfacePlatformProxy(private val delegate: KMCoordinateConverterInterface) : io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface() +private class KMCoordinateConverterInterfacePlatformProxy(private val delegate: KMCoordinateConverterInterface) : CoordinateConverterInterface() { override fun convert(coordinate: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): io.openmobilemaps.mapscore.shared.map.coordinates.Coord { @@ -51,8 +53,8 @@ private class KMCoordinateConverterInterfacePlatformProxy(private val delegate: } } -internal fun KMCoordinateConverterInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface = when (this) { +internal fun KMCoordinateConverterInterface.asPlatform(): CoordinateConverterInterface = when (this) { is KMCoordinateConverterInterfacePlatformWrapper -> this.nativeHandle else -> KMCoordinateConverterInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConverterInterface.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) +internal fun CoordinateConverterInterface.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt index 1d2622155..aae3b6165 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -3,41 +3,43 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory + actual class KMCoordinateSystemFactory actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory + private val native = nativeHandle as CoordinateSystemFactory actual companion object { actual fun getEpsg2056System(): KMMapCoordinateSystem { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg2056System() + val result = CoordinateSystemFactory.getEpsg2056System() return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() } actual fun getEpsg3857System(): KMMapCoordinateSystem { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg3857System() + val result = CoordinateSystemFactory.getEpsg3857System() return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() } actual fun getEpsg4326System(): KMMapCoordinateSystem { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg4326System() + val result = CoordinateSystemFactory.getEpsg4326System() return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() } actual fun getEpsg21781System(): KMMapCoordinateSystem { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getEpsg21781System() + val result = CoordinateSystemFactory.getEpsg21781System() return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() } actual fun getUnitSphereSystem(): KMMapCoordinateSystem { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.getUnitSphereSystem() + val result = CoordinateSystemFactory.getUnitSphereSystem() return (result as io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem).asKmp() } } } -internal fun KMCoordinateSystemFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) +internal fun KMCoordinateSystemFactory.asPlatform(): CoordinateSystemFactory = nativeHandle as CoordinateSystemFactory +internal fun CoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt index e0d41630a..fe6b99ab6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -3,56 +3,58 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers + actual class KMCoordinateSystemIdentifiers actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers + private val native = nativeHandle as CoordinateSystemIdentifiers actual companion object { actual fun RENDERSYSTEM(): Int { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.RENDERSYSTEM() + val result = CoordinateSystemIdentifiers.RENDERSYSTEM() return result } actual fun EPSG3857(): Int { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG3857() + val result = CoordinateSystemIdentifiers.EPSG3857() return result } actual fun EPSG4326(): Int { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG4326() + val result = CoordinateSystemIdentifiers.EPSG4326() return result } actual fun EPSG2056(): Int { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG2056() + val result = CoordinateSystemIdentifiers.EPSG2056() return result } actual fun EPSG21781(): Int { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.EPSG21781() + val result = CoordinateSystemIdentifiers.EPSG21781() return result } actual fun UnitSphere(): Int { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.UnitSphere() + val result = CoordinateSystemIdentifiers.UnitSphere() return result } actual fun fromCrsIdentifier(identifier: String): Int { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.fromCrsIdentifier(identifier) + val result = CoordinateSystemIdentifiers.fromCrsIdentifier(identifier) return result } actual fun unitToMeterFactor(coordinateSystemIdentifier: Int): Double { - val result = io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.unitToMeterFactor(coordinateSystemIdentifier) + val result = CoordinateSystemIdentifiers.unitToMeterFactor(coordinateSystemIdentifier) return result } } } -internal fun KMCoordinateSystemIdentifiers.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers = nativeHandle as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) +internal fun KMCoordinateSystemIdentifiers.asPlatform(): CoordinateSystemIdentifiers = nativeHandle as CoordinateSystemIdentifiers +internal fun CoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt index 3b4a2b63d..6f4aa8f91 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface + actual class KMCpuPerformanceLoggerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface + private val native = nativeHandle as CpuPerformanceLoggerInterface actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { val result = native.asPerformanceLoggerInterface() @@ -18,16 +20,16 @@ actual class KMCpuPerformanceLoggerInterface actual public constructor( { actual fun create(): KMCpuPerformanceLoggerInterface { - val result = io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface.create() + val result = CpuPerformanceLoggerInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface)).asKmp() } actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMCpuPerformanceLoggerInterface { - val result = io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) + val result = CpuPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface)).asKmp() } } } -internal fun KMCpuPerformanceLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface -internal fun io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) +internal fun KMCpuPerformanceLoggerInterface.asPlatform(): CpuPerformanceLoggerInterface = nativeHandle as CpuPerformanceLoggerInterface +internal fun CpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt index 8c02df3a8..355728882 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -3,36 +3,38 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs + actual class KMDefaultTiled2dMapLayerConfigs actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs + private val native = nativeHandle as DefaultTiled2dMapLayerConfigs actual companion object { actual fun webMercator(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.webMercator(layerName, urlFormat) + val result = DefaultTiled2dMapLayerConfigs.webMercator(layerName, urlFormat) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } actual fun webMercatorCustom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo?, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.webMercatorCustom(layerName, urlFormat, zoomInfo?.let { it.asPlatform() }, minZoomLevel, maxZoomLevel) + val result = DefaultTiled2dMapLayerConfigs.webMercatorCustom(layerName, urlFormat, zoomInfo?.let { it.asPlatform() }, minZoomLevel, maxZoomLevel) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } actual fun epsg4326(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.epsg4326(layerName, urlFormat) + val result = DefaultTiled2dMapLayerConfigs.epsg4326(layerName, urlFormat) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } actual fun epsg4326Custom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.epsg4326Custom(layerName, urlFormat, zoomInfo.asPlatform(), minZoomLevel, maxZoomLevel) + val result = DefaultTiled2dMapLayerConfigs.epsg4326Custom(layerName, urlFormat, zoomInfo.asPlatform(), minZoomLevel, maxZoomLevel) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } } } -internal fun KMDefaultTiled2dMapLayerConfigs.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.DefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) +internal fun KMDefaultTiled2dMapLayerConfigs.asPlatform(): DefaultTiled2dMapLayerConfigs = nativeHandle as DefaultTiled2dMapLayerConfigs +internal fun DefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt index a59fc5d52..ad7a26b03 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -3,21 +3,23 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface + actual class KMDefaultTouchHandlerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface + private val native = nativeHandle as DefaultTouchHandlerInterface actual companion object { actual fun create(scheduler: KMSchedulerInterface, density: Float): KMTouchHandlerInterface { - val result = io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface.create(scheduler.asPlatform(), density) + val result = DefaultTouchHandlerInterface.create(scheduler.asPlatform(), density) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface)).asKmp() } } } -internal fun KMDefaultTouchHandlerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface -internal fun io.openmobilemaps.mapscore.shared.map.controls.DefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) +internal fun KMDefaultTouchHandlerInterface.asPlatform(): DefaultTouchHandlerInterface = nativeHandle as DefaultTouchHandlerInterface +internal fun DefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt index 1be0b33ac..fa504d147 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface + actual class KMElevationInterpolationShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface + private val native = nativeHandle as ElevationInterpolationShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() @@ -15,5 +17,5 @@ actual class KMElevationInterpolationShaderInterface actual public constructor( } } -internal fun KMElevationInterpolationShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) +internal fun KMElevationInterpolationShaderInterface.asPlatform(): ElevationInterpolationShaderInterface = nativeHandle as ElevationInterpolationShaderInterface +internal fun ElevationInterpolationShaderInterface.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt index ff7acec15..14fbe21bf 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.ErrorManager + actual class KMErrorManager actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.ErrorManager + private val native = nativeHandle as ErrorManager actual fun addTiledLayerError(error: KMTiledLayerError) { native.addTiledLayerError(error.asPlatform()) @@ -37,11 +39,11 @@ actual class KMErrorManager actual public constructor( { actual fun create(): KMErrorManager { - val result = io.openmobilemaps.mapscore.shared.map.ErrorManager.create() + val result = ErrorManager.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.ErrorManager)).asKmp() } } } -internal fun KMErrorManager.asPlatform(): io.openmobilemaps.mapscore.shared.map.ErrorManager = nativeHandle as io.openmobilemaps.mapscore.shared.map.ErrorManager -internal fun io.openmobilemaps.mapscore.shared.map.ErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) +internal fun KMErrorManager.asPlatform(): ErrorManager = nativeHandle as ErrorManager +internal fun ErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt index 23c982aa0..b22e6aa32 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.ErrorManagerListener + actual interface KMErrorManagerListener { actual fun onTiledLayerErrorStateChanged(errors: ArrayList) } -private class KMErrorManagerListenerPlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.ErrorManagerListener) : KMErrorManagerListener +private class KMErrorManagerListenerPlatformWrapper(internal val nativeHandle: ErrorManagerListener) : KMErrorManagerListener { override fun onTiledLayerErrorStateChanged(errors: ArrayList) { @@ -17,7 +19,7 @@ private class KMErrorManagerListenerPlatformWrapper(internal val nativeHandle: i } } -private class KMErrorManagerListenerPlatformProxy(private val delegate: KMErrorManagerListener) : io.openmobilemaps.mapscore.shared.map.ErrorManagerListener() +private class KMErrorManagerListenerPlatformProxy(private val delegate: KMErrorManagerListener) : ErrorManagerListener() { override fun onTiledLayerErrorStateChanged(errors: ArrayList) { @@ -25,8 +27,8 @@ private class KMErrorManagerListenerPlatformProxy(private val delegate: KMErrorM } } -internal fun KMErrorManagerListener.asPlatform(): io.openmobilemaps.mapscore.shared.map.ErrorManagerListener = when (this) { +internal fun KMErrorManagerListener.asPlatform(): ErrorManagerListener = when (this) { is KMErrorManagerListenerPlatformWrapper -> this.nativeHandle else -> KMErrorManagerListenerPlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.ErrorManagerListener.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) +internal fun ErrorManagerListener.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt index b9f1b5873..36838ec0c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface + actual interface KMExceptionLoggerDelegateInterface { actual fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) } -private class KMExceptionLoggerDelegateInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface) : KMExceptionLoggerDelegateInterface +private class KMExceptionLoggerDelegateInterfacePlatformWrapper(internal val nativeHandle: ExceptionLoggerDelegateInterface) : KMExceptionLoggerDelegateInterface { override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { @@ -17,7 +19,7 @@ private class KMExceptionLoggerDelegateInterfacePlatformWrapper(internal val nat } } -private class KMExceptionLoggerDelegateInterfacePlatformProxy(private val delegate: KMExceptionLoggerDelegateInterface) : io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface() +private class KMExceptionLoggerDelegateInterfacePlatformProxy(private val delegate: KMExceptionLoggerDelegateInterface) : ExceptionLoggerDelegateInterface() { override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { @@ -25,8 +27,8 @@ private class KMExceptionLoggerDelegateInterfacePlatformProxy(private val delega } } -internal fun KMExceptionLoggerDelegateInterface.asPlatform(): io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface = when (this) { +internal fun KMExceptionLoggerDelegateInterface.asPlatform(): ExceptionLoggerDelegateInterface = when (this) { is KMExceptionLoggerDelegateInterfacePlatformWrapper -> this.nativeHandle else -> KMExceptionLoggerDelegateInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) +internal fun ExceptionLoggerDelegateInterface.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt index e52910e87..1899845c6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -3,20 +3,22 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface + actual class KMExceptionLoggerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface + private val native = nativeHandle as ExceptionLoggerInterface actual companion object { actual fun setLoggerDelegate(delegate: KMExceptionLoggerDelegateInterface) { - io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface.setLoggerDelegate(delegate.asPlatform()) + ExceptionLoggerInterface.setLoggerDelegate(delegate.asPlatform()) } } } -internal fun KMExceptionLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface -internal fun io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) +internal fun KMExceptionLoggerInterface.asPlatform(): ExceptionLoggerInterface = nativeHandle as ExceptionLoggerInterface +internal fun ExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt index 70fac4910..260924ea3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -3,51 +3,53 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory + actual class KMFeatureInfoValueFactory actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory + private val native = nativeHandle as FeatureInfoValueFactory actual companion object { actual fun createString(value: String): KMVectorLayerFeatureInfoValue { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createString(value) + val result = FeatureInfoValueFactory.createString(value) return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() } actual fun createDouble(value: Double): KMVectorLayerFeatureInfoValue { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createDouble(value) + val result = FeatureInfoValueFactory.createDouble(value) return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() } actual fun createInt(value: Long): KMVectorLayerFeatureInfoValue { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createInt(value) + val result = FeatureInfoValueFactory.createInt(value) return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() } actual fun createBool(value: Boolean): KMVectorLayerFeatureInfoValue { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createBool(value) + val result = FeatureInfoValueFactory.createBool(value) return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() } actual fun createColor(value: KMColor): KMVectorLayerFeatureInfoValue { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createColor(value.asPlatform()) + val result = FeatureInfoValueFactory.createColor(value.asPlatform()) return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() } actual fun createListFloat(value: ArrayList): KMVectorLayerFeatureInfoValue { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createListFloat(ArrayList(value.map { it })) + val result = FeatureInfoValueFactory.createListFloat(ArrayList(value.map { it })) return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() } actual fun createListString(value: ArrayList): KMVectorLayerFeatureInfoValue { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.createListString(ArrayList(value.map { it })) + val result = FeatureInfoValueFactory.createListString(ArrayList(value.map { it })) return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue).asKmp() } } } -internal fun KMFeatureInfoValueFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.FeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) +internal fun KMFeatureInfoValueFactory.asPlatform(): FeatureInfoValueFactory = nativeHandle as FeatureInfoValueFactory +internal fun FeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt index c1a245717..cdb02b076 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface + actual interface KMFontLoaderInterface { actual fun loadFont(font: KMFont): KMFontLoaderResult } -private class KMFontLoaderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface) : KMFontLoaderInterface +private class KMFontLoaderInterfacePlatformWrapper(internal val nativeHandle: FontLoaderInterface) : KMFontLoaderInterface { override fun loadFont(font: KMFont): KMFontLoaderResult { @@ -18,7 +20,7 @@ private class KMFontLoaderInterfacePlatformWrapper(internal val nativeHandle: io } } -private class KMFontLoaderInterfacePlatformProxy(private val delegate: KMFontLoaderInterface) : io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface() +private class KMFontLoaderInterfacePlatformProxy(private val delegate: KMFontLoaderInterface) : FontLoaderInterface() { override fun loadFont(font: io.openmobilemaps.mapscore.shared.map.loader.Font): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult { @@ -27,8 +29,8 @@ private class KMFontLoaderInterfacePlatformProxy(private val delegate: KMFontLoa } } -internal fun KMFontLoaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface = when (this) { +internal fun KMFontLoaderInterface.asPlatform(): FontLoaderInterface = when (this) { is KMFontLoaderInterfacePlatformWrapper -> this.nativeHandle else -> KMFontLoaderInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderInterface.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) +internal fun FontLoaderInterface.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index 3966d079d..55479e7bc 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -3,23 +3,7 @@ package io.openmobilemaps.mapscore.kmp -actual class KMFontLoaderResult actual public constructor( - imageData: KMTextureHolderInterface?, - fontData: KMFontData?, - status: KMLoaderStatus, -) { - actual val imageData: KMTextureHolderInterface? = imageData - actual val fontData: KMFontData? = fontData - actual val status: KMLoaderStatus = status -} +actual typealias KMFontLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult -internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult( - imageData = imageData?.let { it.asPlatform() }, - fontData = fontData?.let { it.asPlatform() }, - status = status.asPlatform(), -) -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( - imageData = imageData?.let { it.asKmp() }, - fontData = fontData?.let { it.asKmp() }, - status = status.asKmp(), -) +internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt index 9a8ba8663..e10d28dd7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface + actual class KMGeoJsonFeatureParserInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface + private val native = nativeHandle as GeoJsonFeatureParserInterface actual fun parse(geoJson: String): ArrayList? { val result = native.parse(geoJson) @@ -28,11 +30,11 @@ actual class KMGeoJsonFeatureParserInterface actual public constructor( { actual fun create(): KMGeoJsonFeatureParserInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface.create() + val result = GeoJsonFeatureParserInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface)).asKmp() } } } -internal fun KMGeoJsonFeatureParserInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) +internal fun KMGeoJsonFeatureParserInterface.asPlatform(): GeoJsonFeatureParserInterface = nativeHandle as GeoJsonFeatureParserInterface +internal fun GeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt index 5e757a46c..4a91baf39 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface + actual class KMGeoJsonHelperInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface + private val native = nativeHandle as GeoJsonHelperInterface actual fun geoJsonStringFromFeatureInfo(point: KMGeoJsonPoint): String { val result = native.geoJsonStringFromFeatureInfo(point.asPlatform()) @@ -23,11 +25,11 @@ actual class KMGeoJsonHelperInterface actual public constructor( { actual fun independentInstance(): KMGeoJsonHelperInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface.independentInstance() + val result = GeoJsonHelperInterface.independentInstance() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface)).asKmp() } } } -internal fun KMGeoJsonHelperInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) +internal fun KMGeoJsonHelperInterface.asPlatform(): GeoJsonHelperInterface = nativeHandle as GeoJsonHelperInterface +internal fun GeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index b76eb13d0..78ea61016 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface + actual interface KMGraphicsObjectFactoryInterface { @@ -31,7 +33,7 @@ actual interface KMGraphicsObjectFactoryInterface actual fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface } -private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface) : KMGraphicsObjectFactoryInterface +private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativeHandle: GraphicsObjectFactoryInterface) : KMGraphicsObjectFactoryInterface { override fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface { @@ -95,7 +97,7 @@ private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativ } } -private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate: KMGraphicsObjectFactoryInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface() +private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate: KMGraphicsObjectFactoryInterface) : GraphicsObjectFactoryInterface() { override fun createQuad(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface { @@ -159,8 +161,8 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate } } -internal fun KMGraphicsObjectFactoryInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface = when (this) { +internal fun KMGraphicsObjectFactoryInterface.asPlatform(): GraphicsObjectFactoryInterface = when (this) { is KMGraphicsObjectFactoryInterfacePlatformWrapper -> this.nativeHandle else -> KMGraphicsObjectFactoryInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) +internal fun GraphicsObjectFactoryInterface.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt index e2b354c2c..5a83c9ddc 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface + actual interface KMGraphicsObjectInterface { @@ -19,7 +21,7 @@ actual interface KMGraphicsObjectInterface actual fun render(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) } -private class KMGraphicsObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface) : KMGraphicsObjectInterface +private class KMGraphicsObjectInterfacePlatformWrapper(internal val nativeHandle: GraphicsObjectInterface) : KMGraphicsObjectInterface { override fun isReady(): Boolean { @@ -48,7 +50,7 @@ private class KMGraphicsObjectInterfacePlatformWrapper(internal val nativeHandle } } -private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGraphicsObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface() +private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGraphicsObjectInterface) : GraphicsObjectInterface() { override fun isReady(): Boolean { @@ -77,8 +79,8 @@ private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGra } } -internal fun KMGraphicsObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface = when (this) { +internal fun KMGraphicsObjectInterface.asPlatform(): GraphicsObjectInterface = when (this) { is KMGraphicsObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMGraphicsObjectInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) +internal fun GraphicsObjectInterface.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt index 3accaa74d..42a1f0963 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -3,26 +3,28 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory + actual class KMIconFactory actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory + private val native = nativeHandle as IconFactory actual companion object { actual fun createIcon(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode): KMIconInfoInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory.createIcon(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform()) + val result = IconFactory.createIcon(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() } actual fun createIconWithAnchor(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode, iconAnchor: KMVec2F): KMIconInfoInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory.createIconWithAnchor(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform(), iconAnchor.asPlatform()) + val result = IconFactory.createIconWithAnchor(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform(), iconAnchor.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() } } } -internal fun KMIconFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory -internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconFactory.asKmp(): KMIconFactory = KMIconFactory(this) +internal fun KMIconFactory.asPlatform(): IconFactory = nativeHandle as IconFactory +internal fun IconFactory.asKmp(): KMIconFactory = KMIconFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt index b321ab356..3e18d1954 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface + actual class KMIconInfoInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface + private val native = nativeHandle as IconInfoInterface actual fun getIdentifier(): String { val result = native.getIdentifier() @@ -57,5 +59,5 @@ actual class KMIconInfoInterface actual public constructor( } } -internal fun KMIconInfoInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) +internal fun KMIconInfoInterface.asPlatform(): IconInfoInterface = nativeHandle as IconInfoInterface +internal fun IconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt index 744b18daa..366fbfd3d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface + actual interface KMIconLayerCallbackInterface { @@ -11,7 +13,7 @@ actual interface KMIconLayerCallbackInterface actual fun onLongPress(icons: ArrayList): Boolean } -private class KMIconLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface) : KMIconLayerCallbackInterface +private class KMIconLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: IconLayerCallbackInterface) : KMIconLayerCallbackInterface { override fun onClickConfirmed(icons: ArrayList): Boolean { @@ -25,7 +27,7 @@ private class KMIconLayerCallbackInterfacePlatformWrapper(internal val nativeHan } } -private class KMIconLayerCallbackInterfacePlatformProxy(private val delegate: KMIconLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface() +private class KMIconLayerCallbackInterfacePlatformProxy(private val delegate: KMIconLayerCallbackInterface) : IconLayerCallbackInterface() { override fun onClickConfirmed(icons: ArrayList): Boolean { @@ -39,8 +41,8 @@ private class KMIconLayerCallbackInterfacePlatformProxy(private val delegate: KM } } -internal fun KMIconLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface = when (this) { +internal fun KMIconLayerCallbackInterface.asPlatform(): IconLayerCallbackInterface = when (this) { is KMIconLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMIconLayerCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerCallbackInterface.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) +internal fun IconLayerCallbackInterface.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt index b241631ca..4c21edbb2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface + actual class KMIconLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface + private val native = nativeHandle as IconLayerInterface actual fun setIcons(icons: ArrayList) { native.setIcons(ArrayList(icons.map { it.asPlatform() })) @@ -75,11 +77,11 @@ actual class KMIconLayerInterface actual public constructor( { actual fun create(): KMIconLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface.create() + val result = IconLayerInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface)).asKmp() } } } -internal fun KMIconLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) +internal fun KMIconLayerInterface.asPlatform(): IconLayerInterface = nativeHandle as IconLayerInterface +internal fun IconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt index 38d402289..a94bf0682 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface + actual interface KMIcosahedronInterface { @@ -11,7 +13,7 @@ actual interface KMIcosahedronInterface actual fun asGraphicsObject(): KMGraphicsObjectInterface } -private class KMIcosahedronInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface) : KMIcosahedronInterface +private class KMIcosahedronInterfacePlatformWrapper(internal val nativeHandle: IcosahedronInterface) : KMIcosahedronInterface { override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { @@ -24,7 +26,7 @@ private class KMIcosahedronInterfacePlatformWrapper(internal val nativeHandle: i } } -private class KMIcosahedronInterfacePlatformProxy(private val delegate: KMIcosahedronInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface() +private class KMIcosahedronInterfacePlatformProxy(private val delegate: KMIcosahedronInterface) : IcosahedronInterface() { override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { @@ -37,8 +39,8 @@ private class KMIcosahedronInterfacePlatformProxy(private val delegate: KMIcosah } } -internal fun KMIcosahedronInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface = when (this) { +internal fun KMIcosahedronInterface.asPlatform(): IcosahedronInterface = when (this) { is KMIcosahedronInterfacePlatformWrapper -> this.nativeHandle else -> KMIcosahedronInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) +internal fun IcosahedronInterface.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt index d2670a1b9..24453a835 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface + actual interface KMIcosahedronLayerCallbackInterface { actual fun getData(): KMFuture } -private class KMIcosahedronLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface) : KMIcosahedronLayerCallbackInterface +private class KMIcosahedronLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: IcosahedronLayerCallbackInterface) : KMIcosahedronLayerCallbackInterface { override fun getData(): KMFuture { @@ -18,7 +20,7 @@ private class KMIcosahedronLayerCallbackInterfacePlatformWrapper(internal val na } } -private class KMIcosahedronLayerCallbackInterfacePlatformProxy(private val delegate: KMIcosahedronLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface() +private class KMIcosahedronLayerCallbackInterfacePlatformProxy(private val delegate: KMIcosahedronLayerCallbackInterface) : IcosahedronLayerCallbackInterface() { override fun getData(): com.snapchat.djinni.Future { @@ -27,8 +29,8 @@ private class KMIcosahedronLayerCallbackInterfacePlatformProxy(private val deleg } } -internal fun KMIcosahedronLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface = when (this) { +internal fun KMIcosahedronLayerCallbackInterface.asPlatform(): IcosahedronLayerCallbackInterface = when (this) { is KMIcosahedronLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMIcosahedronLayerCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerCallbackInterface.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) +internal fun IcosahedronLayerCallbackInterface.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt index 4eb17c426..8f88d2c60 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface + actual class KMIcosahedronLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface + private val native = nativeHandle as IcosahedronLayerInterface actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() @@ -18,11 +20,11 @@ actual class KMIcosahedronLayerInterface actual public constructor( { actual fun create(callbackHandler: KMIcosahedronLayerCallbackInterface): KMIcosahedronLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface.create(callbackHandler.asPlatform()) + val result = IcosahedronLayerInterface.create(callbackHandler.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface)).asKmp() } } } -internal fun KMIcosahedronLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) +internal fun KMIcosahedronLayerInterface.asPlatform(): IcosahedronLayerInterface = nativeHandle as IcosahedronLayerInterface +internal fun IcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt index 4f05fc275..9dae16772 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface + actual interface KMIndexedLayerInterface { @@ -11,7 +13,7 @@ actual interface KMIndexedLayerInterface actual fun getIndex(): Int } -private class KMIndexedLayerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface) : KMIndexedLayerInterface +private class KMIndexedLayerInterfacePlatformWrapper(internal val nativeHandle: IndexedLayerInterface) : KMIndexedLayerInterface { override fun getLayerInterface(): KMLayerInterface { @@ -25,7 +27,7 @@ private class KMIndexedLayerInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMIndexedLayerInterfacePlatformProxy(private val delegate: KMIndexedLayerInterface) : io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface() +private class KMIndexedLayerInterfacePlatformProxy(private val delegate: KMIndexedLayerInterface) : IndexedLayerInterface() { override fun getLayerInterface(): io.openmobilemaps.mapscore.shared.map.LayerInterface { @@ -39,8 +41,8 @@ private class KMIndexedLayerInterfacePlatformProxy(private val delegate: KMIndex } } -internal fun KMIndexedLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface = when (this) { +internal fun KMIndexedLayerInterface.asPlatform(): IndexedLayerInterface = when (this) { is KMIndexedLayerInterfacePlatformWrapper -> this.nativeHandle else -> KMIndexedLayerInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) +internal fun IndexedLayerInterface.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt index 3d30a9653..9dc5cd966 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.LayerInterface + actual interface KMLayerInterface { @@ -43,7 +45,7 @@ actual interface KMLayerInterface actual fun setPrimaryRenderTarget(target: KMRenderTargetInterface?) } -private class KMLayerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.LayerInterface) : KMLayerInterface +private class KMLayerInterfacePlatformWrapper(internal val nativeHandle: LayerInterface) : KMLayerInterface { override fun setMaskingObject(maskingObject: KMMaskingObjectInterface?) { @@ -123,7 +125,7 @@ private class KMLayerInterfacePlatformWrapper(internal val nativeHandle: io.open } } -private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterface) : io.openmobilemaps.mapscore.shared.map.LayerInterface() +private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterface) : LayerInterface() { override fun setMaskingObject(maskingObject: io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface?) { @@ -203,8 +205,8 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa } } -internal fun KMLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.LayerInterface = when (this) { +internal fun KMLayerInterface.asPlatform(): LayerInterface = when (this) { is KMLayerInterfacePlatformWrapper -> this.nativeHandle else -> KMLayerInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.LayerInterface.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) +internal fun LayerInterface.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt index 2919ba5bf..7c8f5d812 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface + actual class KMLayerObjectInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface + private val native = nativeHandle as LayerObjectInterface actual fun update() { native.update() @@ -19,5 +21,5 @@ actual class KMLayerObjectInterface actual public constructor( } } -internal fun KMLayerObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.objects.LayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) +internal fun KMLayerObjectInterface.asPlatform(): LayerObjectInterface = nativeHandle as LayerObjectInterface +internal fun LayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt index e6417575b..a1ccc1f01 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -3,21 +3,23 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory + actual class KMLineFactory actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory + private val native = nativeHandle as LineFactory actual companion object { actual fun createLine(identifier: String, coordinates: ArrayList, style: KMLineStyle): KMLineInfoInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory.createLine(identifier, ArrayList(coordinates.map { it.asPlatform() }), style.asPlatform()) + val result = LineFactory.createLine(identifier, ArrayList(coordinates.map { it.asPlatform() }), style.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface)).asKmp() } } } -internal fun KMLineFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory -internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineFactory.asKmp(): KMLineFactory = KMLineFactory(this) +internal fun KMLineFactory.asPlatform(): LineFactory = nativeHandle as LineFactory +internal fun LineFactory.asKmp(): KMLineFactory = KMLineFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt index de29970ed..58bcbe5a3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface + actual interface KMLineGroup2dInterface { @@ -11,7 +13,7 @@ actual interface KMLineGroup2dInterface actual fun asGraphicsObject(): KMGraphicsObjectInterface } -private class KMLineGroup2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface) : KMLineGroup2dInterface +private class KMLineGroup2dInterfacePlatformWrapper(internal val nativeHandle: LineGroup2dInterface) : KMLineGroup2dInterface { override fun setLines(lines: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) { @@ -24,7 +26,7 @@ private class KMLineGroup2dInterfacePlatformWrapper(internal val nativeHandle: i } } -private class KMLineGroup2dInterfacePlatformProxy(private val delegate: KMLineGroup2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface() +private class KMLineGroup2dInterfacePlatformProxy(private val delegate: KMLineGroup2dInterface) : LineGroup2dInterface() { override fun setLines(lines: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { @@ -37,8 +39,8 @@ private class KMLineGroup2dInterfacePlatformProxy(private val delegate: KMLineGr } } -internal fun KMLineGroup2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface = when (this) { +internal fun KMLineGroup2dInterface.asPlatform(): LineGroup2dInterface = when (this) { is KMLineGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMLineGroup2dInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) +internal fun LineGroup2dInterface.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt index 99a1423a4..e6b854b25 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface + actual class KMLineGroupShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface + private val native = nativeHandle as LineGroupShaderInterface actual fun setStyles(styles: KMSharedBytes) { native.setStyles(styles.asPlatform()) @@ -23,5 +25,5 @@ actual class KMLineGroupShaderInterface actual public constructor( } } -internal fun KMLineGroupShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) +internal fun KMLineGroupShaderInterface.asPlatform(): LineGroupShaderInterface = nativeHandle as LineGroupShaderInterface +internal fun LineGroupShaderInterface.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt index 733e4a56a..28fdc7b78 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface + actual class KMLineInfoInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface + private val native = nativeHandle as LineInfoInterface actual fun getIdentifier(): String { val result = native.getIdentifier() @@ -25,5 +27,5 @@ actual class KMLineInfoInterface actual public constructor( } } -internal fun KMLineInfoInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) +internal fun KMLineInfoInterface.asPlatform(): LineInfoInterface = nativeHandle as LineInfoInterface +internal fun LineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt index e60d17747..99db95c0c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface + actual interface KMLineLayerCallbackInterface { actual fun onLineClickConfirmed(line: KMLineInfoInterface) } -private class KMLineLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface) : KMLineLayerCallbackInterface +private class KMLineLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: LineLayerCallbackInterface) : KMLineLayerCallbackInterface { override fun onLineClickConfirmed(line: KMLineInfoInterface) { @@ -17,7 +19,7 @@ private class KMLineLayerCallbackInterfacePlatformWrapper(internal val nativeHan } } -private class KMLineLayerCallbackInterfacePlatformProxy(private val delegate: KMLineLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface() +private class KMLineLayerCallbackInterfacePlatformProxy(private val delegate: KMLineLayerCallbackInterface) : LineLayerCallbackInterface() { override fun onLineClickConfirmed(line: io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface) { @@ -25,8 +27,8 @@ private class KMLineLayerCallbackInterfacePlatformProxy(private val delegate: KM } } -internal fun KMLineLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface = when (this) { +internal fun KMLineLayerCallbackInterface.asPlatform(): LineLayerCallbackInterface = when (this) { is KMLineLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMLineLayerCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerCallbackInterface.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) +internal fun LineLayerCallbackInterface.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt index 2d0ebb09c..600b826f0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface + actual class KMLineLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface + private val native = nativeHandle as LineLayerInterface actual fun setLines(lines: ArrayList) { native.setLines(ArrayList(lines.map { it.asPlatform() })) @@ -63,11 +65,11 @@ actual class KMLineLayerInterface actual public constructor( { actual fun create(): KMLineLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface.create() + val result = LineLayerInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface)).asKmp() } } } -internal fun KMLineLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) +internal fun KMLineLayerInterface.asPlatform(): LineLayerInterface = nativeHandle as LineLayerInterface +internal fun LineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt index fde71a0ca..3a70a93c5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface + actual interface KMLoaderInterface { @@ -17,7 +19,7 @@ actual interface KMLoaderInterface actual fun cancel(url: String) } -private class KMLoaderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface) : KMLoaderInterface +private class KMLoaderInterfacePlatformWrapper(internal val nativeHandle: LoaderInterface) : KMLoaderInterface { override fun loadTexture(url: String, etag: String?): KMTextureLoaderResult { @@ -32,8 +34,7 @@ private class KMLoaderInterfacePlatformWrapper(internal val nativeHandle: io.ope override fun loadTextureAsync(url: String, etag: String?): KMFuture { val result = nativeHandle.loadTextureAsync(url, etag?.let { it }) - @Suppress("UNCHECKED_CAST") - return (result as com.snapchat.djinni.Future).asKmp() + return (result as com.snapchat.djinni.Future).asKmp() } override fun loadDataAsync(url: String, etag: String?): KMFuture { @@ -46,7 +47,7 @@ private class KMLoaderInterfacePlatformWrapper(internal val nativeHandle: io.ope } } -private class KMLoaderInterfacePlatformProxy(private val delegate: KMLoaderInterface) : io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface() +private class KMLoaderInterfacePlatformProxy(private val delegate: KMLoaderInterface) : LoaderInterface() { override fun loadTexture(url: String, etag: String?): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult { @@ -61,8 +62,7 @@ private class KMLoaderInterfacePlatformProxy(private val delegate: KMLoaderInter override fun loadTextureAsync(url: String, etag: String?): com.snapchat.djinni.Future { val result = delegate.loadTextureAsync(url, etag?.let { it }) - @Suppress("UNCHECKED_CAST") - return result.asPlatform() as com.snapchat.djinni.Future + return result.asPlatform() } override fun loadDataAsync(url: String, etag: String?): com.snapchat.djinni.Future { @@ -75,8 +75,8 @@ private class KMLoaderInterfacePlatformProxy(private val delegate: KMLoaderInter } } -internal fun KMLoaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface = when (this) { +internal fun KMLoaderInterface.asPlatform(): LoaderInterface = when (this) { is KMLoaderInterfacePlatformWrapper -> this.nativeHandle else -> KMLoaderInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.loader.LoaderInterface.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) +internal fun LoaderInterface.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt index 2727c9404..8e97b2d9b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.MapCallbackInterface + actual interface KMMapCallbackInterface { @@ -11,7 +13,7 @@ actual interface KMMapCallbackInterface actual fun onMapResumed() } -private class KMMapCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.MapCallbackInterface) : KMMapCallbackInterface +private class KMMapCallbackInterfacePlatformWrapper(internal val nativeHandle: MapCallbackInterface) : KMMapCallbackInterface { override fun invalidate() { @@ -23,7 +25,7 @@ private class KMMapCallbackInterfacePlatformWrapper(internal val nativeHandle: i } } -private class KMMapCallbackInterfacePlatformProxy(private val delegate: KMMapCallbackInterface) : io.openmobilemaps.mapscore.shared.map.MapCallbackInterface() +private class KMMapCallbackInterfacePlatformProxy(private val delegate: KMMapCallbackInterface) : MapCallbackInterface() { override fun invalidate() { @@ -35,8 +37,8 @@ private class KMMapCallbackInterfacePlatformProxy(private val delegate: KMMapCal } } -internal fun KMMapCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapCallbackInterface = when (this) { +internal fun KMMapCallbackInterface.asPlatform(): MapCallbackInterface = when (this) { is KMMapCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMMapCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.MapCallbackInterface.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) +internal fun MapCallbackInterface.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt index cb2f3a705..561449c22 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface + actual class KMMapCamera3dInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface + private val native = nativeHandle as MapCamera3dInterface actual fun getCameraConfig(): KMCamera3dConfig { val result = native.getCameraConfig() @@ -19,5 +21,5 @@ actual class KMMapCamera3dInterface actual public constructor( } } -internal fun KMMapCamera3dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface -internal fun io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) +internal fun KMMapCamera3dInterface.asPlatform(): MapCamera3dInterface = nativeHandle as MapCamera3dInterface +internal fun MapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt index a80014e66..45343395b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.MapCameraInterface + actual class KMMapCameraInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCameraInterface + private val native = nativeHandle as MapCameraInterface actual fun freeze(freeze: Boolean) { native.freeze(freeze) @@ -228,11 +230,11 @@ actual class KMMapCameraInterface actual public constructor( { actual fun create(mapInterface: KMMapInterface, screenDensityPpi: Float, is3D: Boolean): KMMapCameraInterface { - val result = io.openmobilemaps.mapscore.shared.map.MapCameraInterface.create(mapInterface.asPlatform(), screenDensityPpi, is3D) + val result = MapCameraInterface.create(mapInterface.asPlatform(), screenDensityPpi, is3D) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapCameraInterface)).asKmp() } } } -internal fun KMMapCameraInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapCameraInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapCameraInterface -internal fun io.openmobilemaps.mapscore.shared.map.MapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) +internal fun KMMapCameraInterface.asPlatform(): MapCameraInterface = nativeHandle as MapCameraInterface +internal fun MapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt index 7b7d764da..7bb585f0b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface + actual interface KMMapCameraListenerInterface { @@ -15,7 +17,7 @@ actual interface KMMapCameraListenerInterface actual fun onCameraChange(viewMatrix: ArrayList, projectionMatrix: ArrayList, origin: KMVec3D, verticalFov: Float, horizontalFov: Float, width: Float, height: Float, focusPointAltitude: Float, focusPointPosition: KMCoord, zoom: Float) } -private class KMMapCameraListenerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface) : KMMapCameraListenerInterface +private class KMMapCameraListenerInterfacePlatformWrapper(internal val nativeHandle: MapCameraListenerInterface) : KMMapCameraListenerInterface { override fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, zoom: Double) { @@ -35,7 +37,7 @@ private class KMMapCameraListenerInterfacePlatformWrapper(internal val nativeHan } } -private class KMMapCameraListenerInterfacePlatformProxy(private val delegate: KMMapCameraListenerInterface) : io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface() +private class KMMapCameraListenerInterfacePlatformProxy(private val delegate: KMMapCameraListenerInterface) : MapCameraListenerInterface() { override fun onVisibleBoundsChanged(visibleBounds: io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord, zoom: Double) { @@ -55,8 +57,8 @@ private class KMMapCameraListenerInterfacePlatformProxy(private val delegate: KM } } -internal fun KMMapCameraListenerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface = when (this) { +internal fun KMMapCameraListenerInterface.asPlatform(): MapCameraListenerInterface = when (this) { is KMMapCameraListenerInterfacePlatformWrapper -> this.nativeHandle else -> KMMapCameraListenerInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.camera.MapCameraListenerInterface.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) +internal fun MapCameraListenerInterface.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt index 95375bc88..10a6d3d3f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.MapInterface + actual class KMMapInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapInterface + private val native = nativeHandle as MapInterface actual fun setCallbackHandler(callbackInterface: KMMapCallbackInterface?) { native.setCallbackHandler(callbackInterface?.let { it.asPlatform() }) @@ -166,16 +168,16 @@ actual class KMMapInterface actual public constructor( { actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface, mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { - val result = io.openmobilemaps.mapscore.shared.map.MapInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform(), mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) + val result = MapInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform(), mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp() } actual fun createWithOpenGl(mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { - val result = io.openmobilemaps.mapscore.shared.map.MapInterface.createWithOpenGl(mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) + val result = MapInterface.createWithOpenGl(mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp() } } } -internal fun KMMapInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.MapInterface -internal fun io.openmobilemaps.mapscore.shared.map.MapInterface.asKmp(): KMMapInterface = KMMapInterface(this) +internal fun KMMapInterface.asPlatform(): MapInterface = nativeHandle as MapInterface +internal fun MapInterface.asKmp(): KMMapInterface = KMMapInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt index 29370d4b3..7bf6602f1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface + actual interface KMMapReadyCallbackInterface { actual fun stateDidUpdate(state: KMLayerReadyState) } -private class KMMapReadyCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface) : KMMapReadyCallbackInterface +private class KMMapReadyCallbackInterfacePlatformWrapper(internal val nativeHandle: MapReadyCallbackInterface) : KMMapReadyCallbackInterface { override fun stateDidUpdate(state: KMLayerReadyState) { @@ -17,7 +19,7 @@ private class KMMapReadyCallbackInterfacePlatformWrapper(internal val nativeHand } } -private class KMMapReadyCallbackInterfacePlatformProxy(private val delegate: KMMapReadyCallbackInterface) : io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface() +private class KMMapReadyCallbackInterfacePlatformProxy(private val delegate: KMMapReadyCallbackInterface) : MapReadyCallbackInterface() { override fun stateDidUpdate(state: io.openmobilemaps.mapscore.shared.map.LayerReadyState) { @@ -25,8 +27,8 @@ private class KMMapReadyCallbackInterfacePlatformProxy(private val delegate: KMM } } -internal fun KMMapReadyCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface = when (this) { +internal fun KMMapReadyCallbackInterface.asPlatform(): MapReadyCallbackInterface = when (this) { is KMMapReadyCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMMapReadyCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.MapReadyCallbackInterface.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) +internal fun MapReadyCallbackInterface.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt index 1c6195c81..c0902eb2b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -3,21 +3,23 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.MapsCoreSharedModule + actual class KMMapsCoreSharedModule actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.MapsCoreSharedModule + private val native = nativeHandle as MapsCoreSharedModule actual companion object { actual fun version(): String { - val result = io.openmobilemaps.mapscore.shared.MapsCoreSharedModule.version() + val result = MapsCoreSharedModule.version() return result } } } -internal fun KMMapsCoreSharedModule.asPlatform(): io.openmobilemaps.mapscore.shared.MapsCoreSharedModule = nativeHandle as io.openmobilemaps.mapscore.shared.MapsCoreSharedModule -internal fun io.openmobilemaps.mapscore.shared.MapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) +internal fun KMMapsCoreSharedModule.asPlatform(): MapsCoreSharedModule = nativeHandle as MapsCoreSharedModule +internal fun MapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt index 15b64c848..55890b6bc 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface + actual interface KMMaskingObjectInterface { @@ -11,7 +13,7 @@ actual interface KMMaskingObjectInterface actual fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) } -private class KMMaskingObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface) : KMMaskingObjectInterface +private class KMMaskingObjectInterfacePlatformWrapper(internal val nativeHandle: MaskingObjectInterface) : KMMaskingObjectInterface { override fun asGraphicsObject(): KMGraphicsObjectInterface { @@ -24,7 +26,7 @@ private class KMMaskingObjectInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMMaskingObjectInterfacePlatformProxy(private val delegate: KMMaskingObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface() +private class KMMaskingObjectInterfacePlatformProxy(private val delegate: KMMaskingObjectInterface) : MaskingObjectInterface() { override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { @@ -37,8 +39,8 @@ private class KMMaskingObjectInterfacePlatformProxy(private val delegate: KMMask } } -internal fun KMMaskingObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface = when (this) { +internal fun KMMaskingObjectInterface.asPlatform(): MaskingObjectInterface = when (this) { is KMMaskingObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMMaskingObjectInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) +internal fun MaskingObjectInterface.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt index ce276f35b..047f888a2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface + actual class KMOpenGlPerformanceLoggerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface + private val native = nativeHandle as OpenGlPerformanceLoggerInterface actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { val result = native.asPerformanceLoggerInterface() @@ -18,16 +20,16 @@ actual class KMOpenGlPerformanceLoggerInterface actual public constructor( { actual fun create(): KMOpenGlPerformanceLoggerInterface { - val result = io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface.create() + val result = OpenGlPerformanceLoggerInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface)).asKmp() } actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMOpenGlPerformanceLoggerInterface { - val result = io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) + val result = OpenGlPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface)).asKmp() } } } -internal fun KMOpenGlPerformanceLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface -internal fun io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) +internal fun KMOpenGlPerformanceLoggerInterface.asPlatform(): OpenGlPerformanceLoggerInterface = nativeHandle as OpenGlPerformanceLoggerInterface +internal fun OpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt index 156f0de36..b34abe17e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface + actual interface KMOpenGlRenderTargetInterface { @@ -19,7 +21,7 @@ actual interface KMOpenGlRenderTargetInterface actual fun getTextureId(): Int } -private class KMOpenGlRenderTargetInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface) : KMOpenGlRenderTargetInterface +private class KMOpenGlRenderTargetInterfacePlatformWrapper(internal val nativeHandle: OpenGlRenderTargetInterface) : KMOpenGlRenderTargetInterface { override fun asRenderTargetInterface(): KMRenderTargetInterface { @@ -49,7 +51,7 @@ private class KMOpenGlRenderTargetInterfacePlatformWrapper(internal val nativeHa } } -private class KMOpenGlRenderTargetInterfacePlatformProxy(private val delegate: KMOpenGlRenderTargetInterface) : io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface() +private class KMOpenGlRenderTargetInterfacePlatformProxy(private val delegate: KMOpenGlRenderTargetInterface) : OpenGlRenderTargetInterface() { override fun asRenderTargetInterface(): io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface { @@ -79,8 +81,8 @@ private class KMOpenGlRenderTargetInterfacePlatformProxy(private val delegate: K } } -internal fun KMOpenGlRenderTargetInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface = when (this) { +internal fun KMOpenGlRenderTargetInterface.asPlatform(): OpenGlRenderTargetInterface = when (this) { is KMOpenGlRenderTargetInterfacePlatformWrapper -> this.nativeHandle else -> KMOpenGlRenderTargetInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) +internal fun OpenGlRenderTargetInterface.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt index 724724107..c358bd435 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface + actual interface KMOpenGlRenderingContextInterface { @@ -25,7 +27,7 @@ actual interface KMOpenGlRenderingContextInterface actual fun getDeltaTimeMs(): Long } -private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface) : KMOpenGlRenderingContextInterface +private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nativeHandle: OpenGlRenderingContextInterface) : KMOpenGlRenderingContextInterface { override fun resume() { @@ -70,7 +72,7 @@ private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nati } } -private class KMOpenGlRenderingContextInterfacePlatformProxy(private val delegate: KMOpenGlRenderingContextInterface) : io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface() +private class KMOpenGlRenderingContextInterfacePlatformProxy(private val delegate: KMOpenGlRenderingContextInterface) : OpenGlRenderingContextInterface() { override fun resume() { @@ -115,8 +117,8 @@ private class KMOpenGlRenderingContextInterfacePlatformProxy(private val delegat } } -internal fun KMOpenGlRenderingContextInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface = when (this) { +internal fun KMOpenGlRenderingContextInterface.asPlatform(): OpenGlRenderingContextInterface = when (this) { is KMOpenGlRenderingContextInterfacePlatformWrapper -> this.nativeHandle else -> KMOpenGlRenderingContextInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) +internal fun OpenGlRenderingContextInterface.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt index 2789e599d..c5dc36d2a 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface + actual interface KMPerformanceLoggerInterface { @@ -21,7 +23,7 @@ actual interface KMPerformanceLoggerInterface actual fun setLoggingEnabled(enabled: Boolean) } -private class KMPerformanceLoggerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface) : KMPerformanceLoggerInterface +private class KMPerformanceLoggerInterfacePlatformWrapper(internal val nativeHandle: PerformanceLoggerInterface) : KMPerformanceLoggerInterface { override fun getLoggerName(): String { @@ -56,7 +58,7 @@ private class KMPerformanceLoggerInterfacePlatformWrapper(internal val nativeHan } } -private class KMPerformanceLoggerInterfacePlatformProxy(private val delegate: KMPerformanceLoggerInterface) : io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface() +private class KMPerformanceLoggerInterfacePlatformProxy(private val delegate: KMPerformanceLoggerInterface) : PerformanceLoggerInterface() { override fun getLoggerName(): String { @@ -91,8 +93,8 @@ private class KMPerformanceLoggerInterfacePlatformProxy(private val delegate: KM } } -internal fun KMPerformanceLoggerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface = when (this) { +internal fun KMPerformanceLoggerInterface.asPlatform(): PerformanceLoggerInterface = when (this) { is KMPerformanceLoggerInterfacePlatformWrapper -> this.nativeHandle else -> KMPerformanceLoggerInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) +internal fun PerformanceLoggerInterface.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index 13bdcbfe4..308be6bb2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface + actual interface KMPolygon2dInterface { @@ -13,7 +15,7 @@ actual interface KMPolygon2dInterface actual fun asMaskingObject(): KMMaskingObjectInterface } -private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface) : KMPolygon2dInterface +private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: Polygon2dInterface) : KMPolygon2dInterface { override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { @@ -31,7 +33,7 @@ private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: io. } } -private class KMPolygon2dInterfacePlatformProxy(private val delegate: KMPolygon2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface() +private class KMPolygon2dInterfacePlatformProxy(private val delegate: KMPolygon2dInterface) : Polygon2dInterface() { override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { @@ -49,8 +51,8 @@ private class KMPolygon2dInterfacePlatformProxy(private val delegate: KMPolygon2 } } -internal fun KMPolygon2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface = when (this) { +internal fun KMPolygon2dInterface.asPlatform(): Polygon2dInterface = when (this) { is KMPolygon2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygon2dInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) +internal fun Polygon2dInterface.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt index cf3ed3f37..cfadf3d86 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface + actual interface KMPolygonGroup2dInterface { @@ -11,7 +13,7 @@ actual interface KMPolygonGroup2dInterface actual fun asGraphicsObject(): KMGraphicsObjectInterface } -private class KMPolygonGroup2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface) : KMPolygonGroup2dInterface +private class KMPolygonGroup2dInterfacePlatformWrapper(internal val nativeHandle: PolygonGroup2dInterface) : KMPolygonGroup2dInterface { override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { @@ -24,7 +26,7 @@ private class KMPolygonGroup2dInterfacePlatformWrapper(internal val nativeHandle } } -private class KMPolygonGroup2dInterfacePlatformProxy(private val delegate: KMPolygonGroup2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface() +private class KMPolygonGroup2dInterfacePlatformProxy(private val delegate: KMPolygonGroup2dInterface) : PolygonGroup2dInterface() { override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { @@ -37,8 +39,8 @@ private class KMPolygonGroup2dInterfacePlatformProxy(private val delegate: KMPol } } -internal fun KMPolygonGroup2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface = when (this) { +internal fun KMPolygonGroup2dInterface.asPlatform(): PolygonGroup2dInterface = when (this) { is KMPolygonGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonGroup2dInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) +internal fun PolygonGroup2dInterface.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt index 9839eb60c..95e2bc80e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface + actual class KMPolygonGroupShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface + private val native = nativeHandle as PolygonGroupShaderInterface actual fun setStyles(styles: KMSharedBytes) { native.setStyles(styles.asPlatform()) @@ -19,5 +21,5 @@ actual class KMPolygonGroupShaderInterface actual public constructor( } } -internal fun KMPolygonGroupShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) +internal fun KMPolygonGroupShaderInterface.asPlatform(): PolygonGroupShaderInterface = nativeHandle as PolygonGroupShaderInterface +internal fun PolygonGroupShaderInterface.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt index a35483b14..e791beaaa 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface + actual interface KMPolygonLayerCallbackInterface { @@ -11,7 +13,7 @@ actual interface KMPolygonLayerCallbackInterface actual fun onClickUnconfirmed(polygon: KMPolygonInfo): Boolean } -private class KMPolygonLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface) : KMPolygonLayerCallbackInterface +private class KMPolygonLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: PolygonLayerCallbackInterface) : KMPolygonLayerCallbackInterface { override fun onClickConfirmed(polygon: KMPolygonInfo): Boolean { @@ -25,7 +27,7 @@ private class KMPolygonLayerCallbackInterfacePlatformWrapper(internal val native } } -private class KMPolygonLayerCallbackInterfacePlatformProxy(private val delegate: KMPolygonLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface() +private class KMPolygonLayerCallbackInterfacePlatformProxy(private val delegate: KMPolygonLayerCallbackInterface) : PolygonLayerCallbackInterface() { override fun onClickConfirmed(polygon: io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo): Boolean { @@ -39,8 +41,8 @@ private class KMPolygonLayerCallbackInterfacePlatformProxy(private val delegate: } } -internal fun KMPolygonLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface = when (this) { +internal fun KMPolygonLayerCallbackInterface.asPlatform(): PolygonLayerCallbackInterface = when (this) { is KMPolygonLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonLayerCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerCallbackInterface.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) +internal fun PolygonLayerCallbackInterface.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt index 340437781..7ffd3173a 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface + actual class KMPolygonLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface + private val native = nativeHandle as PolygonLayerInterface actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { native.setPolygons(ArrayList(polygons.map { it.asPlatform() }), origin.asPlatform()) @@ -59,11 +61,11 @@ actual class KMPolygonLayerInterface actual public constructor( { actual fun create(): KMPolygonLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface.create() + val result = PolygonLayerInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface)).asKmp() } } } -internal fun KMPolygonLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) +internal fun KMPolygonLayerInterface.asPlatform(): PolygonLayerInterface = nativeHandle as PolygonLayerInterface +internal fun PolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt index bb96e7132..7d78ad940 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface + actual class KMPolygonMaskObjectInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface + private val native = nativeHandle as PolygonMaskObjectInterface actual fun setPolygons(polygons: ArrayList, origin: KMVec3D) { native.setPolygons(ArrayList(polygons.map { it.asPlatform() }), origin.asPlatform()) @@ -26,11 +28,11 @@ actual class KMPolygonMaskObjectInterface actual public constructor( { actual fun create(graphicsObjectFactory: KMGraphicsObjectFactoryInterface, conversionHelper: KMCoordinateConversionHelperInterface, is3d: Boolean): KMPolygonMaskObjectInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface.create(graphicsObjectFactory.asPlatform(), conversionHelper.asPlatform(), is3d) + val result = PolygonMaskObjectInterface.create(graphicsObjectFactory.asPlatform(), conversionHelper.asPlatform(), is3d) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface)).asKmp() } } } -internal fun KMPolygonMaskObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) +internal fun KMPolygonMaskObjectInterface.asPlatform(): PolygonMaskObjectInterface = nativeHandle as PolygonMaskObjectInterface +internal fun PolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt index 2477accb0..9f45eb0cc 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface + actual interface KMPolygonPatternGroup2dInterface { @@ -23,7 +25,7 @@ actual interface KMPolygonPatternGroup2dInterface actual fun asGraphicsObject(): KMGraphicsObjectInterface } -private class KMPolygonPatternGroup2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface) : KMPolygonPatternGroup2dInterface +private class KMPolygonPatternGroup2dInterfacePlatformWrapper(internal val nativeHandle: PolygonPatternGroup2dInterface) : KMPolygonPatternGroup2dInterface { override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { @@ -60,7 +62,7 @@ private class KMPolygonPatternGroup2dInterfacePlatformWrapper(internal val nativ } } -private class KMPolygonPatternGroup2dInterfacePlatformProxy(private val delegate: KMPolygonPatternGroup2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface() +private class KMPolygonPatternGroup2dInterfacePlatformProxy(private val delegate: KMPolygonPatternGroup2dInterface) : PolygonPatternGroup2dInterface() { override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { @@ -97,8 +99,8 @@ private class KMPolygonPatternGroup2dInterfacePlatformProxy(private val delegate } } -internal fun KMPolygonPatternGroup2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface = when (this) { +internal fun KMPolygonPatternGroup2dInterface.asPlatform(): PolygonPatternGroup2dInterface = when (this) { is KMPolygonPatternGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonPatternGroup2dInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) +internal fun PolygonPatternGroup2dInterface.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt index 435ef1559..d6b9257bd 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface + actual class KMPolygonPatternGroupShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface + private val native = nativeHandle as PolygonPatternGroupShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() @@ -15,5 +17,5 @@ actual class KMPolygonPatternGroupShaderInterface actual public constructor( } } -internal fun KMPolygonPatternGroupShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) +internal fun KMPolygonPatternGroupShaderInterface.asPlatform(): PolygonPatternGroupShaderInterface = nativeHandle as PolygonPatternGroupShaderInterface +internal fun PolygonPatternGroupShaderInterface.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt index c9a2e026e..60dfa8825 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface + actual interface KMQuad2dInstancedInterface { @@ -31,7 +33,7 @@ actual interface KMQuad2dInstancedInterface actual fun asMaskingObject(): KMMaskingObjectInterface } -private class KMQuad2dInstancedInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface) : KMQuad2dInstancedInterface +private class KMQuad2dInstancedInterfacePlatformWrapper(internal val nativeHandle: Quad2dInstancedInterface) : KMQuad2dInstancedInterface { override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { @@ -85,7 +87,7 @@ private class KMQuad2dInstancedInterfacePlatformWrapper(internal val nativeHandl } } -private class KMQuad2dInstancedInterfacePlatformProxy(private val delegate: KMQuad2dInstancedInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface() +private class KMQuad2dInstancedInterfacePlatformProxy(private val delegate: KMQuad2dInstancedInterface) : Quad2dInstancedInterface() { override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { @@ -139,8 +141,8 @@ private class KMQuad2dInstancedInterfacePlatformProxy(private val delegate: KMQu } } -internal fun KMQuad2dInstancedInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface = when (this) { +internal fun KMQuad2dInstancedInterface.asPlatform(): Quad2dInstancedInterface = when (this) { is KMQuad2dInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dInstancedInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) +internal fun Quad2dInstancedInterface.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt index 3f8e2b225..848d1f1cb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface + actual interface KMQuad2dInterface { @@ -21,7 +23,7 @@ actual interface KMQuad2dInterface actual fun asMaskingObject(): KMMaskingObjectInterface } -private class KMQuad2dInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface) : KMQuad2dInterface +private class KMQuad2dInterfacePlatformWrapper(internal val nativeHandle: Quad2dInterface) : KMQuad2dInterface { override fun setFrame(frame: KMQuad3dD, textureCoordinates: KMRectD, origin: KMVec3D, is3d: Boolean) { @@ -55,7 +57,7 @@ private class KMQuad2dInterfacePlatformWrapper(internal val nativeHandle: io.ope } } -private class KMQuad2dInterfacePlatformProxy(private val delegate: KMQuad2dInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface() +private class KMQuad2dInterfacePlatformProxy(private val delegate: KMQuad2dInterface) : Quad2dInterface() { override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD, textureCoordinates: io.openmobilemaps.mapscore.shared.graphics.common.RectD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { @@ -89,8 +91,8 @@ private class KMQuad2dInterfacePlatformProxy(private val delegate: KMQuad2dInter } } -internal fun KMQuad2dInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface = when (this) { +internal fun KMQuad2dInterface.asPlatform(): Quad2dInterface = when (this) { is KMQuad2dInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) +internal fun Quad2dInterface.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt index d4fd182d6..d436ac0a5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface + actual interface KMQuad2dStretchedInstancedInterface { @@ -31,7 +33,7 @@ actual interface KMQuad2dStretchedInstancedInterface actual fun asMaskingObject(): KMMaskingObjectInterface } -private class KMQuad2dStretchedInstancedInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface) : KMQuad2dStretchedInstancedInterface +private class KMQuad2dStretchedInstancedInterfacePlatformWrapper(internal val nativeHandle: Quad2dStretchedInstancedInterface) : KMQuad2dStretchedInstancedInterface { override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { @@ -85,7 +87,7 @@ private class KMQuad2dStretchedInstancedInterfacePlatformWrapper(internal val na } } -private class KMQuad2dStretchedInstancedInterfacePlatformProxy(private val delegate: KMQuad2dStretchedInstancedInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface() +private class KMQuad2dStretchedInstancedInterfacePlatformProxy(private val delegate: KMQuad2dStretchedInstancedInterface) : Quad2dStretchedInstancedInterface() { override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { @@ -139,8 +141,8 @@ private class KMQuad2dStretchedInstancedInterfacePlatformProxy(private val deleg } } -internal fun KMQuad2dStretchedInstancedInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface = when (this) { +internal fun KMQuad2dStretchedInstancedInterface.asPlatform(): Quad2dStretchedInstancedInterface = when (this) { is KMQuad2dStretchedInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dStretchedInstancedInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) +internal fun Quad2dStretchedInstancedInterface.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt index b8b7bd70c..3a38ef956 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface + actual class KMRasterShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface + private val native = nativeHandle as RasterShaderInterface actual fun setStyle(style: KMRasterShaderStyle) { native.setStyle(style.asPlatform()) @@ -19,5 +21,5 @@ actual class KMRasterShaderInterface actual public constructor( } } -internal fun KMRasterShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) +internal fun KMRasterShaderInterface.asPlatform(): RasterShaderInterface = nativeHandle as RasterShaderInterface +internal fun RasterShaderInterface.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt index f7e1c792c..22d61f087 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -3,21 +3,23 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.RectanglePacker + actual class KMRectanglePacker actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.RectanglePacker + private val native = nativeHandle as RectanglePacker actual companion object { actual fun pack(rectangles: HashMap, maxPageSize: KMVec2I, spacing: Int): ArrayList { - val result = io.openmobilemaps.mapscore.shared.graphics.RectanglePacker.pack(HashMap(rectangles.map { it.key to it.value.asPlatform() }.toMap()), maxPageSize.asPlatform(), spacing) + val result = RectanglePacker.pack(HashMap(rectangles.map { it.key to it.value.asPlatform() }.toMap()), maxPageSize.asPlatform(), spacing) return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage).asKmp() }) } } } -internal fun KMRectanglePacker.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RectanglePacker = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.RectanglePacker -internal fun io.openmobilemaps.mapscore.shared.graphics.RectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) +internal fun KMRectanglePacker.asPlatform(): RectanglePacker = nativeHandle as RectanglePacker +internal fun RectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt index 340978e53..e06363ed1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface + actual class KMRenderConfigInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface + private val native = nativeHandle as RenderConfigInterface actual fun getGraphicsObject(): KMGraphicsObjectInterface { val result = native.getGraphicsObject() @@ -20,5 +22,5 @@ actual class KMRenderConfigInterface actual public constructor( } } -internal fun KMRenderConfigInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) +internal fun KMRenderConfigInterface.asPlatform(): RenderConfigInterface = nativeHandle as RenderConfigInterface +internal fun RenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt index 26475e824..7900895fb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface + actual interface KMRenderObjectInterface { @@ -19,7 +21,7 @@ actual interface KMRenderObjectInterface actual fun isHidden(): Boolean } -private class KMRenderObjectInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface) : KMRenderObjectInterface +private class KMRenderObjectInterfacePlatformWrapper(internal val nativeHandle: RenderObjectInterface) : KMRenderObjectInterface { override fun getGraphicsObject(): KMGraphicsObjectInterface { @@ -52,7 +54,7 @@ private class KMRenderObjectInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMRenderObjectInterfacePlatformProxy(private val delegate: KMRenderObjectInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface() +private class KMRenderObjectInterfacePlatformProxy(private val delegate: KMRenderObjectInterface) : RenderObjectInterface() { override fun getGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { @@ -85,8 +87,8 @@ private class KMRenderObjectInterfacePlatformProxy(private val delegate: KMRende } } -internal fun KMRenderObjectInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface = when (this) { +internal fun KMRenderObjectInterface.asPlatform(): RenderObjectInterface = when (this) { is KMRenderObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderObjectInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) +internal fun RenderObjectInterface.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index 552c3fdb5..2f5318e64 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -3,23 +3,7 @@ package io.openmobilemaps.mapscore.kmp -actual class KMRenderPassConfig actual public constructor( - renderPassIndex: Int, - isPassMasked: Boolean, - renderTarget: KMRenderTargetInterface?, -) { - actual val renderPassIndex: Int = renderPassIndex - actual val isPassMasked: Boolean = isPassMasked - actual val renderTarget: KMRenderTargetInterface? = renderTarget -} +actual typealias KMRenderPassConfig = io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig -internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig = io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig( - renderPassIndex = renderPassIndex, - isPassMasked = isPassMasked, - renderTarget = renderTarget?.let { it.asPlatform() }, -) -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( - renderPassIndex = renderPassIndex, - isPassMasked = isPassMasked, - renderTarget = renderTarget?.let { it.asKmp() }, -) +internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig = this +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt index c44971c32..ceb2f4a66 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface + actual interface KMRenderPassInterface { @@ -17,7 +19,7 @@ actual interface KMRenderPassInterface actual fun getScissoringRect(): KMRectI? } -private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface) : KMRenderPassInterface +private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: RenderPassInterface) : KMRenderPassInterface { override fun getRenderObjects(): ArrayList { @@ -45,7 +47,7 @@ private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: io } } -private class KMRenderPassInterfacePlatformProxy(private val delegate: KMRenderPassInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface() +private class KMRenderPassInterfacePlatformProxy(private val delegate: KMRenderPassInterface) : RenderPassInterface() { override fun getRenderObjects(): ArrayList { @@ -73,8 +75,8 @@ private class KMRenderPassInterfacePlatformProxy(private val delegate: KMRenderP } } -internal fun KMRenderPassInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface = when (this) { +internal fun KMRenderPassInterface.asPlatform(): RenderPassInterface = when (this) { is KMRenderPassInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderPassInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) +internal fun RenderPassInterface.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt index 7a9b607a4..f784cf3db 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface + actual interface KMRenderTargetInterface { actual fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? } -private class KMRenderTargetInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface) : KMRenderTargetInterface +private class KMRenderTargetInterfacePlatformWrapper(internal val nativeHandle: RenderTargetInterface) : KMRenderTargetInterface { override fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? { @@ -18,7 +20,7 @@ private class KMRenderTargetInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMRenderTargetInterfacePlatformProxy(private val delegate: KMRenderTargetInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface() +private class KMRenderTargetInterfacePlatformProxy(private val delegate: KMRenderTargetInterface) : RenderTargetInterface() { override fun asGlRenderTargetInterface(): io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface? { @@ -27,8 +29,8 @@ private class KMRenderTargetInterfacePlatformProxy(private val delegate: KMRende } } -internal fun KMRenderTargetInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface = when (this) { +internal fun KMRenderTargetInterface.asPlatform(): RenderTargetInterface = when (this) { is KMRenderTargetInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderTargetInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) +internal fun RenderTargetInterface.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt index 29caf603e..1c9d41f62 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.RendererInterface + actual interface KMRendererInterface { @@ -15,7 +17,7 @@ actual interface KMRendererInterface actual fun compute(renderingContext: KMRenderingContextInterface, camera: KMCameraInterface) } -private class KMRendererInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RendererInterface) : KMRendererInterface +private class KMRendererInterfacePlatformWrapper(internal val nativeHandle: RendererInterface) : KMRendererInterface { override fun addToRenderQueue(renderPass: KMRenderPassInterface) { @@ -35,7 +37,7 @@ private class KMRendererInterfacePlatformWrapper(internal val nativeHandle: io.o } } -private class KMRendererInterfacePlatformProxy(private val delegate: KMRendererInterface) : io.openmobilemaps.mapscore.shared.graphics.RendererInterface() +private class KMRendererInterfacePlatformProxy(private val delegate: KMRendererInterface) : RendererInterface() { override fun addToRenderQueue(renderPass: io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface) { @@ -55,8 +57,8 @@ private class KMRendererInterfacePlatformProxy(private val delegate: KMRendererI } } -internal fun KMRendererInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RendererInterface = when (this) { +internal fun KMRendererInterface.asPlatform(): RendererInterface = when (this) { is KMRendererInterfacePlatformWrapper -> this.nativeHandle else -> KMRendererInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.RendererInterface.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) +internal fun RendererInterface.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt index d090e8c61..1cb05c786 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface + actual interface KMRenderingContextInterface { @@ -27,7 +29,7 @@ actual interface KMRenderingContextInterface actual fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? } -private class KMRenderingContextInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface) : KMRenderingContextInterface +private class KMRenderingContextInterfacePlatformWrapper(internal val nativeHandle: RenderingContextInterface) : KMRenderingContextInterface { override fun onSurfaceCreated() { @@ -73,7 +75,7 @@ private class KMRenderingContextInterfacePlatformWrapper(internal val nativeHand } } -private class KMRenderingContextInterfacePlatformProxy(private val delegate: KMRenderingContextInterface) : io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface() +private class KMRenderingContextInterfacePlatformProxy(private val delegate: KMRenderingContextInterface) : RenderingContextInterface() { override fun onSurfaceCreated() { @@ -119,8 +121,8 @@ private class KMRenderingContextInterfacePlatformProxy(private val delegate: KMR } } -internal fun KMRenderingContextInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface = when (this) { +internal fun KMRenderingContextInterface.asPlatform(): RenderingContextInterface = when (this) { is KMRenderingContextInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderingContextInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) +internal fun RenderingContextInterface.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt index 53f7c9ac8..008a491ad 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface + actual class KMReverseGeocoderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface + private val native = nativeHandle as ReverseGeocoderInterface actual fun reverseGeocode(coord: KMCoord, thresholdMeters: Long): ArrayList { val result = native.reverseGeocode(coord.asPlatform(), thresholdMeters) @@ -23,11 +25,11 @@ actual class KMReverseGeocoderInterface actual public constructor( { actual fun create(loader: KMLoaderInterface, tileUrlTemplate: String, zoomLevel: Int): KMReverseGeocoderInterface { - val result = io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface.create(loader.asPlatform(), tileUrlTemplate, zoomLevel) + val result = ReverseGeocoderInterface.create(loader.asPlatform(), tileUrlTemplate, zoomLevel) return requireNotNull((result as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface)).asKmp() } } } -internal fun KMReverseGeocoderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface -internal fun io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) +internal fun KMReverseGeocoderInterface.asPlatform(): ReverseGeocoderInterface = nativeHandle as ReverseGeocoderInterface +internal fun ReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt index 54f219337..04be2dff7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface + actual interface KMSceneCallbackInterface { actual fun invalidate() } -private class KMSceneCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface) : KMSceneCallbackInterface +private class KMSceneCallbackInterfacePlatformWrapper(internal val nativeHandle: SceneCallbackInterface) : KMSceneCallbackInterface { override fun invalidate() { @@ -17,7 +19,7 @@ private class KMSceneCallbackInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMSceneCallbackInterfacePlatformProxy(private val delegate: KMSceneCallbackInterface) : io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface() +private class KMSceneCallbackInterfacePlatformProxy(private val delegate: KMSceneCallbackInterface) : SceneCallbackInterface() { override fun invalidate() { @@ -25,8 +27,8 @@ private class KMSceneCallbackInterfacePlatformProxy(private val delegate: KMScen } } -internal fun KMSceneCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface = when (this) { +internal fun KMSceneCallbackInterface.asPlatform(): SceneCallbackInterface = when (this) { is KMSceneCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMSceneCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.SceneCallbackInterface.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) +internal fun SceneCallbackInterface.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt index 298d0614a..1837fdafb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.SceneInterface + actual class KMSceneInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.SceneInterface + private val native = nativeHandle as SceneInterface actual fun setCallbackHandler(callbackInterface: KMSceneCallbackInterface) { native.setCallbackHandler(callbackInterface.asPlatform()) @@ -66,16 +68,16 @@ actual class KMSceneInterface actual public constructor( { actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface): KMSceneInterface { - val result = io.openmobilemaps.mapscore.shared.graphics.SceneInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform()) + val result = SceneInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface)).asKmp() } actual fun createWithOpenGl(): KMSceneInterface { - val result = io.openmobilemaps.mapscore.shared.graphics.SceneInterface.createWithOpenGl() + val result = SceneInterface.createWithOpenGl() return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface)).asKmp() } } } -internal fun KMSceneInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.SceneInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.SceneInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.SceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) +internal fun KMSceneInterface.asPlatform(): SceneInterface = nativeHandle as SceneInterface +internal fun SceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt index 839849c9f..ef7ab0da1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -3,16 +3,18 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks + actual class KMSchedulerGraphicsTaskCallbacks actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks + private val native = nativeHandle as SchedulerGraphicsTaskCallbacks actual fun requestGraphicsTaskExecution() { native.requestGraphicsTaskExecution() } } -internal fun KMSchedulerGraphicsTaskCallbacks.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks -internal fun io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) +internal fun KMSchedulerGraphicsTaskCallbacks.asPlatform(): SchedulerGraphicsTaskCallbacks = nativeHandle as SchedulerGraphicsTaskCallbacks +internal fun SchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt index 92a56327e..56ebd15cf 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface + actual interface KMSchedulerInterface { @@ -27,7 +29,7 @@ actual interface KMSchedulerInterface actual fun setSchedulerGraphicsTaskCallbacks(callbacks: KMSchedulerGraphicsTaskCallbacks) } -private class KMSchedulerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface) : KMSchedulerInterface +private class KMSchedulerInterfacePlatformWrapper(internal val nativeHandle: SchedulerInterface) : KMSchedulerInterface { override fun addTask(task: KMTaskInterface) { @@ -73,7 +75,7 @@ private class KMSchedulerInterfacePlatformWrapper(internal val nativeHandle: io. } } -private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedulerInterface) : io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface() +private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedulerInterface) : SchedulerInterface() { override fun addTask(task: io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface) { @@ -119,8 +121,8 @@ private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedule } } -internal fun KMSchedulerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface = when (this) { +internal fun KMSchedulerInterface.asPlatform(): SchedulerInterface = when (this) { is KMSchedulerInterfacePlatformWrapper -> this.nativeHandle else -> KMSchedulerInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) +internal fun SchedulerInterface.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index 969a91219..472b2b2f8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface + actual interface KMShaderFactoryInterface { @@ -57,7 +59,7 @@ actual interface KMShaderFactoryInterface actual fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface } -private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface) : KMShaderFactoryInterface +private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: ShaderFactoryInterface) : KMShaderFactoryInterface { override fun createAlphaShader(): KMAlphaShaderInterface { @@ -186,7 +188,7 @@ private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShaderFactoryInterface) : io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface() +private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShaderFactoryInterface) : ShaderFactoryInterface() { override fun createAlphaShader(): io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface { @@ -315,8 +317,8 @@ private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShad } } -internal fun KMShaderFactoryInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface = when (this) { +internal fun KMShaderFactoryInterface.asPlatform(): ShaderFactoryInterface = when (this) { is KMShaderFactoryInterfacePlatformWrapper -> this.nativeHandle else -> KMShaderFactoryInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) +internal fun ShaderFactoryInterface.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt index d988ce4e9..468bd7aac 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface + actual class KMShaderProgramInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface + private val native = nativeHandle as ShaderProgramInterface actual fun getProgramName(): String { val result = native.getProgramName() @@ -32,5 +34,5 @@ actual class KMShaderProgramInterface actual public constructor( } } -internal fun KMShaderProgramInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) +internal fun KMShaderProgramInterface.asPlatform(): ShaderProgramInterface = nativeHandle as ShaderProgramInterface +internal fun ShaderProgramInterface.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt index a12e703fe..177e71015 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface + actual class KMSkySphereLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface + private val native = nativeHandle as SkySphereLayerInterface actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() @@ -22,11 +24,11 @@ actual class KMSkySphereLayerInterface actual public constructor( { actual fun create(): KMSkySphereLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface.create() + val result = SkySphereLayerInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface)).asKmp() } } } -internal fun KMSkySphereLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) +internal fun KMSkySphereLayerInterface.asPlatform(): SkySphereLayerInterface = nativeHandle as SkySphereLayerInterface +internal fun SkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt index dbe5168c5..545b188ad 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface + actual class KMSkySphereShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface + private val native = nativeHandle as SkySphereShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() @@ -19,5 +21,5 @@ actual class KMSkySphereShaderInterface actual public constructor( } } -internal fun KMSkySphereShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) +internal fun KMSkySphereShaderInterface.asPlatform(): SkySphereShaderInterface = nativeHandle as SkySphereShaderInterface +internal fun SkySphereShaderInterface.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt index 56787e86d..09d0ac64e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface + actual class KMSphereEffectLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface + private val native = nativeHandle as SphereEffectLayerInterface actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() @@ -18,11 +20,11 @@ actual class KMSphereEffectLayerInterface actual public constructor( { actual fun create(): KMSphereEffectLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface.create() + val result = SphereEffectLayerInterface.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface)).asKmp() } } } -internal fun KMSphereEffectLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) +internal fun KMSphereEffectLayerInterface.asPlatform(): SphereEffectLayerInterface = nativeHandle as SphereEffectLayerInterface +internal fun SphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt index 716983717..4ade30c0c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface + actual class KMSphereEffectShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface + private val native = nativeHandle as SphereEffectShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() @@ -19,5 +21,5 @@ actual class KMSphereEffectShaderInterface actual public constructor( } } -internal fun KMSphereEffectShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) +internal fun KMSphereEffectShaderInterface.asPlatform(): SphereEffectShaderInterface = nativeHandle as SphereEffectShaderInterface +internal fun SphereEffectShaderInterface.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt index 78543f42d..1db1efad8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface + actual class KMStretchInstancedShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface + private val native = nativeHandle as StretchInstancedShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() @@ -15,5 +17,5 @@ actual class KMStretchInstancedShaderInterface actual public constructor( } } -internal fun KMStretchInstancedShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) +internal fun KMStretchInstancedShaderInterface.asPlatform(): StretchInstancedShaderInterface = nativeHandle as StretchInstancedShaderInterface +internal fun StretchInstancedShaderInterface.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt index e122be011..89449fee7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface + actual class KMStretchShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface + private val native = nativeHandle as StretchShaderInterface actual fun updateAlpha(value: Float) { native.updateAlpha(value) @@ -23,5 +25,5 @@ actual class KMStretchShaderInterface actual public constructor( } } -internal fun KMStretchShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) +internal fun KMStretchShaderInterface.asPlatform(): StretchShaderInterface = nativeHandle as StretchShaderInterface +internal fun StretchShaderInterface.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt index 191e14e9f..75405ef0f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface + actual interface KMTaskInterface { @@ -11,7 +13,7 @@ actual interface KMTaskInterface actual fun run() } -private class KMTaskInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface) : KMTaskInterface +private class KMTaskInterfacePlatformWrapper(internal val nativeHandle: TaskInterface) : KMTaskInterface { override fun getConfig(): KMTaskConfig { @@ -24,7 +26,7 @@ private class KMTaskInterfacePlatformWrapper(internal val nativeHandle: io.openm } } -private class KMTaskInterfacePlatformProxy(private val delegate: KMTaskInterface) : io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface() +private class KMTaskInterfacePlatformProxy(private val delegate: KMTaskInterface) : TaskInterface() { override fun getConfig(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig { @@ -37,8 +39,8 @@ private class KMTaskInterfacePlatformProxy(private val delegate: KMTaskInterface } } -internal fun KMTaskInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface = when (this) { +internal fun KMTaskInterface.asPlatform(): TaskInterface = when (this) { is KMTaskInterfacePlatformWrapper -> this.nativeHandle else -> KMTaskInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) +internal fun TaskInterface.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt index a4a8e7d17..ffc9c754f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -3,21 +3,23 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory + actual class KMTextFactory actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory + private val native = nativeHandle as TextFactory actual companion object { actual fun createText(text: ArrayList, coordinate: KMCoord, font: KMFont, textAnchor: KMAnchor, textJustify: KMTextJustify): KMTextInfoInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory.createText(ArrayList(text.map { it.asPlatform() }), coordinate.asPlatform(), font.asPlatform(), textAnchor.asPlatform(), textJustify.asPlatform()) + val result = TextFactory.createText(ArrayList(text.map { it.asPlatform() }), coordinate.asPlatform(), font.asPlatform(), textAnchor.asPlatform(), textJustify.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface)).asKmp() } } } -internal fun KMTextFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextFactory.asKmp(): KMTextFactory = KMTextFactory(this) +internal fun KMTextFactory.asPlatform(): TextFactory = nativeHandle as TextFactory +internal fun TextFactory.asKmp(): KMTextFactory = KMTextFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt index ad395710b..e19bd59ed 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface + actual interface KMTextInfoInterface { @@ -21,7 +23,7 @@ actual interface KMTextInfoInterface actual fun getLineCoordinates(): ArrayList? } -private class KMTextInfoInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface) : KMTextInfoInterface +private class KMTextInfoInterfacePlatformWrapper(internal val nativeHandle: TextInfoInterface) : KMTextInfoInterface { override fun getText(): ArrayList { @@ -60,7 +62,7 @@ private class KMTextInfoInterfacePlatformWrapper(internal val nativeHandle: io.o } } -private class KMTextInfoInterfacePlatformProxy(private val delegate: KMTextInfoInterface) : io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface() +private class KMTextInfoInterfacePlatformProxy(private val delegate: KMTextInfoInterface) : TextInfoInterface() { override fun getText(): ArrayList { @@ -99,8 +101,8 @@ private class KMTextInfoInterfacePlatformProxy(private val delegate: KMTextInfoI } } -internal fun KMTextInfoInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface = when (this) { +internal fun KMTextInfoInterface.asPlatform(): TextInfoInterface = when (this) { is KMTextInfoInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInfoInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) +internal fun TextInfoInterface.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt index b06d93950..f6eef760d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface + actual interface KMTextInstancedInterface { @@ -33,7 +35,7 @@ actual interface KMTextInstancedInterface actual fun asGraphicsObject(): KMGraphicsObjectInterface } -private class KMTextInstancedInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface) : KMTextInstancedInterface +private class KMTextInstancedInterfacePlatformWrapper(internal val nativeHandle: TextInstancedInterface) : KMTextInstancedInterface { override fun setFrame(frame: KMQuad2dD, origin: KMVec3D, is3d: Boolean) { @@ -90,7 +92,7 @@ private class KMTextInstancedInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMTextInstancedInterfacePlatformProxy(private val delegate: KMTextInstancedInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface() +private class KMTextInstancedInterfacePlatformProxy(private val delegate: KMTextInstancedInterface) : TextInstancedInterface() { override fun setFrame(frame: io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { @@ -147,8 +149,8 @@ private class KMTextInstancedInterfacePlatformProxy(private val delegate: KMText } } -internal fun KMTextInstancedInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface = when (this) { +internal fun KMTextInstancedInterface.asPlatform(): TextInstancedInterface = when (this) { is KMTextInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInstancedInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) +internal fun TextInstancedInterface.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt index 3af7baa74..3e5d2f8ab 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface + actual class KMTextInstancedShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface + private val native = nativeHandle as TextInstancedShaderInterface actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() @@ -15,5 +17,5 @@ actual class KMTextInstancedShaderInterface actual public constructor( } } -internal fun KMTextInstancedShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) +internal fun KMTextInstancedShaderInterface.asPlatform(): TextInstancedShaderInterface = nativeHandle as TextInstancedShaderInterface +internal fun TextInstancedShaderInterface.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt index 38d840e5b..a4c2ada0e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface + actual interface KMTextInterface { @@ -15,7 +17,7 @@ actual interface KMTextInterface actual fun asGraphicsObject(): KMGraphicsObjectInterface } -private class KMTextInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface) : KMTextInterface +private class KMTextInterfacePlatformWrapper(internal val nativeHandle: TextInterface) : KMTextInterface { override fun setTextsShared(vertices: KMSharedBytes, indices: KMSharedBytes) { @@ -36,7 +38,7 @@ private class KMTextInterfacePlatformWrapper(internal val nativeHandle: io.openm } } -private class KMTextInterfacePlatformProxy(private val delegate: KMTextInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface() +private class KMTextInterfacePlatformProxy(private val delegate: KMTextInterface) : TextInterface() { override fun setTextsShared(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes) { @@ -57,8 +59,8 @@ private class KMTextInterfacePlatformProxy(private val delegate: KMTextInterface } } -internal fun KMTextInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface = when (this) { +internal fun KMTextInterface.asPlatform(): TextInterface = when (this) { is KMTextInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) +internal fun TextInterface.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt index a00ebe38c..3da129e28 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface + actual class KMTextLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface + private val native = nativeHandle as TextLayerInterface actual fun setTexts(texts: ArrayList) { native.setTexts(ArrayList(texts.map { it.asPlatform() })) @@ -26,11 +28,11 @@ actual class KMTextLayerInterface actual public constructor( { actual fun create(fontLoader: KMFontLoaderInterface): KMTextLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface.create(fontLoader.asPlatform()) + val result = TextLayerInterface.create(fontLoader.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface)).asKmp() } } } -internal fun KMTextLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) +internal fun KMTextLayerInterface.asPlatform(): TextLayerInterface = nativeHandle as TextLayerInterface +internal fun TextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt index 67fd2b472..4187b7fed 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface + actual class KMTextShaderInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface + private val native = nativeHandle as TextShaderInterface actual fun setColor(color: KMColor) { native.setColor(color.asPlatform()) @@ -27,5 +29,5 @@ actual class KMTextShaderInterface actual public constructor( } } -internal fun KMTextShaderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface = nativeHandle as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) +internal fun KMTextShaderInterface.asPlatform(): TextShaderInterface = nativeHandle as TextShaderInterface +internal fun TextShaderInterface.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index fbbae3f68..b02b255b6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -3,19 +3,7 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTextureAtlas actual public constructor( - uvMap: HashMap, - texture: KMTextureHolderInterface?, -) { - actual val uvMap: HashMap = uvMap - actual val texture: KMTextureHolderInterface? = texture -} +actual typealias KMTextureAtlas = io.openmobilemaps.mapscore.shared.graphics.TextureAtlas -internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.TextureAtlas = io.openmobilemaps.mapscore.shared.graphics.TextureAtlas( - uvMap = HashMap(uvMap.map { it.key to it.value.asPlatform() }.toMap()), - texture = texture?.let { it.asPlatform() }, -) -internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( - uvMap = HashMap(uvMap.map { it.key to it.value.asKmp() }.toMap()), - texture = texture?.let { it.asKmp() }, -) +internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.TextureAtlas = this +internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt index 9171e8e5f..59ca5e70f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface + actual interface KMTextureHolderInterface { @@ -19,7 +21,7 @@ actual interface KMTextureHolderInterface actual fun clearFromGraphics() } -private class KMTextureHolderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) : KMTextureHolderInterface +private class KMTextureHolderInterfacePlatformWrapper(internal val nativeHandle: TextureHolderInterface) : KMTextureHolderInterface { override fun getImageWidth(): Int { @@ -52,7 +54,7 @@ private class KMTextureHolderInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMTextureHolderInterfacePlatformProxy(private val delegate: KMTextureHolderInterface) : io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface() +private class KMTextureHolderInterfacePlatformProxy(private val delegate: KMTextureHolderInterface) : TextureHolderInterface() { override fun getImageWidth(): Int { @@ -85,8 +87,8 @@ private class KMTextureHolderInterfacePlatformProxy(private val delegate: KMText } } -internal fun KMTextureHolderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface = when (this) { +internal fun KMTextureHolderInterface.asPlatform(): TextureHolderInterface = when (this) { is KMTextureHolderInterfacePlatformWrapper -> this.nativeHandle else -> KMTextureHolderInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) +internal fun TextureHolderInterface.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index a283ca562..3d2ca145f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -3,27 +3,7 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTextureLoaderResult actual public constructor( - data: KMTextureHolderInterface?, - etag: String?, - status: KMLoaderStatus, - errorCode: String?, -) { - actual val data: KMTextureHolderInterface? = data - actual val etag: String? = etag - actual val status: KMLoaderStatus = status - actual val errorCode: String? = errorCode -} +actual typealias KMTextureLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult -internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult( - data = data?.let { it.asPlatform() }, - etag = etag, - status = status.asPlatform(), - errorCode = errorCode, -) -internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( - data = data?.let { it.asKmp() }, - etag = etag, - status = status.asKmp(), - errorCode = errorCode, -) +internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult = this +internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt index b191b326d..bece10364 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -3,21 +3,23 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler + actual class KMThreadPoolScheduler actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler + private val native = nativeHandle as ThreadPoolScheduler actual companion object { actual fun create(): KMSchedulerInterface { - val result = io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler.create() + val result = ThreadPoolScheduler.create() return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface)).asKmp() } } } -internal fun KMThreadPoolScheduler.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler = nativeHandle as io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler -internal fun io.openmobilemaps.mapscore.shared.map.scheduling.ThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) +internal fun KMThreadPoolScheduler.asPlatform(): ThreadPoolScheduler = nativeHandle as ThreadPoolScheduler +internal fun ThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt index e3e85e4a0..adc330b9f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig + actual interface KMTiled2dMapLayerConfig { @@ -23,7 +25,7 @@ actual interface KMTiled2dMapLayerConfig actual fun getBounds(): KMRectCoord? } -private class KMTiled2dMapLayerConfigPlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig) : KMTiled2dMapLayerConfig +private class KMTiled2dMapLayerConfigPlatformWrapper(internal val nativeHandle: Tiled2dMapLayerConfig) : KMTiled2dMapLayerConfig { override fun getCoordinateSystemIdentifier(): Int { @@ -67,7 +69,7 @@ private class KMTiled2dMapLayerConfigPlatformWrapper(internal val nativeHandle: } } -private class KMTiled2dMapLayerConfigPlatformProxy(private val delegate: KMTiled2dMapLayerConfig) : io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig() +private class KMTiled2dMapLayerConfigPlatformProxy(private val delegate: KMTiled2dMapLayerConfig) : Tiled2dMapLayerConfig() { override fun getCoordinateSystemIdentifier(): Int { @@ -111,8 +113,8 @@ private class KMTiled2dMapLayerConfigPlatformProxy(private val delegate: KMTiled } } -internal fun KMTiled2dMapLayerConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig = when (this) { +internal fun KMTiled2dMapLayerConfig.asPlatform(): Tiled2dMapLayerConfig = when (this) { is KMTiled2dMapLayerConfigPlatformWrapper -> this.nativeHandle else -> KMTiled2dMapLayerConfigPlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) +internal fun Tiled2dMapLayerConfig.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt index 6c410ea40..48e6b0168 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface + actual interface KMTiled2dMapRasterLayerCallbackInterface { @@ -11,7 +13,7 @@ actual interface KMTiled2dMapRasterLayerCallbackInterface actual fun onLongPress(coord: KMCoord): Boolean } -private class KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface) : KMTiled2dMapRasterLayerCallbackInterface +private class KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(internal val nativeHandle: Tiled2dMapRasterLayerCallbackInterface) : KMTiled2dMapRasterLayerCallbackInterface { override fun onClickConfirmed(coord: KMCoord): Boolean { @@ -25,7 +27,7 @@ private class KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(internal v } } -private class KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapRasterLayerCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface() +private class KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapRasterLayerCallbackInterface) : Tiled2dMapRasterLayerCallbackInterface() { override fun onClickConfirmed(coord: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): Boolean { @@ -39,8 +41,8 @@ private class KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(private val } } -internal fun KMTiled2dMapRasterLayerCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface = when (this) { +internal fun KMTiled2dMapRasterLayerCallbackInterface.asPlatform(): Tiled2dMapRasterLayerCallbackInterface = when (this) { is KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) +internal fun Tiled2dMapRasterLayerCallbackInterface.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt index 51bc2ac2f..2a0bfcc77 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface + actual class KMTiled2dMapRasterLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface + private val native = nativeHandle as Tiled2dMapRasterLayerInterface actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() @@ -92,21 +94,21 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( { actual fun createWithMask(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, mask: KMMaskingObjectInterface): KMTiled2dMapRasterLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.createWithMask(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), mask.asPlatform()) + val result = Tiled2dMapRasterLayerInterface.createWithMask(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), mask.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } actual fun createWithShader(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, shader: KMShaderProgramInterface): KMTiled2dMapRasterLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.createWithShader(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), shader.asPlatform()) + val result = Tiled2dMapRasterLayerInterface.createWithShader(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), shader.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } actual fun create(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList): KMTiled2dMapRasterLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.create(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() })) + val result = Tiled2dMapRasterLayerInterface.create(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() })) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } } } -internal fun KMTiled2dMapRasterLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) +internal fun KMTiled2dMapRasterLayerInterface.asPlatform(): Tiled2dMapRasterLayerInterface = nativeHandle as Tiled2dMapRasterLayerInterface +internal fun Tiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt index 4b19f4104..04b2d8a42 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener + actual interface KMTiled2dMapReadyStateListener { actual fun stateUpdate(state: KMLayerReadyState) } -private class KMTiled2dMapReadyStateListenerPlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener) : KMTiled2dMapReadyStateListener +private class KMTiled2dMapReadyStateListenerPlatformWrapper(internal val nativeHandle: Tiled2dMapReadyStateListener) : KMTiled2dMapReadyStateListener { override fun stateUpdate(state: KMLayerReadyState) { @@ -17,7 +19,7 @@ private class KMTiled2dMapReadyStateListenerPlatformWrapper(internal val nativeH } } -private class KMTiled2dMapReadyStateListenerPlatformProxy(private val delegate: KMTiled2dMapReadyStateListener) : io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener() +private class KMTiled2dMapReadyStateListenerPlatformProxy(private val delegate: KMTiled2dMapReadyStateListener) : Tiled2dMapReadyStateListener() { override fun stateUpdate(state: io.openmobilemaps.mapscore.shared.map.LayerReadyState) { @@ -25,8 +27,8 @@ private class KMTiled2dMapReadyStateListenerPlatformProxy(private val delegate: } } -internal fun KMTiled2dMapReadyStateListener.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener = when (this) { +internal fun KMTiled2dMapReadyStateListener.asPlatform(): Tiled2dMapReadyStateListener = when (this) { is KMTiled2dMapReadyStateListenerPlatformWrapper -> this.nativeHandle else -> KMTiled2dMapReadyStateListenerPlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapReadyStateListener.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) +internal fun Tiled2dMapReadyStateListener.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt index fbd75edf4..aa7240479 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface + actual class KMTiled2dMapSourceInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface + private val native = nativeHandle as Tiled2dMapSourceInterface actual fun onVisibleBoundsChanged(visibleBounds: KMRectCoord, curT: Int, zoom: Double) { native.onVisibleBoundsChanged(visibleBounds.asPlatform(), curT, zoom) @@ -61,5 +63,5 @@ actual class KMTiled2dMapSourceInterface actual public constructor( } } -internal fun KMTiled2dMapSourceInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) +internal fun KMTiled2dMapSourceInterface.asPlatform(): Tiled2dMapSourceInterface = nativeHandle as Tiled2dMapSourceInterface +internal fun Tiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index eaea90ab1..51837cf22 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -3,19 +3,7 @@ package io.openmobilemaps.mapscore.kmp -actual class KMTiled2dMapVectorAssetInfo actual public constructor( - featureIdentifiersUv: HashMap, - texture: KMTextureHolderInterface?, -) { - actual val featureIdentifiersUv: HashMap = featureIdentifiersUv - actual val texture: KMTextureHolderInterface? = texture -} +actual typealias KMTiled2dMapVectorAssetInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo -internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo( - featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asPlatform() }.toMap()), - texture = texture?.let { it.asPlatform() }, -) -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( - featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asKmp() }.toMap()), - texture = texture?.let { it.asKmp() }, -) +internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo = this +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt index bc9110827..0458dd0ee 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface + actual class KMTiled2dMapVectorLayerInterface actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface + private val native = nativeHandle as Tiled2dMapVectorLayerInterface actual fun setSelectionDelegate(selectionDelegate: KMTiled2dMapVectorLayerSelectionCallbackInterface?) { native.setSelectionDelegate(selectionDelegate?.let { it.asPlatform() }) @@ -74,16 +76,16 @@ actual class KMTiled2dMapVectorLayerInterface actual public constructor( { actual fun createFromStyleJson(layerName: String, styleJsonUrl: String, loaders: ArrayList, fontLoader: KMFontLoaderInterface): KMTiled2dMapVectorLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface.createFromStyleJson(layerName, styleJsonUrl, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform()) + val result = Tiled2dMapVectorLayerInterface.createFromStyleJson(layerName, styleJsonUrl, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface)).asKmp() } actual fun createExplicitly(layerName: String, styleJson: String?, localStyleJson: Boolean?, loaders: ArrayList, fontLoader: KMFontLoaderInterface, localDataProvider: KMTiled2dMapVectorLayerLocalDataProviderInterface?, customZoomInfo: KMTiled2dMapZoomInfo?, symbolDelegate: KMTiled2dMapVectorLayerSymbolDelegateInterface?, sourceUrlParams: HashMap?): KMTiled2dMapVectorLayerInterface { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface.createExplicitly(layerName, styleJson?.let { it }, localStyleJson?.let { it }, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform(), localDataProvider?.let { it.asPlatform() }, customZoomInfo?.let { it.asPlatform() }, symbolDelegate?.let { it.asPlatform() }, sourceUrlParams?.let { HashMap(it.map { it.key to it.value }.toMap()) }) + val result = Tiled2dMapVectorLayerInterface.createExplicitly(layerName, styleJson?.let { it }, localStyleJson?.let { it }, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform(), localDataProvider?.let { it.asPlatform() }, customZoomInfo?.let { it.asPlatform() }, symbolDelegate?.let { it.asPlatform() }, sourceUrlParams?.let { HashMap(it.map { it.key to it.value }.toMap()) }) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface)).asKmp() } } } -internal fun KMTiled2dMapVectorLayerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) +internal fun KMTiled2dMapVectorLayerInterface.asPlatform(): Tiled2dMapVectorLayerInterface = nativeHandle as Tiled2dMapVectorLayerInterface +internal fun Tiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt index 1d87fde68..780d1defa 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface + actual interface KMTiled2dMapVectorLayerLocalDataProviderInterface { @@ -15,7 +17,7 @@ actual interface KMTiled2dMapVectorLayerLocalDataProviderInterface actual fun loadGeojson(sourceName: String, url: String): KMFuture } -private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface) : KMTiled2dMapVectorLayerLocalDataProviderInterface +private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(internal val nativeHandle: Tiled2dMapVectorLayerLocalDataProviderInterface) : KMTiled2dMapVectorLayerLocalDataProviderInterface { override fun getStyleJson(): String? { @@ -25,8 +27,7 @@ private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(i override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): KMFuture { val result = nativeHandle.loadSpriteAsync(spriteId, url, scale) - @Suppress("UNCHECKED_CAST") - return (result as com.snapchat.djinni.Future).asKmp() + return (result as com.snapchat.djinni.Future).asKmp() } override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): KMFuture { @@ -40,7 +41,7 @@ private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(i } } -private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerLocalDataProviderInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface() +private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerLocalDataProviderInterface) : Tiled2dMapVectorLayerLocalDataProviderInterface() { override fun getStyleJson(): String? { @@ -50,8 +51,7 @@ private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(pri override fun loadSpriteAsync(spriteId: String, url: String, scale: Int): com.snapchat.djinni.Future { val result = delegate.loadSpriteAsync(spriteId, url, scale) - @Suppress("UNCHECKED_CAST") - return result.asPlatform() as com.snapchat.djinni.Future + return result.asPlatform() } override fun loadSpriteJsonAsync(spriteId: String, url: String, scale: Int): com.snapchat.djinni.Future { @@ -65,8 +65,8 @@ private class KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(pri } } -internal fun KMTiled2dMapVectorLayerLocalDataProviderInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface = when (this) { +internal fun KMTiled2dMapVectorLayerLocalDataProviderInterface.asPlatform(): Tiled2dMapVectorLayerLocalDataProviderInterface = when (this) { is KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerLocalDataProviderInterface.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) +internal fun Tiled2dMapVectorLayerLocalDataProviderInterface.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt index d304baafe..3af9227a6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface + actual interface KMTiled2dMapVectorLayerSelectionCallbackInterface { @@ -13,7 +15,7 @@ actual interface KMTiled2dMapVectorLayerSelectionCallbackInterface actual fun didClickBackgroundConfirmed(coord: KMCoord): Boolean } -private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface) : KMTiled2dMapVectorLayerSelectionCallbackInterface +private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(internal val nativeHandle: Tiled2dMapVectorLayerSelectionCallbackInterface) : KMTiled2dMapVectorLayerSelectionCallbackInterface { override fun didSelectFeature(featureInfo: KMVectorLayerFeatureInfo, layerIdentifier: String, coord: KMCoord): Boolean { @@ -32,7 +34,7 @@ private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(i } } -private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSelectionCallbackInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface() +private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSelectionCallbackInterface) : Tiled2dMapVectorLayerSelectionCallbackInterface() { override fun didSelectFeature(featureInfo: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo, layerIdentifier: String, coord: io.openmobilemaps.mapscore.shared.map.coordinates.Coord): Boolean { @@ -51,8 +53,8 @@ private class KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(pri } } -internal fun KMTiled2dMapVectorLayerSelectionCallbackInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface = when (this) { +internal fun KMTiled2dMapVectorLayerSelectionCallbackInterface.asPlatform(): Tiled2dMapVectorLayerSelectionCallbackInterface = when (this) { is KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSelectionCallbackInterface.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) +internal fun Tiled2dMapVectorLayerSelectionCallbackInterface.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt index dcace4bcc..ee42ffed4 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt @@ -3,13 +3,15 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface + actual interface KMTiled2dMapVectorLayerSymbolDelegateInterface { actual fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList } -private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface) : KMTiled2dMapVectorLayerSymbolDelegateInterface +private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(internal val nativeHandle: Tiled2dMapVectorLayerSymbolDelegateInterface) : KMTiled2dMapVectorLayerSymbolDelegateInterface { override fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList { @@ -18,7 +20,7 @@ private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(inte } } -private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSymbolDelegateInterface) : io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface() +private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(private val delegate: KMTiled2dMapVectorLayerSymbolDelegateInterface) : Tiled2dMapVectorLayerSymbolDelegateInterface() { override fun getCustomAssetsFor(featureInfos: ArrayList, layerIdentifier: String): ArrayList { @@ -27,8 +29,8 @@ private class KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(privat } } -internal fun KMTiled2dMapVectorLayerSymbolDelegateInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface = when (this) { +internal fun KMTiled2dMapVectorLayerSymbolDelegateInterface.asPlatform(): Tiled2dMapVectorLayerSymbolDelegateInterface = when (this) { is KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerSymbolDelegateInterface.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) +internal fun Tiled2dMapVectorLayerSymbolDelegateInterface.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt index e5711d642..4593e3911 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface + actual interface KMTouchHandlerInterface { @@ -15,7 +17,7 @@ actual interface KMTouchHandlerInterface actual fun removeListener(listener: KMTouchInterface) } -private class KMTouchHandlerInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface) : KMTouchHandlerInterface +private class KMTouchHandlerInterfacePlatformWrapper(internal val nativeHandle: TouchHandlerInterface) : KMTouchHandlerInterface { override fun onTouchEvent(touchEvent: KMTouchEvent) { @@ -35,7 +37,7 @@ private class KMTouchHandlerInterfacePlatformWrapper(internal val nativeHandle: } } -private class KMTouchHandlerInterfacePlatformProxy(private val delegate: KMTouchHandlerInterface) : io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface() +private class KMTouchHandlerInterfacePlatformProxy(private val delegate: KMTouchHandlerInterface) : TouchHandlerInterface() { override fun onTouchEvent(touchEvent: io.openmobilemaps.mapscore.shared.map.controls.TouchEvent) { @@ -55,8 +57,8 @@ private class KMTouchHandlerInterfacePlatformProxy(private val delegate: KMTouch } } -internal fun KMTouchHandlerInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface = when (this) { +internal fun KMTouchHandlerInterface.asPlatform(): TouchHandlerInterface = when (this) { is KMTouchHandlerInterfacePlatformWrapper -> this.nativeHandle else -> KMTouchHandlerInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) +internal fun TouchHandlerInterface.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt index 5f40d5646..f66a370b0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -3,6 +3,8 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.controls.TouchInterface + actual interface KMTouchInterface { @@ -31,7 +33,7 @@ actual interface KMTouchInterface actual fun clearTouch() } -private class KMTouchInterfacePlatformWrapper(internal val nativeHandle: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface) : KMTouchInterface +private class KMTouchInterfacePlatformWrapper(internal val nativeHandle: TouchInterface) : KMTouchInterface { override fun onTouchDown(posScreen: KMVec2F): Boolean { @@ -94,7 +96,7 @@ private class KMTouchInterfacePlatformWrapper(internal val nativeHandle: io.open } } -private class KMTouchInterfacePlatformProxy(private val delegate: KMTouchInterface) : io.openmobilemaps.mapscore.shared.map.controls.TouchInterface() +private class KMTouchInterfacePlatformProxy(private val delegate: KMTouchInterface) : TouchInterface() { override fun onTouchDown(posScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F): Boolean { @@ -157,8 +159,8 @@ private class KMTouchInterfacePlatformProxy(private val delegate: KMTouchInterfa } } -internal fun KMTouchInterface.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchInterface = when (this) { +internal fun KMTouchInterface.asPlatform(): TouchInterface = when (this) { is KMTouchInterfacePlatformWrapper -> this.nativeHandle else -> KMTouchInterfacePlatformProxy(this) } -internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchInterface.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) +internal fun TouchInterface.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt index bf7f11650..5836de8cb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -3,11 +3,13 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource + actual class KMWmtsCapabilitiesResource actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource + private val native = nativeHandle as WmtsCapabilitiesResource actual fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? { val result = native.createLayer(identifier, ArrayList(tileLoaders.map { it.asPlatform() })) @@ -58,11 +60,11 @@ actual class KMWmtsCapabilitiesResource actual public constructor( { actual fun create(xml: String): KMWmtsCapabilitiesResource { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource.create(xml) + val result = WmtsCapabilitiesResource.create(xml) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource)).asKmp() } } } -internal fun KMWmtsCapabilitiesResource.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) +internal fun KMWmtsCapabilitiesResource.asPlatform(): WmtsCapabilitiesResource = nativeHandle as WmtsCapabilitiesResource +internal fun WmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt index 775ab399f..6e03a79ed 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -3,21 +3,23 @@ package io.openmobilemaps.mapscore.kmp +import io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory + actual class KMWmtsTiled2dMapLayerConfigFactory actual public constructor( nativeHandle: Any, ) { internal val nativeHandle: Any = nativeHandle - private val native = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory + private val native = nativeHandle as WmtsTiled2dMapLayerConfigFactory actual companion object { actual fun create(wmtsLayerConfiguration: KMWmtsLayerDescription, zoomLevelInfo: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, coordinateSystemIdentifier: Int, matrixSetIdentifier: String): KMTiled2dMapLayerConfig { - val result = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory.create(wmtsLayerConfiguration.asPlatform(), ArrayList(zoomLevelInfo.map { it.asPlatform() }), zoomInfo.asPlatform(), coordinateSystemIdentifier, matrixSetIdentifier) + val result = WmtsTiled2dMapLayerConfigFactory.create(wmtsLayerConfiguration.asPlatform(), ArrayList(zoomLevelInfo.map { it.asPlatform() }), zoomInfo.asPlatform(), coordinateSystemIdentifier, matrixSetIdentifier) return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } } } -internal fun KMWmtsTiled2dMapLayerConfigFactory.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory = nativeHandle as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) +internal fun KMWmtsTiled2dMapLayerConfigFactory.asPlatform(): WmtsTiled2dMapLayerConfigFactory = nativeHandle as WmtsTiled2dMapLayerConfigFactory +internal fun WmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) diff --git a/external/djinni b/external/djinni index 7f6e948d9..c2226bc15 160000 --- a/external/djinni +++ b/external/djinni @@ -1 +1 @@ -Subproject commit 7f6e948d9a8f1719cb6178727d5c2f2c1c57a439 +Subproject commit c2226bc152764cea6e29b8d9f81bb61def8488d3 From ecaeb74408c91b84a4e6d9c13d2c4b6112e4ff06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Fri, 6 Feb 2026 10:14:42 +0100 Subject: [PATCH 57/63] fix merge issues --- .../kmp/KMExceptionLoggerDelegateInterface.kt | 10 +++--- .../kmp/KMGraphicsObjectFactoryInterface.kt | 36 +++++++++++++++++++ .../mapscore/kmp/KMPolygon2dInterface.kt | 20 ++++++++--- .../mapscore/kmp/KMShaderFactoryInterface.kt | 24 +++++++++++++ .../mapscore/kmp/KMTessellationMode.kt | 9 +++++ .../mapscore/kmp/KMTouchInterface.kt | 12 +++++++ .../kmp/KMExceptionLoggerDelegateInterface.kt | 2 +- .../kmp/KMGraphicsObjectFactoryInterface.kt | 6 ++++ .../mapscore/kmp/KMPolygon2dInterface.kt | 4 ++- .../mapscore/kmp/KMShaderFactoryInterface.kt | 4 +++ .../mapscore/kmp/KMTessellationMode.kt | 10 ++++++ .../mapscore/kmp/KMTouchAction.kt | 1 + .../mapscore/kmp/KMTouchEvent.kt | 2 ++ .../mapscore/kmp/KMTouchInterface.kt | 2 ++ .../kmp/KMExceptionLoggerDelegateInterface.kt | 10 +++--- .../kmp/KMGraphicsObjectFactoryInterface.kt | 36 +++++++++++++++++++ .../mapscore/kmp/KMPolygon2dInterface.kt | 20 ++++++++--- .../mapscore/kmp/KMShaderFactoryInterface.kt | 24 +++++++++++++ .../mapscore/kmp/KMTessellationMode.kt | 32 +++++++++++++++++ .../mapscore/kmp/KMTouchAction.kt | 6 ++-- .../mapscore/kmp/KMTouchEvent.kt | 4 +++ .../mapscore/kmp/KMTouchInterface.kt | 12 +++++++ djinni/run_djinni.sh | 2 -- 23 files changed, 262 insertions(+), 26 deletions(-) create mode 100644 bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt create mode 100644 bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt create mode 100644 bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt index 36838ec0c..503ec523d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -8,22 +8,22 @@ import io.openmobilemaps.mapscore.shared.utils.ExceptionLoggerDelegateInterface actual interface KMExceptionLoggerDelegateInterface { - actual fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) + actual fun logMessage(errorDomain: String, code: Int, customValues: HashMap, functionName: String, file: String, line: Int) } private class KMExceptionLoggerDelegateInterfacePlatformWrapper(internal val nativeHandle: ExceptionLoggerDelegateInterface) : KMExceptionLoggerDelegateInterface { - override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { - nativeHandle.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), function, file, line) + override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, functionName: String, file: String, line: Int) { + nativeHandle.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), functionName, file, line) } } private class KMExceptionLoggerDelegateInterfacePlatformProxy(private val delegate: KMExceptionLoggerDelegateInterface) : ExceptionLoggerDelegateInterface() { - override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { - delegate.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), function, file, line) + override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, functionName: String, file: String, line: Int) { + delegate.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), functionName, file, line) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index 78ea61016..404557487 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -10,8 +10,12 @@ actual interface KMGraphicsObjectFactoryInterface actual fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface + actual fun createQuadTessellated(shader: KMShaderProgramInterface): KMQuad2dInterface + actual fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface + actual fun createPolygonTessellated(shader: KMShaderProgramInterface): KMPolygon2dInterface + actual fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface actual fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface @@ -28,6 +32,8 @@ actual interface KMGraphicsObjectFactoryInterface actual fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface + actual fun createPolygonMaskTessellated(is3d: Boolean): KMPolygon2dInterface + actual fun createText(shader: KMShaderProgramInterface): KMTextInterface actual fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface @@ -41,11 +47,21 @@ private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativ return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface)).asKmp() } + override fun createQuadTessellated(shader: KMShaderProgramInterface): KMQuad2dInterface { + val result = nativeHandle.createQuadTessellated(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface)).asKmp() + } + override fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface { val result = nativeHandle.createPolygon(shader.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() } + override fun createPolygonTessellated(shader: KMShaderProgramInterface): KMPolygon2dInterface { + val result = nativeHandle.createPolygonTessellated(shader.asPlatform()) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + } + override fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface { val result = nativeHandle.createIcosahedronObject(shader.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface)).asKmp() @@ -86,6 +102,11 @@ private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativ return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() } + override fun createPolygonMaskTessellated(is3d: Boolean): KMPolygon2dInterface { + val result = nativeHandle.createPolygonMaskTessellated(is3d) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + } + override fun createText(shader: KMShaderProgramInterface): KMTextInterface { val result = nativeHandle.createText(shader.asPlatform()) return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface)).asKmp() @@ -105,11 +126,21 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate return result.asPlatform() } + override fun createQuadTessellated(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface { + val result = delegate.createQuadTessellated(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + override fun createPolygon(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface { val result = delegate.createPolygon(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) return result.asPlatform() } + override fun createPolygonTessellated(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface { + val result = delegate.createPolygonTessellated(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + return result.asPlatform() + } + override fun createIcosahedronObject(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface { val result = delegate.createIcosahedronObject(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) return result.asPlatform() @@ -150,6 +181,11 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate return result.asPlatform() } + override fun createPolygonMaskTessellated(is3d: Boolean): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface { + val result = delegate.createPolygonMaskTessellated(is3d) + return result.asPlatform() + } + override fun createText(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface { val result = delegate.createText(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) return result.asPlatform() diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index 308be6bb2..ae33a7221 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -8,7 +8,9 @@ import io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface actual interface KMPolygon2dInterface { - actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) + + actual fun setSubdivisionFactor(factor: Int) actual fun asGraphicsObject(): KMGraphicsObjectInterface @@ -18,8 +20,12 @@ actual interface KMPolygon2dInterface private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: Polygon2dInterface) : KMPolygon2dInterface { - override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { - nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + nativeHandle.setSubdivisionFactor(factor) } override fun asGraphicsObject(): KMGraphicsObjectInterface { @@ -36,8 +42,12 @@ private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: Pol private class KMPolygon2dInterfacePlatformProxy(private val delegate: KMPolygon2dInterface) : Polygon2dInterface() { - override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D) { - delegate.setVertices((vertices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp()) + override fun setVertices(vertices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, indices: io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, is3d: Boolean) { + delegate.setVertices((vertices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (indices as io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes).asKmp(), (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + delegate.setSubdivisionFactor(factor) } override fun asGraphicsObject(): io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index 472b2b2f8..37c33d783 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -28,6 +28,8 @@ actual interface KMShaderFactoryInterface actual fun createColorShader(): KMColorShaderInterface + actual fun createPolygonTessellatedShader(unitSphere: Boolean): KMColorShaderInterface + actual fun createColorCircleShader(): KMColorCircleShaderInterface actual fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface @@ -46,6 +48,8 @@ actual interface KMShaderFactoryInterface actual fun createUnitSphereRasterShader(): KMRasterShaderInterface + actual fun createQuadTessellatedShader(): KMRasterShaderInterface + actual fun createStretchShader(): KMStretchShaderInterface actual fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface @@ -112,6 +116,11 @@ private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() } + override fun createPolygonTessellatedShader(unitSphere: Boolean): KMColorShaderInterface { + val result = nativeHandle.createPolygonTessellatedShader(unitSphere) + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + } + override fun createColorCircleShader(): KMColorCircleShaderInterface { val result = nativeHandle.createColorCircleShader() return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface)).asKmp() @@ -157,6 +166,11 @@ private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface)).asKmp() } + override fun createQuadTessellatedShader(): KMRasterShaderInterface { + val result = nativeHandle.createQuadTessellatedShader() + return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface)).asKmp() + } + override fun createStretchShader(): KMStretchShaderInterface { val result = nativeHandle.createStretchShader() return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface)).asKmp() @@ -241,6 +255,11 @@ private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShad return result.asPlatform() } + override fun createPolygonTessellatedShader(unitSphere: Boolean): io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface { + val result = delegate.createPolygonTessellatedShader(unitSphere) + return result.asPlatform() + } + override fun createColorCircleShader(): io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface { val result = delegate.createColorCircleShader() return result.asPlatform() @@ -286,6 +305,11 @@ private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShad return result.asPlatform() } + override fun createQuadTessellatedShader(): io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface { + val result = delegate.createQuadTessellatedShader() + return result.asPlatform() + } + override fun createStretchShader(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface { val result = delegate.createStretchShader() return result.asPlatform() diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt new file mode 100644 index 000000000..8d767bf39 --- /dev/null +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt @@ -0,0 +1,9 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +actual typealias KMTessellationMode = io.openmobilemaps.mapscore.shared.graphics.shader.TessellationMode + +internal fun KMTessellationMode.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.TessellationMode = this +internal fun io.openmobilemaps.mapscore.shared.graphics.shader.TessellationMode.asKmp(): KMTessellationMode = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt index f66a370b0..b3220f98f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -30,6 +30,8 @@ actual interface KMTouchInterface actual fun onTwoFingerMoveComplete(): Boolean + actual fun onScroll(posScreen: KMVec2F, scrollDelta: Float): Boolean + actual fun clearTouch() } @@ -91,6 +93,11 @@ private class KMTouchInterfacePlatformWrapper(internal val nativeHandle: TouchIn return result } + override fun onScroll(posScreen: KMVec2F, scrollDelta: Float): Boolean { + val result = nativeHandle.onScroll(posScreen.asPlatform(), scrollDelta) + return result + } + override fun clearTouch() { nativeHandle.clearTouch() } @@ -154,6 +161,11 @@ private class KMTouchInterfacePlatformProxy(private val delegate: KMTouchInterfa return result } + override fun onScroll(posScreen: io.openmobilemaps.mapscore.shared.graphics.common.Vec2F, scrollDelta: Float): Boolean { + val result = delegate.onScroll((posScreen as io.openmobilemaps.mapscore.shared.graphics.common.Vec2F).asKmp(), scrollDelta) + return result + } + override fun clearTouch() { delegate.clearTouch() } diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt index a18507021..c480cd822 100644 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -5,5 +5,5 @@ package io.openmobilemaps.mapscore.kmp expect interface KMExceptionLoggerDelegateInterface { - fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) + fun logMessage(errorDomain: String, code: Int, customValues: HashMap, functionName: String, file: String, line: Int) } diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index 8241bdd4b..3ee2723e5 100644 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -7,8 +7,12 @@ expect interface KMGraphicsObjectFactoryInterface { fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface + fun createQuadTessellated(shader: KMShaderProgramInterface): KMQuad2dInterface + fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface + fun createPolygonTessellated(shader: KMShaderProgramInterface): KMPolygon2dInterface + fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface @@ -25,6 +29,8 @@ expect interface KMGraphicsObjectFactoryInterface { fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface + fun createPolygonMaskTessellated(is3d: Boolean): KMPolygon2dInterface + fun createText(shader: KMShaderProgramInterface): KMTextInterface fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index ad8b63ba5..294c8faf0 100644 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -5,7 +5,9 @@ package io.openmobilemaps.mapscore.kmp expect interface KMPolygon2dInterface { - fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) + + fun setSubdivisionFactor(factor: Int) fun asGraphicsObject(): KMGraphicsObjectInterface diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index 5fb91243a..8e0c5a5ae 100644 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -25,6 +25,8 @@ expect interface KMShaderFactoryInterface { fun createColorShader(): KMColorShaderInterface + fun createPolygonTessellatedShader(unitSphere: Boolean): KMColorShaderInterface + fun createColorCircleShader(): KMColorCircleShaderInterface fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface @@ -43,6 +45,8 @@ expect interface KMShaderFactoryInterface { fun createUnitSphereRasterShader(): KMRasterShaderInterface + fun createQuadTessellatedShader(): KMRasterShaderInterface + fun createStretchShader(): KMStretchShaderInterface fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt new file mode 100644 index 000000000..292ad61f6 --- /dev/null +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt @@ -0,0 +1,10 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +package io.openmobilemaps.mapscore.kmp + +expect enum class KMTessellationMode { + NONE, + QUAD, + TRIANGLE, +} diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt index 5213c54d1..06381ea62 100644 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt @@ -7,5 +7,6 @@ expect enum class KMTouchAction { DOWN, MOVE, UP, + SCROLL, CANCEL, } diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt index b77b56136..e860aef00 100644 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -5,8 +5,10 @@ package io.openmobilemaps.mapscore.kmp expect class KMTouchEvent( pointers: ArrayList, + scrollDelta: Float, touchAction: KMTouchAction, ) { val pointers: ArrayList + val scrollDelta: Float val touchAction: KMTouchAction } diff --git a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt index 15b9cc7b8..4c2827696 100644 --- a/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt +++ b/bridging/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -27,5 +27,7 @@ expect interface KMTouchInterface { fun onTwoFingerMoveComplete(): Boolean + fun onScroll(posScreen: KMVec2F, scrollDelta: Float): Boolean + fun clearTouch() } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt index 00600c5e0..8367f14b8 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -14,22 +14,22 @@ import platform.darwin.NSObject actual interface KMExceptionLoggerDelegateInterface { - actual fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) + actual fun logMessage(errorDomain: String, code: Int, customValues: HashMap, functionName: String, file: String, line: Int) } private class KMExceptionLoggerDelegateInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol) : KMExceptionLoggerDelegateInterface { - override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, function: String, file: String, line: Int) { - nativeHandle.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), function, file, line) + override fun logMessage(errorDomain: String, code: Int, customValues: HashMap, functionName: String, file: String, line: Int) { + nativeHandle.logMessage(errorDomain, code, HashMap(customValues.map { it.key to it.value }.toMap()), functionName, file, line) } } private class KMExceptionLoggerDelegateInterfacePlatformProxy(private val delegate: KMExceptionLoggerDelegateInterface) : NSObject(), MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol { - override fun logMessage(errorDomain: String, code: Int, customValues: Map, function: String, file: String, line: Int) { - delegate.logMessage(errorDomain, code, HashMap(((customValues as? Map<*, *>)?.map { (it.key as String) to (it.value as String) }?.toMap() ?: run { val e = (customValues as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((customValues as platform.Foundation.NSDictionary).objectForKey(key) as String) } })), function, file, line) + override fun logMessage(errorDomain: String, code: Int, customValues: Map, functionName: String, file: String, line: Int) { + delegate.logMessage(errorDomain, code, HashMap(((customValues as? Map<*, *>)?.map { (it.key as String) to (it.value as String) }?.toMap() ?: run { val e = (customValues as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((customValues as platform.Foundation.NSDictionary).objectForKey(key) as String) } })), functionName, file, line) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index 29eb0bd73..905298afd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -16,8 +16,12 @@ actual interface KMGraphicsObjectFactoryInterface actual fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface + actual fun createQuadTessellated(shader: KMShaderProgramInterface): KMQuad2dInterface + actual fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface + actual fun createPolygonTessellated(shader: KMShaderProgramInterface): KMPolygon2dInterface + actual fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface actual fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface @@ -34,6 +38,8 @@ actual interface KMGraphicsObjectFactoryInterface actual fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface + actual fun createPolygonMaskTessellated(is3d: Boolean): KMPolygon2dInterface + actual fun createText(shader: KMShaderProgramInterface): KMTextInterface actual fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface @@ -47,11 +53,21 @@ private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativ return requireNotNull((result as MapCoreSharedModule.MCQuad2dInterfaceProtocol)).asKmp() } + override fun createQuadTessellated(shader: KMShaderProgramInterface): KMQuad2dInterface { + val result = nativeHandle.createQuadTessellated(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCQuad2dInterfaceProtocol)).asKmp() + } + override fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface { val result = nativeHandle.createPolygon(shader.asPlatform()) return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() } + override fun createPolygonTessellated(shader: KMShaderProgramInterface): KMPolygon2dInterface { + val result = nativeHandle.createPolygonTessellated(shader.asPlatform()) + return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + } + override fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface { val result = nativeHandle.createIcosahedronObject(shader.asPlatform()) return requireNotNull((result as MapCoreSharedModule.MCIcosahedronInterfaceProtocol)).asKmp() @@ -92,6 +108,11 @@ private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativ return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() } + override fun createPolygonMaskTessellated(is3d: Boolean): KMPolygon2dInterface { + val result = nativeHandle.createPolygonMaskTessellated(is3d) + return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + } + override fun createText(shader: KMShaderProgramInterface): KMTextInterface { val result = nativeHandle.createText(shader.asPlatform()) return requireNotNull((result as MapCoreSharedModule.MCTextInterfaceProtocol)).asKmp() @@ -111,11 +132,21 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate return result.asPlatform() } + override fun createQuadTessellated(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dInterfaceProtocol? { + val result = delegate.createQuadTessellated(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + override fun createPolygon(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygon2dInterfaceProtocol? { val result = delegate.createPolygon(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) return result.asPlatform() } + override fun createPolygonTessellated(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygon2dInterfaceProtocol? { + val result = delegate.createPolygonTessellated(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + return result.asPlatform() + } + override fun createIcosahedronObject(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCIcosahedronInterfaceProtocol? { val result = delegate.createIcosahedronObject(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) return result.asPlatform() @@ -156,6 +187,11 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate return result.asPlatform() } + override fun createPolygonMaskTessellated(is3d: Boolean): MapCoreSharedModule.MCPolygon2dInterfaceProtocol? { + val result = delegate.createPolygonMaskTessellated(is3d) + return result.asPlatform() + } + override fun createText(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCTextInterfaceProtocol? { val result = delegate.createText(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) return result.asPlatform() diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index 36983e183..f219a8257 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -14,7 +14,9 @@ import platform.darwin.NSObject actual interface KMPolygon2dInterface { - actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) + actual fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) + + actual fun setSubdivisionFactor(factor: Int) actual fun asGraphicsObject(): KMGraphicsObjectInterface @@ -24,8 +26,12 @@ actual interface KMPolygon2dInterface private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: MapCoreSharedModule.MCPolygon2dInterfaceProtocol) : KMPolygon2dInterface { - override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D) { - nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform()) + override fun setVertices(vertices: KMSharedBytes, indices: KMSharedBytes, origin: KMVec3D, is3d: Boolean) { + nativeHandle.setVertices(vertices.asPlatform(), indices.asPlatform(), origin.asPlatform(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + nativeHandle.setSubdivisionFactor(factor) } override fun asGraphicsObject(): KMGraphicsObjectInterface { @@ -42,8 +48,12 @@ private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: Map private class KMPolygon2dInterfacePlatformProxy(private val delegate: KMPolygon2dInterface) : NSObject(), MapCoreSharedModule.MCPolygon2dInterfaceProtocol { - override fun setVertices(vertices: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes, origin: MapCoreSharedModule.MCVec3D) { - delegate.setVertices((vertices as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp()) + override fun setVertices(vertices: MapCoreSharedModule.MCSharedBytes, indices: MapCoreSharedModule.MCSharedBytes, origin: MapCoreSharedModule.MCVec3D, is3d: Boolean) { + delegate.setVertices((vertices as MapCoreSharedModule.MCSharedBytes).asKmp(), (indices as MapCoreSharedModule.MCSharedBytes).asKmp(), (origin as MapCoreSharedModule.MCVec3D).asKmp(), is3d) + } + + override fun setSubdivisionFactor(factor: Int) { + delegate.setSubdivisionFactor(factor) } override fun asGraphicsObject(): MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol? { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index d094e658c..0af65d5fe 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -34,6 +34,8 @@ actual interface KMShaderFactoryInterface actual fun createColorShader(): KMColorShaderInterface + actual fun createPolygonTessellatedShader(unitSphere: Boolean): KMColorShaderInterface + actual fun createColorCircleShader(): KMColorCircleShaderInterface actual fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface @@ -52,6 +54,8 @@ actual interface KMShaderFactoryInterface actual fun createUnitSphereRasterShader(): KMRasterShaderInterface + actual fun createQuadTessellatedShader(): KMRasterShaderInterface + actual fun createStretchShader(): KMStretchShaderInterface actual fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface @@ -118,6 +122,11 @@ private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() } + override fun createPolygonTessellatedShader(unitSphere: Boolean): KMColorShaderInterface { + val result = nativeHandle.createPolygonTessellatedShader(unitSphere) + return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + } + override fun createColorCircleShader(): KMColorCircleShaderInterface { val result = nativeHandle.createColorCircleShader() return requireNotNull((result as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol)).asKmp() @@ -163,6 +172,11 @@ private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: return requireNotNull((result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol)).asKmp() } + override fun createQuadTessellatedShader(): KMRasterShaderInterface { + val result = nativeHandle.createQuadTessellatedShader() + return requireNotNull((result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol)).asKmp() + } + override fun createStretchShader(): KMStretchShaderInterface { val result = nativeHandle.createStretchShader() return requireNotNull((result as MapCoreSharedModule.MCStretchShaderInterfaceProtocol)).asKmp() @@ -247,6 +261,11 @@ private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShad return result.asPlatform() } + override fun createPolygonTessellatedShader(unitSphere: Boolean): MapCoreSharedModule.MCColorShaderInterfaceProtocol? { + val result = delegate.createPolygonTessellatedShader(unitSphere) + return result.asPlatform() + } + override fun createColorCircleShader(): MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol? { val result = delegate.createColorCircleShader() return result.asPlatform() @@ -292,6 +311,11 @@ private class KMShaderFactoryInterfacePlatformProxy(private val delegate: KMShad return result.asPlatform() } + override fun createQuadTessellatedShader(): MapCoreSharedModule.MCRasterShaderInterfaceProtocol? { + val result = delegate.createQuadTessellatedShader() + return result.asPlatform() + } + override fun createStretchShader(): MapCoreSharedModule.MCStretchShaderInterfaceProtocol? { val result = delegate.createStretchShader() return result.asPlatform() diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt new file mode 100644 index 000000000..9171ab454 --- /dev/null +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt @@ -0,0 +1,32 @@ +// AUTOGENERATED FILE - DO NOT MODIFY! +// This file was generated by Djinni from shader.djinni + +@file:Suppress("RedundantCast", "RedundantCallOfConversionMethod", "USELESS_CAST") + +package io.openmobilemaps.mapscore.kmp + +import kotlin.experimental.ExperimentalObjCName +import kotlin.native.ObjCName + +@OptIn(ExperimentalObjCName::class) +@ObjCName("KMTessellationMode", exact = true) +actual enum class KMTessellationMode(val rawValue: Long) { + NONE(0L), + QUAD(1L), + TRIANGLE(2L), + ; + + companion object { + internal fun fromPlatform(value: MapCoreSharedModule.MCTessellationMode): KMTessellationMode { + val raw: Long = value + return when (raw) { + 0L -> KMTessellationMode.NONE + 1L -> KMTessellationMode.QUAD + 2L -> KMTessellationMode.TRIANGLE + else -> throw IllegalArgumentException("Unknown KMTessellationMode value: " + raw) + } + } + } +} + +internal fun KMTessellationMode.asPlatform(): MapCoreSharedModule.MCTessellationMode = rawValue diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt index 8f0271793..2f317db1f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt @@ -14,7 +14,8 @@ actual enum class KMTouchAction(val rawValue: Long) { DOWN(0L), MOVE(1L), UP(2L), - CANCEL(3L), + SCROLL(3L), + CANCEL(4L), ; companion object { @@ -24,7 +25,8 @@ actual enum class KMTouchAction(val rawValue: Long) { 0L -> KMTouchAction.DOWN 1L -> KMTouchAction.MOVE 2L -> KMTouchAction.UP - 3L -> KMTouchAction.CANCEL + 3L -> KMTouchAction.SCROLL + 4L -> KMTouchAction.CANCEL else -> throw IllegalArgumentException("Unknown KMTouchAction value: " + raw) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt index 4df5f119e..bfb1ddb47 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -12,17 +12,21 @@ import kotlin.native.ObjCName @ObjCName("KMTouchEvent", exact = true) actual class KMTouchEvent actual public constructor( pointers: ArrayList, + scrollDelta: Float, touchAction: KMTouchAction, ) { actual val pointers: ArrayList = pointers + actual val scrollDelta: Float = scrollDelta actual val touchAction: KMTouchAction = touchAction } internal fun KMTouchEvent.asPlatform(): MapCoreSharedModule.MCTouchEvent = MapCoreSharedModule.MCTouchEvent( pointers = ArrayList(pointers.map { it.asPlatform() }), + scrollDelta = scrollDelta, touchAction = touchAction.asPlatform(), ) internal fun MapCoreSharedModule.MCTouchEvent.asKmp(): KMTouchEvent = KMTouchEvent( pointers = ArrayList(((this.pointers as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2F).asKmp() } ?: (0 until (this.pointers as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.pointers as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2F).asKmp() })), + scrollDelta = this.scrollDelta, touchAction = KMTouchAction.fromPlatform((this.touchAction as MapCoreSharedModule.MCTouchAction)), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt index 582e7c9d1..88aefd935 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -36,6 +36,8 @@ actual interface KMTouchInterface actual fun onTwoFingerMoveComplete(): Boolean + actual fun onScroll(posScreen: KMVec2F, scrollDelta: Float): Boolean + actual fun clearTouch() } @@ -97,6 +99,11 @@ private class KMTouchInterfacePlatformWrapper(internal val nativeHandle: MapCore return result } + override fun onScroll(posScreen: KMVec2F, scrollDelta: Float): Boolean { + val result = nativeHandle.onScroll(posScreen.asPlatform(), scrollDelta) + return result + } + override fun clearTouch() { nativeHandle.clearTouch() } @@ -160,6 +167,11 @@ private class KMTouchInterfacePlatformProxy(private val delegate: KMTouchInterfa return result } + override fun onScroll(posScreen: MapCoreSharedModule.MCVec2F, scrollDelta: Float): Boolean { + val result = delegate.onScroll((posScreen as MapCoreSharedModule.MCVec2F).asKmp(), scrollDelta) + return result + } + override fun clearTouch() { delegate.clearTouch() } diff --git a/djinni/run_djinni.sh b/djinni/run_djinni.sh index 19123228a..c26743775 100755 --- a/djinni/run_djinni.sh +++ b/djinni/run_djinni.sh @@ -107,8 +107,6 @@ for file in $(git ls-files "*.djinni"); do --ident-cpp-file "$IDENT_CPP" \ --ident-cpp-enum "$IDENT_CPP_ENUM" \ --ident-cpp-type-param "$IDENT_CPP_METHOD" \ - --kotlin-kmp-objc-name-prefix "$KMP_BRIDGE_PREFIX" \ - \ --ident-cpp-method "$IDENT_CPP_METHOD" \ --ident-cpp-local "$IDENT_CPP_METHOD" \ --ident-cpp-field "$IDENT_CPP_FIELD" \ From cbbd08ce147d48e9a2ba6c9b67cd758bfb33f269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Fri, 6 Feb 2026 11:00:11 +0100 Subject: [PATCH 58/63] fix android issues --- .../mapscore/kmp/KMFontLoaderResult.kt | 22 +++++++++++++--- .../mapscore/kmp/KMRenderPassConfig.kt | 22 +++++++++++++--- .../mapscore/kmp/KMTextureAtlas.kt | 18 ++++++++++--- .../mapscore/kmp/KMTextureLoaderResult.kt | 26 ++++++++++++++++--- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 18 ++++++++++--- external/djinni | 2 +- .../openmobilemaps/mapscore/kmp/KMFuture.kt | 19 +++++++++++--- 7 files changed, 108 insertions(+), 19 deletions(-) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index 55479e7bc..c42042358 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -3,7 +3,23 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMFontLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult +actual class KMFontLoaderResult actual public constructor( + imageData: KMTextureHolderInterface?, + fontData: KMFontData?, + status: KMLoaderStatus, +) { + actual val imageData: KMTextureHolderInterface? = imageData + actual val fontData: KMFontData? = fontData + actual val status: KMLoaderStatus = status +} -internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = this +internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult( + imageData = imageData?.let { it.asPlatform() }, + fontData = fontData?.let { it.asPlatform() }, + status = status.asPlatform(), +) +internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( + imageData = this.imageData?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, + fontData = this.fontData?.let { (it as io.openmobilemaps.mapscore.shared.map.loader.FontData).asKmp() }, + status = (this.status as io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus).asKmp(), +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index 2f5318e64..b0074fba4 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -3,7 +3,23 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMRenderPassConfig = io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig +actual class KMRenderPassConfig actual public constructor( + renderPassIndex: Int, + isPassMasked: Boolean, + renderTarget: KMRenderTargetInterface?, +) { + actual val renderPassIndex: Int = renderPassIndex + actual val isPassMasked: Boolean = isPassMasked + actual val renderTarget: KMRenderTargetInterface? = renderTarget +} -internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig = this -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = this +internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig = io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig( + renderPassIndex = renderPassIndex, + isPassMasked = isPassMasked, + renderTarget = renderTarget?.let { it.asPlatform() }, +) +internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( + renderPassIndex = this.renderPassIndex, + isPassMasked = this.isPassMasked, + renderTarget = this.renderTarget?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() }, +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index b02b255b6..45adccad0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -3,7 +3,19 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMTextureAtlas = io.openmobilemaps.mapscore.shared.graphics.TextureAtlas +actual class KMTextureAtlas actual public constructor( + uvMap: HashMap, + texture: KMTextureHolderInterface?, +) { + actual val uvMap: HashMap = uvMap + actual val texture: KMTextureHolderInterface? = texture +} -internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.TextureAtlas = this -internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = this +internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.TextureAtlas = io.openmobilemaps.mapscore.shared.graphics.TextureAtlas( + uvMap = HashMap(uvMap.map { it.key to it.value.asPlatform() }.toMap()), + texture = texture?.let { it.asPlatform() }, +) +internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( + uvMap = HashMap(this.uvMap.map { it.key to (it.value as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }.toMap()), + texture = this.texture?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index 3d2ca145f..bb306ee1d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -3,7 +3,27 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMTextureLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult +actual class KMTextureLoaderResult actual public constructor( + data: KMTextureHolderInterface?, + etag: String?, + status: KMLoaderStatus, + errorCode: String?, +) { + actual val data: KMTextureHolderInterface? = data + actual val etag: String? = etag + actual val status: KMLoaderStatus = status + actual val errorCode: String? = errorCode +} -internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = this +internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult( + data = data?.let { it.asPlatform() }, + etag = etag?.let { it }, + status = status.asPlatform(), + errorCode = errorCode?.let { it }, +) +internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( + data = this.data?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, + etag = this.etag?.let { it }, + status = (this.status as io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus).asKmp(), + errorCode = this.errorCode?.let { it }, +) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index 51837cf22..c1f5d950e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -3,7 +3,19 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMTiled2dMapVectorAssetInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo +actual class KMTiled2dMapVectorAssetInfo actual public constructor( + featureIdentifiersUv: HashMap, + texture: KMTextureHolderInterface?, +) { + actual val featureIdentifiersUv: HashMap = featureIdentifiersUv + actual val texture: KMTextureHolderInterface? = texture +} -internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = this +internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo( + featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asPlatform() }.toMap()), + texture = texture?.let { it.asPlatform() }, +) +internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( + featureIdentifiersUv = HashMap(this.featureIdentifiersUv.map { it.key to (it.value as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }.toMap()), + texture = this.texture?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, +) diff --git a/external/djinni b/external/djinni index c2226bc15..f5abee5d4 160000 --- a/external/djinni +++ b/external/djinni @@ -1 +1 @@ -Subproject commit c2226bc152764cea6e29b8d9f81bb61def8488d3 +Subproject commit f5abee5d4f487a1147e87fadd1e9a84c919abf55 diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index e06c79fb4..270e3bc44 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -1,6 +1,19 @@ package io.openmobilemaps.mapscore.kmp -actual typealias KMFuture = com.snapchat.djinni.Future +actual class KMFuture { + internal val native: com.snapchat.djinni.Future<*>? -internal fun KMFuture.asPlatform(): com.snapchat.djinni.Future = this -internal fun com.snapchat.djinni.Future.asKmp(): KMFuture = this + constructor() { + native = null + } + + internal constructor(native: com.snapchat.djinni.Future<*>) { + this.native = native + } +} + +@Suppress("UNCHECKED_CAST") +internal fun KMFuture.asPlatform(): com.snapchat.djinni.Future = + requireNotNull(native) as com.snapchat.djinni.Future + +fun com.snapchat.djinni.Future<*>.asKmp(): KMFuture = KMFuture(this) From b5cdb24792fb5a73ae1c7914e4b3ace3e696c1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Ma=CC=88rki?= Date: Fri, 6 Feb 2026 11:56:34 +0100 Subject: [PATCH 59/63] dont build ios for android --- build.gradle.kts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index fbc7f058d..ed8794cde 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -70,6 +70,18 @@ val isIosOnlyInvocation = looksLikeIosTask && !looksLikeAndroidTask } ) +val isAndroidOrIdeInvocation = + requestedTasksLower.any { task -> + task.contains("android") || + task.contains("assemble") || + task.contains("bundle") || + task.contains("lint") || + task.contains("install") || + task.contains("connected") || + task.contains("preparekotlinbuildscriptmodel") || + task.contains("kotlinbuildscriptmodel") + } +val skipIosTasksForCurrentInvocation = !isIosOnlyInvocation && isAndroidOrIdeInvocation plugins { id("org.jetbrains.kotlin.multiplatform") version "2.3.0" @@ -378,6 +390,19 @@ tasks "spmForKmp tasks access task/project state during execution", ) } +if (skipIosTasksForCurrentInvocation) { + tasks.configureEach { + val taskName = name.lowercase() + val isIosSpecificTask = + taskName.contains("ios") || + taskName.startsWith("swiftpackageconfigapplemapcorekmp") || + taskName.contains("mapcoremetallib") || + taskName.startsWith("syncmapcorepackageresolvedios") + if (isIosSpecificTask) { + enabled = false + } + } +} // Avoid overlapping Package.resolved outputs between per-target SwiftPM compile tasks. val syncPackageResolvedIosArm64 = tasks.register("syncMapCorePackageResolvedIosArm64") { @@ -397,6 +422,12 @@ val syncPackageResolvedIosSimulatorArm64 = ), ) } +listOf(syncPackageResolvedIosArm64, syncPackageResolvedIosSimulatorArm64).forEach { syncTask -> + syncTask.configure { + mustRunAfter("SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64") + mustRunAfter("SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosSimulatorArm64") + } +} tasks.matching { it.name == "SwiftPackageConfigAppleMapCoreKmpCompileSwiftPackageIosArm64" } .configureEach { From d6e54183088267334687c9aeb45b7ffbc1043986 Mon Sep 17 00:00:00 2001 From: Christoph Maurhofer Date: Mon, 9 Feb 2026 10:18:16 +0100 Subject: [PATCH 60/63] Update djinni to remove requireNotNull in KMP non-nullable cast --- .../kmp/KMAlphaInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMAlphaShaderInterface.kt | 2 +- .../mapscore/kmp/KMBoundingBoxInterface.kt | 2 +- .../kmp/KMColorCircleShaderInterface.kt | 2 +- .../mapscore/kmp/KMColorShaderInterface.kt | 2 +- .../mapscore/kmp/KMComputeObjectInterface.kt | 2 +- .../mapscore/kmp/KMComputePassInterface.kt | 2 +- .../KMCoordinateConversionHelperInterface.kt | 2 +- .../kmp/KMCpuPerformanceLoggerInterface.kt | 6 +-- .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 8 +-- .../kmp/KMDefaultTouchHandlerInterface.kt | 2 +- ...KMElevationInterpolationShaderInterface.kt | 2 +- .../mapscore/kmp/KMErrorManager.kt | 2 +- .../mapscore/kmp/KMFontLoaderResult.kt | 2 +- .../kmp/KMGeoJsonFeatureParserInterface.kt | 2 +- .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 2 +- .../kmp/KMGraphicsObjectFactoryInterface.kt | 54 +++++++++---------- .../mapscore/kmp/KMGraphicsObjectInterface.kt | 4 +- .../mapscore/kmp/KMIconFactory.kt | 4 +- .../mapscore/kmp/KMIconInfoInterface.kt | 2 +- .../kmp/KMIconLayerCallbackInterface.kt | 4 +- .../mapscore/kmp/KMIconLayerInterface.kt | 6 +-- .../mapscore/kmp/KMIcosahedronInterface.kt | 2 +- .../kmp/KMIcosahedronLayerInterface.kt | 4 +- .../mapscore/kmp/KMIndexedLayerInterface.kt | 2 +- .../mapscore/kmp/KMLayerInterface.kt | 12 ++--- .../mapscore/kmp/KMLayerObjectInterface.kt | 2 +- .../mapscore/kmp/KMLineFactory.kt | 2 +- .../mapscore/kmp/KMLineGroup2dInterface.kt | 2 +- .../kmp/KMLineGroupShaderInterface.kt | 2 +- .../kmp/KMLineLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMLineLayerInterface.kt | 6 +-- .../mapscore/kmp/KMMapCameraInterface.kt | 6 +-- .../mapscore/kmp/KMMapInterface.kt | 24 ++++----- .../mapscore/kmp/KMMaskingObjectInterface.kt | 4 +- .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 6 +-- .../kmp/KMOpenGlRenderTargetInterface.kt | 4 +- .../kmp/KMOpenGlRenderingContextInterface.kt | 4 +- .../mapscore/kmp/KMPolygon2dInterface.kt | 4 +- .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 2 +- .../kmp/KMPolygonGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMPolygonLayerInterface.kt | 4 +- .../kmp/KMPolygonMaskObjectInterface.kt | 4 +- .../kmp/KMPolygonPatternGroup2dInterface.kt | 4 +- .../KMPolygonPatternGroupShaderInterface.kt | 2 +- .../kmp/KMQuad2dInstancedInterface.kt | 6 +-- .../mapscore/kmp/KMQuad2dInterface.kt | 6 +-- .../KMQuad2dStretchedInstancedInterface.kt | 6 +-- .../mapscore/kmp/KMRasterShaderInterface.kt | 2 +- .../mapscore/kmp/KMRenderConfigInterface.kt | 2 +- .../mapscore/kmp/KMRenderObjectInterface.kt | 2 +- .../mapscore/kmp/KMRenderPassConfig.kt | 2 +- .../mapscore/kmp/KMRenderPassInterface.kt | 6 +-- .../mapscore/kmp/KMRenderTargetInterface.kt | 2 +- .../mapscore/kmp/KMRendererInterface.kt | 8 +-- .../kmp/KMRenderingContextInterface.kt | 2 +- .../kmp/KMReverseGeocoderInterface.kt | 2 +- .../mapscore/kmp/KMSceneInterface.kt | 14 ++--- .../mapscore/kmp/KMSchedulerInterface.kt | 6 +-- .../mapscore/kmp/KMShaderFactoryInterface.kt | 54 +++++++++---------- .../mapscore/kmp/KMSkySphereLayerInterface.kt | 4 +- .../kmp/KMSkySphereShaderInterface.kt | 2 +- .../kmp/KMSphereEffectLayerInterface.kt | 4 +- .../kmp/KMSphereEffectShaderInterface.kt | 2 +- .../kmp/KMStretchInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMStretchShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextFactory.kt | 2 +- .../mapscore/kmp/KMTextInstancedInterface.kt | 4 +- .../kmp/KMTextInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextInterface.kt | 4 +- .../mapscore/kmp/KMTextLayerInterface.kt | 4 +- .../mapscore/kmp/KMTextShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextureAtlas.kt | 2 +- .../mapscore/kmp/KMTextureLoaderResult.kt | 2 +- .../mapscore/kmp/KMThreadPoolScheduler.kt | 2 +- .../kmp/KMTiled2dMapRasterLayerInterface.kt | 12 ++--- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 2 +- .../kmp/KMTiled2dMapVectorLayerInterface.kt | 6 +-- .../mapscore/kmp/KMTouchHandlerInterface.kt | 6 +-- .../kmp/KMWmtsCapabilitiesResource.kt | 18 +++---- .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 2 +- .../kmp/KMAlphaInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMAlphaShaderInterface.kt | 2 +- .../mapscore/kmp/KMBoundingBoxInterface.kt | 2 +- .../kmp/KMColorCircleShaderInterface.kt | 2 +- .../mapscore/kmp/KMColorShaderInterface.kt | 2 +- .../mapscore/kmp/KMComputeObjectInterface.kt | 2 +- .../mapscore/kmp/KMComputePassInterface.kt | 2 +- .../KMCoordinateConversionHelperInterface.kt | 2 +- .../kmp/KMCpuPerformanceLoggerInterface.kt | 6 +-- .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 8 +-- .../kmp/KMDefaultTouchHandlerInterface.kt | 2 +- ...KMElevationInterpolationShaderInterface.kt | 2 +- .../mapscore/kmp/KMErrorManager.kt | 2 +- .../mapscore/kmp/KMFontLoaderResult.kt | 2 +- .../kmp/KMGeoJsonFeatureParserInterface.kt | 2 +- .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 2 +- .../kmp/KMGraphicsObjectFactoryInterface.kt | 54 +++++++++---------- .../mapscore/kmp/KMGraphicsObjectInterface.kt | 4 +- .../mapscore/kmp/KMIconFactory.kt | 4 +- .../mapscore/kmp/KMIconInfoInterface.kt | 2 +- .../kmp/KMIconLayerCallbackInterface.kt | 4 +- .../mapscore/kmp/KMIconLayerInterface.kt | 6 +-- .../mapscore/kmp/KMIcosahedronInterface.kt | 2 +- .../kmp/KMIcosahedronLayerInterface.kt | 4 +- .../mapscore/kmp/KMIndexedLayerInterface.kt | 2 +- .../mapscore/kmp/KMLayerInterface.kt | 12 ++--- .../mapscore/kmp/KMLayerObjectInterface.kt | 2 +- .../mapscore/kmp/KMLineFactory.kt | 2 +- .../mapscore/kmp/KMLineGroup2dInterface.kt | 2 +- .../kmp/KMLineGroupShaderInterface.kt | 2 +- .../kmp/KMLineLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMLineLayerInterface.kt | 6 +-- .../mapscore/kmp/KMMapCameraInterface.kt | 6 +-- .../mapscore/kmp/KMMapInterface.kt | 24 ++++----- .../mapscore/kmp/KMMaskingObjectInterface.kt | 4 +- .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 6 +-- .../kmp/KMOpenGlRenderTargetInterface.kt | 4 +- .../kmp/KMOpenGlRenderingContextInterface.kt | 4 +- .../mapscore/kmp/KMPolygon2dInterface.kt | 4 +- .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 2 +- .../kmp/KMPolygonGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMPolygonLayerInterface.kt | 4 +- .../kmp/KMPolygonMaskObjectInterface.kt | 4 +- .../kmp/KMPolygonPatternGroup2dInterface.kt | 4 +- .../KMPolygonPatternGroupShaderInterface.kt | 2 +- .../kmp/KMQuad2dInstancedInterface.kt | 6 +-- .../mapscore/kmp/KMQuad2dInterface.kt | 6 +-- .../KMQuad2dStretchedInstancedInterface.kt | 6 +-- .../mapscore/kmp/KMRasterShaderInterface.kt | 2 +- .../mapscore/kmp/KMRenderConfigInterface.kt | 2 +- .../mapscore/kmp/KMRenderObjectInterface.kt | 2 +- .../mapscore/kmp/KMRenderPassConfig.kt | 2 +- .../mapscore/kmp/KMRenderPassInterface.kt | 6 +-- .../mapscore/kmp/KMRenderTargetInterface.kt | 2 +- .../mapscore/kmp/KMRendererInterface.kt | 8 +-- .../kmp/KMRenderingContextInterface.kt | 2 +- .../kmp/KMReverseGeocoderInterface.kt | 2 +- .../mapscore/kmp/KMSceneInterface.kt | 14 ++--- .../mapscore/kmp/KMSchedulerInterface.kt | 6 +-- .../mapscore/kmp/KMShaderFactoryInterface.kt | 54 +++++++++---------- .../mapscore/kmp/KMSkySphereLayerInterface.kt | 4 +- .../kmp/KMSkySphereShaderInterface.kt | 2 +- .../kmp/KMSphereEffectLayerInterface.kt | 4 +- .../kmp/KMSphereEffectShaderInterface.kt | 2 +- .../kmp/KMStretchInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMStretchShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextFactory.kt | 2 +- .../mapscore/kmp/KMTextInstancedInterface.kt | 4 +- .../kmp/KMTextInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextInterface.kt | 4 +- .../mapscore/kmp/KMTextLayerInterface.kt | 4 +- .../mapscore/kmp/KMTextShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextureAtlas.kt | 2 +- .../mapscore/kmp/KMTextureLoaderResult.kt | 2 +- .../mapscore/kmp/KMThreadPoolScheduler.kt | 2 +- .../kmp/KMTiled2dMapRasterLayerInterface.kt | 12 ++--- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 2 +- .../kmp/KMTiled2dMapVectorLayerInterface.kt | 6 +-- .../mapscore/kmp/KMTouchHandlerInterface.kt | 6 +-- .../kmp/KMWmtsCapabilitiesResource.kt | 18 +++---- .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 2 +- external/djinni | 2 +- 163 files changed, 429 insertions(+), 429 deletions(-) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt index 29043e09c..71f9d3f2f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -13,7 +13,7 @@ actual class KMAlphaInstancedShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt index e5abcbd75..a93e199ef 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -17,7 +17,7 @@ actual class KMAlphaShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt index 3544ede9f..cbb39da8f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -45,7 +45,7 @@ actual class KMBoundingBoxInterface actual public constructor( actual fun create(systemIdentifier: Int): KMBoundingBoxInterface { val result = BoundingBoxInterface.create(systemIdentifier) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.BoundingBoxInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt index 90b1a8983..5588c1ef7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -17,7 +17,7 @@ actual class KMColorCircleShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt index 13235541c..a896ac08f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -17,7 +17,7 @@ actual class KMColorShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt index 11b2eb40c..560eae4d1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -23,7 +23,7 @@ private class KMComputeObjectInterfacePlatformProxy(private val delegate: KMComp { override fun compute(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, vpMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, screenPixelAsRealMeterFactor: Double) { - delegate.compute(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), vpMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), screenPixelAsRealMeterFactor) + delegate.compute((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), vpMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), screenPixelAsRealMeterFactor) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt index 4c08f8d10..843dd8405 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -16,7 +16,7 @@ private class KMComputePassInterfacePlatformWrapper(internal val nativeHandle: C override fun getComputeObjects(): ArrayList { val result = nativeHandle.getComputeObjects() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.graphics.objects.ComputeObjectInterface).asKmp() }) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt index 85e1883c4..1b3c3f7fe 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -50,7 +50,7 @@ actual class KMCoordinateConversionHelperInterface actual public constructor( actual fun independentInstance(): KMCoordinateConversionHelperInterface { val result = CoordinateConversionHelperInterface.independentInstance() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt index 6f4aa8f91..9a69cbde4 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -13,7 +13,7 @@ actual class KMCpuPerformanceLoggerInterface actual public constructor( actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { val result = native.asPerformanceLoggerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface).asKmp() } actual companion object @@ -21,12 +21,12 @@ actual class KMCpuPerformanceLoggerInterface actual public constructor( actual fun create(): KMCpuPerformanceLoggerInterface { val result = CpuPerformanceLoggerInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface).asKmp() } actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMCpuPerformanceLoggerInterface { val result = CpuPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.CpuPerformanceLoggerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt index 355728882..05604d6ca 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -16,22 +16,22 @@ actual class KMDefaultTiled2dMapLayerConfigs actual public constructor( actual fun webMercator(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { val result = DefaultTiled2dMapLayerConfigs.webMercator(layerName, urlFormat) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } actual fun webMercatorCustom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo?, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { val result = DefaultTiled2dMapLayerConfigs.webMercatorCustom(layerName, urlFormat, zoomInfo?.let { it.asPlatform() }, minZoomLevel, maxZoomLevel) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } actual fun epsg4326(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { val result = DefaultTiled2dMapLayerConfigs.epsg4326(layerName, urlFormat) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } actual fun epsg4326Custom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { val result = DefaultTiled2dMapLayerConfigs.epsg4326Custom(layerName, urlFormat, zoomInfo.asPlatform(), minZoomLevel, maxZoomLevel) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt index ad7a26b03..278d83813 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -16,7 +16,7 @@ actual class KMDefaultTouchHandlerInterface actual public constructor( actual fun create(scheduler: KMSchedulerInterface, density: Float): KMTouchHandlerInterface { val result = DefaultTouchHandlerInterface.create(scheduler.asPlatform(), density) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt index fa504d147..fb6f1e7c1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -13,7 +13,7 @@ actual class KMElevationInterpolationShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt index 14fbe21bf..87eed15fc 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -40,7 +40,7 @@ actual class KMErrorManager actual public constructor( actual fun create(): KMErrorManager { val result = ErrorManager.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.ErrorManager)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.ErrorManager).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index c42042358..13013ec01 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -19,7 +19,7 @@ internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared. status = status.asPlatform(), ) internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( - imageData = this.imageData?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, + imageData = this.imageData?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, fontData = this.fontData?.let { (it as io.openmobilemaps.mapscore.shared.map.loader.FontData).asKmp() }, status = (this.status as io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus).asKmp(), ) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt index e10d28dd7..1900b7509 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -31,7 +31,7 @@ actual class KMGeoJsonFeatureParserInterface actual public constructor( actual fun create(): KMGeoJsonFeatureParserInterface { val result = GeoJsonFeatureParserInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonFeatureParserInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt index 4a91baf39..5c82b9266 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -26,7 +26,7 @@ actual class KMGeoJsonHelperInterface actual public constructor( actual fun independentInstance(): KMGeoJsonHelperInterface { val result = GeoJsonHelperInterface.independentInstance() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonHelperInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index 404557487..ef2e6d002 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -44,77 +44,77 @@ private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativ override fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface { val result = nativeHandle.createQuad(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface).asKmp() } override fun createQuadTessellated(shader: KMShaderProgramInterface): KMQuad2dInterface { val result = nativeHandle.createQuadTessellated(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface).asKmp() } override fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface { val result = nativeHandle.createPolygon(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface).asKmp() } override fun createPolygonTessellated(shader: KMShaderProgramInterface): KMPolygon2dInterface { val result = nativeHandle.createPolygonTessellated(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface).asKmp() } override fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface { val result = nativeHandle.createIcosahedronObject(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface).asKmp() } override fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface { val result = nativeHandle.createQuadInstanced(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface).asKmp() } override fun createQuadStretchedInstanced(shader: KMShaderProgramInterface): KMQuad2dStretchedInstancedInterface { val result = nativeHandle.createQuadStretchedInstanced(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface).asKmp() } override fun createLineGroup(shader: KMShaderProgramInterface): KMLineGroup2dInterface { val result = nativeHandle.createLineGroup(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface).asKmp() } override fun createPolygonGroup(shader: KMShaderProgramInterface): KMPolygonGroup2dInterface { val result = nativeHandle.createPolygonGroup(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface).asKmp() } override fun createPolygonPatternGroup(shader: KMShaderProgramInterface): KMPolygonPatternGroup2dInterface { val result = nativeHandle.createPolygonPatternGroup(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface).asKmp() } override fun createQuadMask(is3d: Boolean): KMQuad2dInterface { val result = nativeHandle.createQuadMask(is3d) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface).asKmp() } override fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface { val result = nativeHandle.createPolygonMask(is3d) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface).asKmp() } override fun createPolygonMaskTessellated(is3d: Boolean): KMPolygon2dInterface { val result = nativeHandle.createPolygonMaskTessellated(is3d) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface).asKmp() } override fun createText(shader: KMShaderProgramInterface): KMTextInterface { val result = nativeHandle.createText(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface).asKmp() } override fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface { val result = nativeHandle.createTextInstanced(shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface).asKmp() } } @@ -122,52 +122,52 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate { override fun createQuad(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface { - val result = delegate.createQuad(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createQuad((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createQuadTessellated(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInterface { - val result = delegate.createQuadTessellated(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createQuadTessellated((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createPolygon(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface { - val result = delegate.createPolygon(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createPolygon((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createPolygonTessellated(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface { - val result = delegate.createPolygonTessellated(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createPolygonTessellated((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createIcosahedronObject(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.IcosahedronInterface { - val result = delegate.createIcosahedronObject(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createIcosahedronObject((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createQuadInstanced(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dInstancedInterface { - val result = delegate.createQuadInstanced(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createQuadInstanced((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createQuadStretchedInstanced(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.Quad2dStretchedInstancedInterface { - val result = delegate.createQuadStretchedInstanced(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createQuadStretchedInstanced((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createLineGroup(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.LineGroup2dInterface { - val result = delegate.createLineGroup(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createLineGroup((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createPolygonGroup(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonGroup2dInterface { - val result = delegate.createPolygonGroup(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createPolygonGroup((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createPolygonPatternGroup(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.PolygonPatternGroup2dInterface { - val result = delegate.createPolygonPatternGroup(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createPolygonPatternGroup((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } @@ -187,12 +187,12 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate } override fun createText(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.TextInterface { - val result = delegate.createText(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createText((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } override fun createTextInstanced(shader: io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface): io.openmobilemaps.mapscore.shared.graphics.objects.TextInstancedInterface { - val result = delegate.createTextInstanced(requireNotNull((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp()) + val result = delegate.createTextInstanced((shader as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp()) return result.asPlatform() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt index 5a83c9ddc..10d4d73a8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -59,7 +59,7 @@ private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGra } override fun setup(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface) { - delegate.setup(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp()) + delegate.setup((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp()) } override fun clear() { @@ -75,7 +75,7 @@ private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGra } override fun render(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, renderPass: io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { - delegate.render(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), (renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) + delegate.render((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt index 42a1f0963..569dcf4f4 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -16,12 +16,12 @@ actual class KMIconFactory actual public constructor( actual fun createIcon(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode): KMIconInfoInterface { val result = IconFactory.createIcon(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface).asKmp() } actual fun createIconWithAnchor(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode, iconAnchor: KMVec2F): KMIconInfoInterface { val result = IconFactory.createIconWithAnchor(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform(), iconAnchor.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt index 3e18d1954..b14a8a149 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -18,7 +18,7 @@ actual class KMIconInfoInterface actual public constructor( actual fun getTexture(): KMTextureHolderInterface { val result = native.getTexture() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() } actual fun setCoordinate(coord: KMCoord) { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt index 366fbfd3d..e7ed744cb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -31,12 +31,12 @@ private class KMIconLayerCallbackInterfacePlatformProxy(private val delegate: KM { override fun onClickConfirmed(icons: ArrayList): Boolean { - val result = delegate.onClickConfirmed(ArrayList(icons.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() })) + val result = delegate.onClickConfirmed(ArrayList(icons.map { (it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface).asKmp() })) return result } override fun onLongPress(icons: ArrayList): Boolean { - val result = delegate.onLongPress(ArrayList(icons.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() })) + val result = delegate.onLongPress(ArrayList(icons.map { (it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface).asKmp() })) return result } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt index 4c21edbb2..c7ce6cee4 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -17,7 +17,7 @@ actual class KMIconLayerInterface actual public constructor( actual fun getIcons(): ArrayList { val result = native.getIcons() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.icon.IconInfoInterface).asKmp() }) } actual fun remove(icon: KMIconInfoInterface) { @@ -54,7 +54,7 @@ actual class KMIconLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual fun invalidate() { @@ -78,7 +78,7 @@ actual class KMIconLayerInterface actual public constructor( actual fun create(): KMIconLayerInterface { val result = IconLayerInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.icon.IconLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt index a94bf0682..0b5bbbe64 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -22,7 +22,7 @@ private class KMIcosahedronInterfacePlatformWrapper(internal val nativeHandle: I override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt index 8f88d2c60..2266790ed 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -13,7 +13,7 @@ actual class KMIcosahedronLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual companion object @@ -21,7 +21,7 @@ actual class KMIcosahedronLayerInterface actual public constructor( actual fun create(callbackHandler: KMIcosahedronLayerCallbackInterface): KMIcosahedronLayerInterface { val result = IcosahedronLayerInterface.create(callbackHandler.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.icosahedron.IcosahedronLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt index 9dae16772..82844bbbc 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -18,7 +18,7 @@ private class KMIndexedLayerInterfacePlatformWrapper(internal val nativeHandle: override fun getLayerInterface(): KMLayerInterface { val result = nativeHandle.getLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } override fun getIndex(): Int { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt index 9dc5cd966..d13af40f2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -58,12 +58,12 @@ private class KMLayerInterfacePlatformWrapper(internal val nativeHandle: LayerIn override fun buildRenderPasses(): ArrayList { val result = nativeHandle.buildRenderPasses() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface).asKmp() }) } override fun buildComputePasses(): ArrayList { val result = nativeHandle.buildComputePasses() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface).asKmp() }) } override fun onAdded(mapInterface: KMMapInterface, layerIndex: Int) { @@ -129,7 +129,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa { override fun setMaskingObject(maskingObject: io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface?) { - delegate.setMaskingObject(maskingObject?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() }) + delegate.setMaskingObject(maskingObject?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface).asKmp() }) } override fun update() { @@ -147,7 +147,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa } override fun onAdded(mapInterface: io.openmobilemaps.mapscore.shared.map.MapInterface, layerIndex: Int) { - delegate.onAdded(requireNotNull((mapInterface as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp(), layerIndex) + delegate.onAdded((mapInterface as io.openmobilemaps.mapscore.shared.map.MapInterface).asKmp(), layerIndex) } override fun onRemoved() { @@ -193,7 +193,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa } override fun setErrorManager(errorManager: io.openmobilemaps.mapscore.shared.map.ErrorManager) { - delegate.setErrorManager(requireNotNull((errorManager as io.openmobilemaps.mapscore.shared.map.ErrorManager)).asKmp()) + delegate.setErrorManager((errorManager as io.openmobilemaps.mapscore.shared.map.ErrorManager).asKmp()) } override fun forceReload() { @@ -201,7 +201,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa } override fun setPrimaryRenderTarget(target: io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface?) { - delegate.setPrimaryRenderTarget(target?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() }) + delegate.setPrimaryRenderTarget(target?.let { (it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface).asKmp() }) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt index 7c8f5d812..c20caa639 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -17,7 +17,7 @@ actual class KMLayerObjectInterface actual public constructor( actual fun getRenderConfig(): ArrayList { val result = native.getRenderConfig() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.objects.RenderConfigInterface).asKmp() }) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt index a1ccc1f01..bd0b2fc0b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -16,7 +16,7 @@ actual class KMLineFactory actual public constructor( actual fun createLine(identifier: String, coordinates: ArrayList, style: KMLineStyle): KMLineInfoInterface { val result = LineFactory.createLine(identifier, ArrayList(coordinates.map { it.asPlatform() }), style.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt index 58bcbe5a3..1cad2b3df 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -22,7 +22,7 @@ private class KMLineGroup2dInterfacePlatformWrapper(internal val nativeHandle: L override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt index e6b854b25..7a8ec596f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -21,7 +21,7 @@ actual class KMLineGroupShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt index 99db95c0c..5fa5ce136 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -23,7 +23,7 @@ private class KMLineLayerCallbackInterfacePlatformProxy(private val delegate: KM { override fun onLineClickConfirmed(line: io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface) { - delegate.onLineClickConfirmed(requireNotNull((line as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface)).asKmp()) + delegate.onLineClickConfirmed((line as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface).asKmp()) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt index 600b826f0..5780e3d52 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -17,7 +17,7 @@ actual class KMLineLayerInterface actual public constructor( actual fun getLines(): ArrayList { val result = native.getLines() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.layers.line.LineInfoInterface).asKmp() }) } actual fun remove(line: KMLineInfoInterface) { @@ -38,7 +38,7 @@ actual class KMLineLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual fun invalidate() { @@ -66,7 +66,7 @@ actual class KMLineLayerInterface actual public constructor( actual fun create(): KMLineLayerInterface { val result = LineLayerInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.line.LineLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt index 45343395b..12d571003 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -183,7 +183,7 @@ actual class KMMapCameraInterface actual public constructor( actual fun asCameraInterface(): KMCameraInterface { val result = native.asCameraInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.CameraInterface).asKmp() } actual fun getLastVpMatrixD(): ArrayList? { @@ -223,7 +223,7 @@ actual class KMMapCameraInterface actual public constructor( actual fun asMapCamera3d(): KMMapCamera3dInterface? { val result = native.asMapCamera3d() - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.MapCamera3dInterface).asKmp() } } actual companion object @@ -231,7 +231,7 @@ actual class KMMapCameraInterface actual public constructor( actual fun create(mapInterface: KMMapInterface, screenDensityPpi: Float, is3D: Boolean): KMMapCameraInterface { val result = MapCameraInterface.create(mapInterface.asPlatform(), screenDensityPpi, is3D) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapCameraInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.MapCameraInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt index 10a6d3d3f..37de8bdec 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -17,22 +17,22 @@ actual class KMMapInterface actual public constructor( actual fun getGraphicsObjectFactory(): KMGraphicsObjectFactoryInterface { val result = native.getGraphicsObjectFactory() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface).asKmp() } actual fun getShaderFactory(): KMShaderFactoryInterface { val result = native.getShaderFactory() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface).asKmp() } actual fun getScheduler(): KMSchedulerInterface { val result = native.getScheduler() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface).asKmp() } actual fun getRenderingContext(): KMRenderingContextInterface { val result = native.getRenderingContext() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp() } actual fun getMapConfig(): KMMapConfig { @@ -42,7 +42,7 @@ actual class KMMapInterface actual public constructor( actual fun getCoordinateConverterHelper(): KMCoordinateConversionHelperInterface { val result = native.getCoordinateConverterHelper() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.coordinates.CoordinateConversionHelperInterface).asKmp() } actual fun setCamera(camera: KMMapCameraInterface) { @@ -51,7 +51,7 @@ actual class KMMapInterface actual public constructor( actual fun getCamera(): KMMapCameraInterface { val result = native.getCamera() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapCameraInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.MapCameraInterface).asKmp() } actual fun setTouchHandler(touchHandler: KMTouchHandlerInterface) { @@ -60,7 +60,7 @@ actual class KMMapInterface actual public constructor( actual fun getTouchHandler(): KMTouchHandlerInterface { val result = native.getTouchHandler() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.controls.TouchHandlerInterface).asKmp() } actual fun setPerformanceLoggers(performanceLoggers: ArrayList) { @@ -69,17 +69,17 @@ actual class KMMapInterface actual public constructor( actual fun getPerformanceLoggers(): ArrayList { val result = native.getPerformanceLoggers() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface).asKmp() }) } actual fun getLayers(): ArrayList { val result = native.getLayers() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() }) } actual fun getLayersIndexed(): ArrayList { val result = native.getLayersIndexed() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.map.IndexedLayerInterface).asKmp() }) } actual fun addLayer(layer: KMLayerInterface) { @@ -169,12 +169,12 @@ actual class KMMapInterface actual public constructor( actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface, mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { val result = MapInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform(), mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.MapInterface).asKmp() } actual fun createWithOpenGl(mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { val result = MapInterface.createWithOpenGl(mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.MapInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.MapInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt index 55890b6bc..2f5f6b182 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -18,7 +18,7 @@ private class KMMaskingObjectInterfacePlatformWrapper(internal val nativeHandle: override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } override fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { @@ -35,7 +35,7 @@ private class KMMaskingObjectInterfacePlatformProxy(private val delegate: KMMask } override fun renderAsMask(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, renderPass: io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: io.openmobilemaps.mapscore.shared.graphics.common.Vec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { - delegate.renderAsMask(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), (renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) + delegate.renderAsMask((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as io.openmobilemaps.mapscore.shared.graphics.common.Vec3D).asKmp(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt index 047f888a2..396dd5106 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -13,7 +13,7 @@ actual class KMOpenGlPerformanceLoggerInterface actual public constructor( actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { val result = native.asPerformanceLoggerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.PerformanceLoggerInterface).asKmp() } actual companion object @@ -21,12 +21,12 @@ actual class KMOpenGlPerformanceLoggerInterface actual public constructor( actual fun create(): KMOpenGlPerformanceLoggerInterface { val result = OpenGlPerformanceLoggerInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface).asKmp() } actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMOpenGlPerformanceLoggerInterface { val result = OpenGlPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.OpenGlPerformanceLoggerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt index b34abe17e..c12d53da6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -26,7 +26,7 @@ private class KMOpenGlRenderTargetInterfacePlatformWrapper(internal val nativeHa override fun asRenderTargetInterface(): KMRenderTargetInterface { val result = nativeHandle.asRenderTargetInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface).asKmp() } override fun setup(size: KMVec2I) { @@ -68,7 +68,7 @@ private class KMOpenGlRenderTargetInterfacePlatformProxy(private val delegate: K } override fun bindFramebuffer(renderingContext: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface) { - delegate.bindFramebuffer(requireNotNull((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp()) + delegate.bindFramebuffer((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp()) } override fun unbindFramebuffer() { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt index c358bd435..bce00b782 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -40,7 +40,7 @@ private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nati override fun getCreateRenderTarget(name: String, textureFilter: KMTextureFilterType, clearColor: KMColor, usesDepthStencil: Boolean): KMOpenGlRenderTargetInterface { val result = nativeHandle.getCreateRenderTarget(name, textureFilter.asPlatform(), clearColor.asPlatform(), usesDepthStencil) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface).asKmp() } override fun deleteRenderTarget(name: String) { @@ -49,7 +49,7 @@ private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nati override fun getRenderTargets(): ArrayList { val result = nativeHandle.getRenderTargets() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface).asKmp() }) } override fun getProgram(name: String): Int { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index ae33a7221..0b8d68f4e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -30,12 +30,12 @@ private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: Pol override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt index cfadf3d86..a00fbe3aa 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -22,7 +22,7 @@ private class KMPolygonGroup2dInterfacePlatformWrapper(internal val nativeHandle override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt index 95e2bc80e..7db784aa2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -17,7 +17,7 @@ actual class KMPolygonGroupShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt index 7ffd3173a..153552697 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -42,7 +42,7 @@ actual class KMPolygonLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual fun resetSelection() { @@ -62,7 +62,7 @@ actual class KMPolygonLayerInterface actual public constructor( actual fun create(): KMPolygonLayerInterface { val result = PolygonLayerInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt index 7d78ad940..50724b53d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -21,7 +21,7 @@ actual class KMPolygonMaskObjectInterface actual public constructor( actual fun getPolygonObject(): KMPolygon2dInterface { val result = native.getPolygonObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.Polygon2dInterface).asKmp() } actual companion object @@ -29,7 +29,7 @@ actual class KMPolygonMaskObjectInterface actual public constructor( actual fun create(graphicsObjectFactory: KMGraphicsObjectFactoryInterface, conversionHelper: KMCoordinateConversionHelperInterface, is3d: Boolean): KMPolygonMaskObjectInterface { val result = PolygonMaskObjectInterface.create(graphicsObjectFactory.asPlatform(), conversionHelper.asPlatform(), is3d) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonMaskObjectInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt index 9f45eb0cc..40072067d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -58,7 +58,7 @@ private class KMPolygonPatternGroup2dInterfacePlatformWrapper(internal val nativ override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } } @@ -86,7 +86,7 @@ private class KMPolygonPatternGroup2dInterfacePlatformProxy(private val delegate } override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { - delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + delegate.loadTexture((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt index d6b9257bd..a61273766 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -13,7 +13,7 @@ actual class KMPolygonPatternGroupShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt index 60dfa8825..1edb9d554 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -78,12 +78,12 @@ private class KMQuad2dInstancedInterfacePlatformWrapper(internal val nativeHandl override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface).asKmp() } } @@ -123,7 +123,7 @@ private class KMQuad2dInstancedInterfacePlatformProxy(private val delegate: KMQu } override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { - delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + delegate.loadTexture((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt index 848d1f1cb..8eb9a2611 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -48,12 +48,12 @@ private class KMQuad2dInterfacePlatformWrapper(internal val nativeHandle: Quad2d override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface).asKmp() } } @@ -73,7 +73,7 @@ private class KMQuad2dInterfacePlatformProxy(private val delegate: KMQuad2dInter } override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { - delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + delegate.loadTexture((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt index d436ac0a5..5caceb968 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -78,12 +78,12 @@ private class KMQuad2dStretchedInstancedInterfacePlatformWrapper(internal val na override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface).asKmp() } } @@ -123,7 +123,7 @@ private class KMQuad2dStretchedInstancedInterfacePlatformProxy(private val deleg } override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { - delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + delegate.loadTexture((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt index 3a38ef956..815741e2d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -17,7 +17,7 @@ actual class KMRasterShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt index e06363ed1..abf579735 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -13,7 +13,7 @@ actual class KMRenderConfigInterface actual public constructor( actual fun getGraphicsObject(): KMGraphicsObjectInterface { val result = native.getGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } actual fun getRenderIndex(): Int { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt index 7900895fb..fa1582f06 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -26,7 +26,7 @@ private class KMRenderObjectInterfacePlatformWrapper(internal val nativeHandle: override fun getGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.getGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } override fun hasCustomModelMatrix(): Boolean { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index b0074fba4..fc27c8e78 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -21,5 +21,5 @@ internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared. internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( renderPassIndex = this.renderPassIndex, isPassMasked = this.isPassMasked, - renderTarget = this.renderTarget?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() }, + renderTarget = this.renderTarget?.let { (it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface).asKmp() }, ) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt index ceb2f4a66..ec7b87cf5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -24,7 +24,7 @@ private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: Re override fun getRenderObjects(): ArrayList { val result = nativeHandle.getRenderObjects() - return ArrayList(result.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface)).asKmp() }) + return ArrayList(result.map { (it as io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface).asKmp() }) } override fun addRenderObject(renderObject: KMRenderObjectInterface) { @@ -38,7 +38,7 @@ private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: Re override fun getMaskingObject(): KMMaskingObjectInterface? { val result = nativeHandle.getMaskingObject() - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.MaskingObjectInterface).asKmp() } } override fun getScissoringRect(): KMRectI? { @@ -56,7 +56,7 @@ private class KMRenderPassInterfacePlatformProxy(private val delegate: KMRenderP } override fun addRenderObject(renderObject: io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface) { - delegate.addRenderObject(requireNotNull((renderObject as io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface)).asKmp()) + delegate.addRenderObject((renderObject as io.openmobilemaps.mapscore.shared.graphics.RenderObjectInterface).asKmp()) } override fun getRenderPassConfig(): io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt index f784cf3db..82262acf3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -16,7 +16,7 @@ private class KMRenderTargetInterfacePlatformWrapper(internal val nativeHandle: override fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? { val result = nativeHandle.asGlRenderTargetInterface() - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderTargetInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt index 1c9d41f62..4019999ff 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -41,19 +41,19 @@ private class KMRendererInterfacePlatformProxy(private val delegate: KMRendererI { override fun addToRenderQueue(renderPass: io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface) { - delegate.addToRenderQueue(requireNotNull((renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface)).asKmp()) + delegate.addToRenderQueue((renderPass as io.openmobilemaps.mapscore.shared.graphics.RenderPassInterface).asKmp()) } override fun addToComputeQueue(computePass: io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface) { - delegate.addToComputeQueue(requireNotNull((computePass as io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface)).asKmp()) + delegate.addToComputeQueue((computePass as io.openmobilemaps.mapscore.shared.graphics.ComputePassInterface).asKmp()) } override fun drawFrame(renderingContext: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, camera: io.openmobilemaps.mapscore.shared.graphics.CameraInterface, target: io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface?) { - delegate.drawFrame(requireNotNull((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((camera as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp(), target?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface)).asKmp() }) + delegate.drawFrame((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (camera as io.openmobilemaps.mapscore.shared.graphics.CameraInterface).asKmp(), target?.let { (it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface).asKmp() }) } override fun compute(renderingContext: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, camera: io.openmobilemaps.mapscore.shared.graphics.CameraInterface) { - delegate.compute(requireNotNull((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((camera as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp()) + delegate.compute((renderingContext as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (camera as io.openmobilemaps.mapscore.shared.graphics.CameraInterface).asKmp()) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt index 1cb05c786..eaf4dbe82 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -71,7 +71,7 @@ private class KMRenderingContextInterfacePlatformWrapper(internal val nativeHand override fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? { val result = nativeHandle.asOpenGlRenderingContext() - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.graphics.OpenGlRenderingContextInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt index 008a491ad..b5a0684dd 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -26,7 +26,7 @@ actual class KMReverseGeocoderInterface actual public constructor( actual fun create(loader: KMLoaderInterface, tileUrlTemplate: String, zoomLevel: Int): KMReverseGeocoderInterface { val result = ReverseGeocoderInterface.create(loader.asPlatform(), tileUrlTemplate, zoomLevel) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.utils.ReverseGeocoderInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt index 1837fdafb..785967b09 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -21,27 +21,27 @@ actual class KMSceneInterface actual public constructor( actual fun getCamera(): KMCameraInterface { val result = native.getCamera() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.CameraInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.CameraInterface).asKmp() } actual fun getRenderer(): KMRendererInterface { val result = native.getRenderer() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RendererInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.RendererInterface).asKmp() } actual fun getRenderingContext(): KMRenderingContextInterface { val result = native.getRenderingContext() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp() } actual fun getGraphicsFactory(): KMGraphicsObjectFactoryInterface { val result = native.getGraphicsFactory() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectFactoryInterface).asKmp() } actual fun getShaderFactory(): KMShaderFactoryInterface { val result = native.getShaderFactory() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderFactoryInterface).asKmp() } actual fun prepare() { @@ -69,12 +69,12 @@ actual class KMSceneInterface actual public constructor( actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface): KMSceneInterface { val result = SceneInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface).asKmp() } actual fun createWithOpenGl(): KMSceneInterface { val result = SceneInterface.createWithOpenGl() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.SceneInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt index 56ebd15cf..449a2a5c5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -79,11 +79,11 @@ private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedule { override fun addTask(task: io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface) { - delegate.addTask(requireNotNull((task as io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface)).asKmp()) + delegate.addTask((task as io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface).asKmp()) } override fun addTasks(tasks: ArrayList) { - delegate.addTasks(ArrayList(tasks.map { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface)).asKmp() })) + delegate.addTasks(ArrayList(tasks.map { (it as io.openmobilemaps.mapscore.shared.map.scheduling.TaskInterface).asKmp() })) } override fun removeTask(id: String) { @@ -117,7 +117,7 @@ private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedule } override fun setSchedulerGraphicsTaskCallbacks(callbacks: io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks) { - delegate.setSchedulerGraphicsTaskCallbacks(requireNotNull((callbacks as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks)).asKmp()) + delegate.setSchedulerGraphicsTaskCallbacks((callbacks as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerGraphicsTaskCallbacks).asKmp()) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index 37c33d783..a0442a05b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -68,137 +68,137 @@ private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: override fun createAlphaShader(): KMAlphaShaderInterface { val result = nativeHandle.createAlphaShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface).asKmp() } override fun createUnitSphereAlphaShader(): KMAlphaShaderInterface { val result = nativeHandle.createUnitSphereAlphaShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaShaderInterface).asKmp() } override fun createAlphaInstancedShader(): KMAlphaInstancedShaderInterface { val result = nativeHandle.createAlphaInstancedShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface).asKmp() } override fun createUnitSphereAlphaInstancedShader(): KMAlphaInstancedShaderInterface { val result = nativeHandle.createUnitSphereAlphaInstancedShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.AlphaInstancedShaderInterface).asKmp() } override fun createLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createLineGroupShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface).asKmp() } override fun createUnitSphereLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createUnitSphereLineGroupShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface).asKmp() } override fun createSimpleLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createSimpleLineGroupShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface).asKmp() } override fun createUnitSphereSimpleLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createUnitSphereSimpleLineGroupShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.LineGroupShaderInterface).asKmp() } override fun createUnitSphereColorShader(): KMColorShaderInterface { val result = nativeHandle.createUnitSphereColorShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface).asKmp() } override fun createColorShader(): KMColorShaderInterface { val result = nativeHandle.createColorShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface).asKmp() } override fun createPolygonTessellatedShader(unitSphere: Boolean): KMColorShaderInterface { val result = nativeHandle.createPolygonTessellatedShader(unitSphere) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface).asKmp() } override fun createColorCircleShader(): KMColorCircleShaderInterface { val result = nativeHandle.createColorCircleShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface).asKmp() } override fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface { val result = nativeHandle.createUnitSphereColorCircleShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorCircleShaderInterface).asKmp() } override fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): KMPolygonGroupShaderInterface { val result = nativeHandle.createPolygonGroupShader(isStriped, unitSphere) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonGroupShaderInterface).asKmp() } override fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): KMPolygonPatternGroupShaderInterface { val result = nativeHandle.createPolygonPatternGroupShader(fadeInPattern, unitSphere) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.PolygonPatternGroupShaderInterface).asKmp() } override fun createTextShader(): KMTextShaderInterface { val result = nativeHandle.createTextShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.TextShaderInterface).asKmp() } override fun createTextInstancedShader(): KMTextInstancedShaderInterface { val result = nativeHandle.createTextInstancedShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface).asKmp() } override fun createUnitSphereTextInstancedShader(): KMTextInstancedShaderInterface { val result = nativeHandle.createUnitSphereTextInstancedShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.TextInstancedShaderInterface).asKmp() } override fun createRasterShader(): KMRasterShaderInterface { val result = nativeHandle.createRasterShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface).asKmp() } override fun createUnitSphereRasterShader(): KMRasterShaderInterface { val result = nativeHandle.createUnitSphereRasterShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface).asKmp() } override fun createQuadTessellatedShader(): KMRasterShaderInterface { val result = nativeHandle.createQuadTessellatedShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderInterface).asKmp() } override fun createStretchShader(): KMStretchShaderInterface { val result = nativeHandle.createStretchShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInterface).asKmp() } override fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface { val result = nativeHandle.createStretchInstancedShader(unitSphere) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.StretchInstancedShaderInterface).asKmp() } override fun createIcosahedronColorShader(): KMColorShaderInterface { val result = nativeHandle.createIcosahedronColorShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ColorShaderInterface).asKmp() } override fun createSphereEffectShader(): KMSphereEffectShaderInterface { val result = nativeHandle.createSphereEffectShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.SphereEffectShaderInterface).asKmp() } override fun createSkySphereShader(): KMSkySphereShaderInterface { val result = nativeHandle.createSkySphereShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.SkySphereShaderInterface).asKmp() } override fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface { val result = nativeHandle.createElevationInterpolationShader() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ElevationInterpolationShaderInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt index 177e71015..fc4bf1977 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -13,7 +13,7 @@ actual class KMSkySphereLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual fun setTexture(texture: KMTextureHolderInterface) { @@ -25,7 +25,7 @@ actual class KMSkySphereLayerInterface actual public constructor( actual fun create(): KMSkySphereLayerInterface { val result = SkySphereLayerInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.skysphere.SkySphereLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt index 545b188ad..a1e1cdbbd 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -13,7 +13,7 @@ actual class KMSkySphereShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } actual fun setCameraProperties(inverseVP: ArrayList, cameraPosition: KMVec3D) { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt index 09d0ac64e..229321411 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -13,7 +13,7 @@ actual class KMSphereEffectLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual companion object @@ -21,7 +21,7 @@ actual class KMSphereEffectLayerInterface actual public constructor( actual fun create(): KMSphereEffectLayerInterface { val result = SphereEffectLayerInterface.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.effect.SphereEffectLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt index 4ade30c0c..754db591f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -13,7 +13,7 @@ actual class KMSphereEffectShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } actual fun setEllipse(coefficients: KMSharedBytes) { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt index 1db1efad8..56f1e3e49 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -13,7 +13,7 @@ actual class KMStretchInstancedShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt index 89449fee7..1f27a9128 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -21,7 +21,7 @@ actual class KMStretchShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt index ffc9c754f..782d7c3e8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -16,7 +16,7 @@ actual class KMTextFactory actual public constructor( actual fun createText(text: ArrayList, coordinate: KMCoord, font: KMFont, textAnchor: KMAnchor, textJustify: KMTextJustify): KMTextInfoInterface { val result = TextFactory.createText(ArrayList(text.map { it.asPlatform() }), coordinate.asPlatform(), font.asPlatform(), textAnchor.asPlatform(), textJustify.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.text.TextInfoInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt index f6eef760d..f78c7aa37 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -88,7 +88,7 @@ private class KMTextInstancedInterfacePlatformWrapper(internal val nativeHandle: override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } } @@ -136,7 +136,7 @@ private class KMTextInstancedInterfacePlatformProxy(private val delegate: KMText } override fun loadFont(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, fontData: io.openmobilemaps.mapscore.shared.map.loader.FontData, fontMsdfTexture: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { - delegate.loadFont(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), (fontData as io.openmobilemaps.mapscore.shared.map.loader.FontData).asKmp(), requireNotNull((fontMsdfTexture as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + delegate.loadFont((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (fontData as io.openmobilemaps.mapscore.shared.map.loader.FontData).asKmp(), (fontMsdfTexture as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt index 3e5d2f8ab..5dc963265 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -13,7 +13,7 @@ actual class KMTextInstancedShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt index a4c2ada0e..3a6ff5a78 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -34,7 +34,7 @@ private class KMTextInterfacePlatformWrapper(internal val nativeHandle: TextInte override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.objects.GraphicsObjectInterface).asKmp() } } @@ -46,7 +46,7 @@ private class KMTextInterfacePlatformProxy(private val delegate: KMTextInterface } override fun loadTexture(context: io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface, textureHolder: io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface) { - delegate.loadTexture(requireNotNull((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface)).asKmp(), requireNotNull((textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp()) + delegate.loadTexture((context as io.openmobilemaps.mapscore.shared.graphics.RenderingContextInterface).asKmp(), (textureHolder as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt index 3da129e28..9d8388043 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -17,7 +17,7 @@ actual class KMTextLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual fun invalidate() { @@ -29,7 +29,7 @@ actual class KMTextLayerInterface actual public constructor( actual fun create(fontLoader: KMFontLoaderInterface): KMTextLayerInterface { val result = TextLayerInterface.create(fontLoader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.text.TextLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt index 4187b7fed..468839e0c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -25,7 +25,7 @@ actual class KMTextShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.graphics.shader.ShaderProgramInterface).asKmp() } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index 45adccad0..f5482f325 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -17,5 +17,5 @@ internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.grap ) internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( uvMap = HashMap(this.uvMap.map { it.key to (it.value as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }.toMap()), - texture = this.texture?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, + texture = this.texture?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, ) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index bb306ee1d..fb44676dd 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -22,7 +22,7 @@ internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shar errorCode = errorCode?.let { it }, ) internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( - data = this.data?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, + data = this.data?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, etag = this.etag?.let { it }, status = (this.status as io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus).asKmp(), errorCode = this.errorCode?.let { it }, diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt index bece10364..ba6efb087 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -16,7 +16,7 @@ actual class KMThreadPoolScheduler actual public constructor( actual fun create(): KMSchedulerInterface { val result = ThreadPoolScheduler.create() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.scheduling.SchedulerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt index 2a0bfcc77..e85455a66 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -13,7 +13,7 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual fun setCallbackHandler(handler: KMTiled2dMapRasterLayerCallbackInterface) { @@ -22,7 +22,7 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun getCallbackHandler(): KMTiled2dMapRasterLayerCallbackInterface? { val result = native.getCallbackHandler() - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerCallbackInterface).asKmp() } } actual fun removeCallbackHandler() { @@ -79,7 +79,7 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun getConfig(): KMTiled2dMapLayerConfig { val result = native.getConfig() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } actual fun set3dSubdivisionFactor(factor: Int) { @@ -95,17 +95,17 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun createWithMask(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, mask: KMMaskingObjectInterface): KMTiled2dMapRasterLayerInterface { val result = Tiled2dMapRasterLayerInterface.createWithMask(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), mask.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface).asKmp() } actual fun createWithShader(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, shader: KMShaderProgramInterface): KMTiled2dMapRasterLayerInterface { val result = Tiled2dMapRasterLayerInterface.createWithShader(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), shader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface).asKmp() } actual fun create(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList): KMTiled2dMapRasterLayerInterface { val result = Tiled2dMapRasterLayerInterface.create(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() })) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index c1f5d950e..745243aab 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -17,5 +17,5 @@ internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscor ) internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( featureIdentifiersUv = HashMap(this.featureIdentifiersUv.map { it.key to (it.value as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }.toMap()), - texture = this.texture?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface)).asKmp() }, + texture = this.texture?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, ) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt index 0458dd0ee..cb4e2f7b0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -17,7 +17,7 @@ actual class KMTiled2dMapVectorLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.LayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.LayerInterface).asKmp() } actual fun setMinZoomLevelIdentifier(value: Int?) { @@ -77,12 +77,12 @@ actual class KMTiled2dMapVectorLayerInterface actual public constructor( actual fun createFromStyleJson(layerName: String, styleJsonUrl: String, loaders: ArrayList, fontLoader: KMFontLoaderInterface): KMTiled2dMapVectorLayerInterface { val result = Tiled2dMapVectorLayerInterface.createFromStyleJson(layerName, styleJsonUrl, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform()) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface).asKmp() } actual fun createExplicitly(layerName: String, styleJson: String?, localStyleJson: Boolean?, loaders: ArrayList, fontLoader: KMFontLoaderInterface, localDataProvider: KMTiled2dMapVectorLayerLocalDataProviderInterface?, customZoomInfo: KMTiled2dMapZoomInfo?, symbolDelegate: KMTiled2dMapVectorLayerSymbolDelegateInterface?, sourceUrlParams: HashMap?): KMTiled2dMapVectorLayerInterface { val result = Tiled2dMapVectorLayerInterface.createExplicitly(layerName, styleJson?.let { it }, localStyleJson?.let { it }, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform(), localDataProvider?.let { it.asPlatform() }, customZoomInfo?.let { it.asPlatform() }, symbolDelegate?.let { it.asPlatform() }, sourceUrlParams?.let { HashMap(it.map { it.key to it.value }.toMap()) }) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorLayerInterface).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt index 4593e3911..a859c0ff3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -45,15 +45,15 @@ private class KMTouchHandlerInterfacePlatformProxy(private val delegate: KMTouch } override fun insertListener(listener: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface, index: Int) { - delegate.insertListener(requireNotNull((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface)).asKmp(), index) + delegate.insertListener((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface).asKmp(), index) } override fun addListener(listener: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface) { - delegate.addListener(requireNotNull((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface)).asKmp()) + delegate.addListener((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface).asKmp()) } override fun removeListener(listener: io.openmobilemaps.mapscore.shared.map.controls.TouchInterface) { - delegate.removeListener(requireNotNull((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface)).asKmp()) + delegate.removeListener((listener as io.openmobilemaps.mapscore.shared.map.controls.TouchInterface).asKmp()) } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt index 5836de8cb..9b51d39c9 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -13,42 +13,42 @@ actual class KMWmtsCapabilitiesResource actual public constructor( actual fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? { val result = native.createLayer(identifier, ArrayList(tileLoaders.map { it.asPlatform() })) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerTimed(identifier: String, tileLoaders: ArrayList, numT: Int): KMTiled2dMapRasterLayerInterface? { val result = native.createLayerTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), numT) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerWithZoomInfo(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapRasterLayerInterface? { val result = native.createLayerWithZoomInfo(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform()) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerWithZoomInfoTimed(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapRasterLayerInterface? { val result = native.createLayerWithZoomInfoTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform(), numT) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.Tiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerConfig(identifier: String): KMTiled2dMapLayerConfig? { val result = native.createLayerConfig(identifier) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } } actual fun createLayerConfigTimed(identifier: String, numT: Int): KMTiled2dMapLayerConfig? { val result = native.createLayerConfigTimed(identifier, numT) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } } actual fun createLayerConfigWithZoomInfo(identifier: String, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapLayerConfig? { val result = native.createLayerConfigWithZoomInfo(identifier, zoomInfo.asPlatform()) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } } actual fun createLayerConfigWithZoomInfoTimed(identifier: String, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapLayerConfig? { val result = native.createLayerConfigWithZoomInfoTimed(identifier, zoomInfo.asPlatform(), numT) - return result?.let { requireNotNull((it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() } + return result?.let { (it as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } } actual fun getAllLayers(): ArrayList { @@ -61,7 +61,7 @@ actual class KMWmtsCapabilitiesResource actual public constructor( actual fun create(xml: String): KMWmtsCapabilitiesResource { val result = WmtsCapabilitiesResource.create(xml) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsCapabilitiesResource).asKmp() } } } diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt index 6e03a79ed..cff5ac2a5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -16,7 +16,7 @@ actual class KMWmtsTiled2dMapLayerConfigFactory actual public constructor( actual fun create(wmtsLayerConfiguration: KMWmtsLayerDescription, zoomLevelInfo: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, coordinateSystemIdentifier: Int, matrixSetIdentifier: String): KMTiled2dMapLayerConfig { val result = WmtsTiled2dMapLayerConfigFactory.create(wmtsLayerConfiguration.asPlatform(), ArrayList(zoomLevelInfo.map { it.asPlatform() }), zoomInfo.asPlatform(), coordinateSystemIdentifier, matrixSetIdentifier) - return requireNotNull((result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig)).asKmp() + return (result as io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapLayerConfig).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt index b3c4de7b1..196323de7 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -18,7 +18,7 @@ actual class KMAlphaInstancedShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt index c863b8e3f..fa16f3851 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -22,7 +22,7 @@ actual class KMAlphaShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt index b0555fe82..d1f05e228 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -50,7 +50,7 @@ actual class KMBoundingBoxInterface actual public constructor( actual fun create(systemIdentifier: Int): KMBoundingBoxInterface { val result = MapCoreSharedModule.MCBoundingBoxInterface.create(systemIdentifier) - return requireNotNull((result as MapCoreSharedModule.MCBoundingBoxInterface)).asKmp() + return (result as MapCoreSharedModule.MCBoundingBoxInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt index e124af744..654e4583d 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -22,7 +22,7 @@ actual class KMColorCircleShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt index fd00e9a33..8c8129daf 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -22,7 +22,7 @@ actual class KMColorShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt index 216287b81..b96cf6cc8 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -29,7 +29,7 @@ private class KMComputeObjectInterfacePlatformProxy(private val delegate: KMComp { override fun compute(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, vpMatrix: Long, origin: MapCoreSharedModule.MCVec3D, screenPixelAsRealMeterFactor: Double) { - delegate.compute(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), vpMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), screenPixelAsRealMeterFactor) + delegate.compute((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), vpMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), screenPixelAsRealMeterFactor) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt index 5c63d0cf2..c83a1866a 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -22,7 +22,7 @@ private class KMComputePassInterfacePlatformWrapper(internal val nativeHandle: M override fun getComputeObjects(): ArrayList { val result = nativeHandle.getComputeObjects() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCComputeObjectInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCComputeObjectInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCComputeObjectInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCComputeObjectInterfaceProtocol).asKmp() })) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt index b1dc064be..e4797dbe1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -55,7 +55,7 @@ actual class KMCoordinateConversionHelperInterface actual public constructor( actual fun independentInstance(): KMCoordinateConversionHelperInterface { val result = MapCoreSharedModule.MCCoordinateConversionHelperInterface.independentInstance() - return requireNotNull((result as MapCoreSharedModule.MCCoordinateConversionHelperInterface)).asKmp() + return (result as MapCoreSharedModule.MCCoordinateConversionHelperInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt index 511e0c611..710aa2a42 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -18,7 +18,7 @@ actual class KMCpuPerformanceLoggerInterface actual public constructor( actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { val result = native.asPerformanceLoggerInterface() - return requireNotNull((result as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol).asKmp() } actual companion object @@ -26,12 +26,12 @@ actual class KMCpuPerformanceLoggerInterface actual public constructor( actual fun create(): KMCpuPerformanceLoggerInterface { val result = MapCoreSharedModule.MCCpuPerformanceLoggerInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCCpuPerformanceLoggerInterface)).asKmp() + return (result as MapCoreSharedModule.MCCpuPerformanceLoggerInterface).asKmp() } actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMCpuPerformanceLoggerInterface { val result = MapCoreSharedModule.MCCpuPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) - return requireNotNull((result as MapCoreSharedModule.MCCpuPerformanceLoggerInterface)).asKmp() + return (result as MapCoreSharedModule.MCCpuPerformanceLoggerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt index e40c28cad..d71250c96 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -21,22 +21,22 @@ actual class KMDefaultTiled2dMapLayerConfigs actual public constructor( actual fun webMercator(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.webMercator(layerName, urlFormat) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } actual fun webMercatorCustom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo?, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.webMercatorCustom(layerName, urlFormat, zoomInfo?.let { it.asPlatform() }, minZoomLevel, maxZoomLevel) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } actual fun epsg4326(layerName: String, urlFormat: String): KMTiled2dMapLayerConfig { val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.epsg4326(layerName, urlFormat) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } actual fun epsg4326Custom(layerName: String, urlFormat: String, zoomInfo: KMTiled2dMapZoomInfo, minZoomLevel: Int, maxZoomLevel: Int): KMTiled2dMapLayerConfig { val result = MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.epsg4326Custom(layerName, urlFormat, zoomInfo.asPlatform(), minZoomLevel, maxZoomLevel) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt index 3f6288d25..a209ba25e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -21,7 +21,7 @@ actual class KMDefaultTouchHandlerInterface actual public constructor( actual fun create(scheduler: KMSchedulerInterface, density: Float): KMTouchHandlerInterface { val result = MapCoreSharedModule.MCDefaultTouchHandlerInterface.create(scheduler.asPlatform(), density) - return requireNotNull((result as MapCoreSharedModule.MCTouchHandlerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTouchHandlerInterfaceProtocol).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt index bb474a52c..6bf5a57bd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -18,7 +18,7 @@ actual class KMElevationInterpolationShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt index d43bc4822..1c5649a69 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -45,7 +45,7 @@ actual class KMErrorManager actual public constructor( actual fun create(): KMErrorManager { val result = MapCoreSharedModule.MCErrorManager.create() - return requireNotNull((result as MapCoreSharedModule.MCErrorManager)).asKmp() + return (result as MapCoreSharedModule.MCErrorManager).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index 4aa63d3da..5de1bc304 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -26,7 +26,7 @@ internal fun KMFontLoaderResult.asPlatform(): MapCoreSharedModule.MCFontLoaderRe status = status.asPlatform(), ) internal fun MapCoreSharedModule.MCFontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( - imageData = this.imageData?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, + imageData = this.imageData?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, fontData = this.fontData?.let { (it as MapCoreSharedModule.MCFontData).asKmp() }, status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt index ab852e44b..62a245507 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -36,7 +36,7 @@ actual class KMGeoJsonFeatureParserInterface actual public constructor( actual fun create(): KMGeoJsonFeatureParserInterface { val result = MapCoreSharedModule.MCGeoJsonFeatureParserInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCGeoJsonFeatureParserInterface)).asKmp() + return (result as MapCoreSharedModule.MCGeoJsonFeatureParserInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt index 302639f50..5acfa7563 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -31,7 +31,7 @@ actual class KMGeoJsonHelperInterface actual public constructor( actual fun independentInstance(): KMGeoJsonHelperInterface { val result = MapCoreSharedModule.MCGeoJsonHelperInterface.independentInstance() - return requireNotNull((result as MapCoreSharedModule.MCGeoJsonHelperInterface)).asKmp() + return (result as MapCoreSharedModule.MCGeoJsonHelperInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index 905298afd..31b2fafe5 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -50,77 +50,77 @@ private class KMGraphicsObjectFactoryInterfacePlatformWrapper(internal val nativ override fun createQuad(shader: KMShaderProgramInterface): KMQuad2dInterface { val result = nativeHandle.createQuad(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCQuad2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCQuad2dInterfaceProtocol).asKmp() } override fun createQuadTessellated(shader: KMShaderProgramInterface): KMQuad2dInterface { val result = nativeHandle.createQuadTessellated(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCQuad2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCQuad2dInterfaceProtocol).asKmp() } override fun createPolygon(shader: KMShaderProgramInterface): KMPolygon2dInterface { val result = nativeHandle.createPolygon(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol).asKmp() } override fun createPolygonTessellated(shader: KMShaderProgramInterface): KMPolygon2dInterface { val result = nativeHandle.createPolygonTessellated(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol).asKmp() } override fun createIcosahedronObject(shader: KMShaderProgramInterface): KMIcosahedronInterface { val result = nativeHandle.createIcosahedronObject(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCIcosahedronInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCIcosahedronInterfaceProtocol).asKmp() } override fun createQuadInstanced(shader: KMShaderProgramInterface): KMQuad2dInstancedInterface { val result = nativeHandle.createQuadInstanced(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol).asKmp() } override fun createQuadStretchedInstanced(shader: KMShaderProgramInterface): KMQuad2dStretchedInstancedInterface { val result = nativeHandle.createQuadStretchedInstanced(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol).asKmp() } override fun createLineGroup(shader: KMShaderProgramInterface): KMLineGroup2dInterface { val result = nativeHandle.createLineGroup(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCLineGroup2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLineGroup2dInterfaceProtocol).asKmp() } override fun createPolygonGroup(shader: KMShaderProgramInterface): KMPolygonGroup2dInterface { val result = nativeHandle.createPolygonGroup(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol).asKmp() } override fun createPolygonPatternGroup(shader: KMShaderProgramInterface): KMPolygonPatternGroup2dInterface { val result = nativeHandle.createPolygonPatternGroup(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol).asKmp() } override fun createQuadMask(is3d: Boolean): KMQuad2dInterface { val result = nativeHandle.createQuadMask(is3d) - return requireNotNull((result as MapCoreSharedModule.MCQuad2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCQuad2dInterfaceProtocol).asKmp() } override fun createPolygonMask(is3d: Boolean): KMPolygon2dInterface { val result = nativeHandle.createPolygonMask(is3d) - return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol).asKmp() } override fun createPolygonMaskTessellated(is3d: Boolean): KMPolygon2dInterface { val result = nativeHandle.createPolygonMaskTessellated(is3d) - return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol).asKmp() } override fun createText(shader: KMShaderProgramInterface): KMTextInterface { val result = nativeHandle.createText(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCTextInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTextInterfaceProtocol).asKmp() } override fun createTextInstanced(shader: KMShaderProgramInterface): KMTextInstancedInterface { val result = nativeHandle.createTextInstanced(shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCTextInstancedInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTextInstancedInterfaceProtocol).asKmp() } } @@ -128,52 +128,52 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate { override fun createQuad(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dInterfaceProtocol? { - val result = delegate.createQuad(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createQuad((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createQuadTessellated(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dInterfaceProtocol? { - val result = delegate.createQuadTessellated(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createQuadTessellated((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createPolygon(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygon2dInterfaceProtocol? { - val result = delegate.createPolygon(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createPolygon((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createPolygonTessellated(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygon2dInterfaceProtocol? { - val result = delegate.createPolygonTessellated(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createPolygonTessellated((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createIcosahedronObject(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCIcosahedronInterfaceProtocol? { - val result = delegate.createIcosahedronObject(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createIcosahedronObject((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createQuadInstanced(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol? { - val result = delegate.createQuadInstanced(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createQuadInstanced((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createQuadStretchedInstanced(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol? { - val result = delegate.createQuadStretchedInstanced(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createQuadStretchedInstanced((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createLineGroup(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCLineGroup2dInterfaceProtocol? { - val result = delegate.createLineGroup(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createLineGroup((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createPolygonGroup(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol? { - val result = delegate.createPolygonGroup(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createPolygonGroup((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createPolygonPatternGroup(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol? { - val result = delegate.createPolygonPatternGroup(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createPolygonPatternGroup((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } @@ -193,12 +193,12 @@ private class KMGraphicsObjectFactoryInterfacePlatformProxy(private val delegate } override fun createText(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCTextInterfaceProtocol? { - val result = delegate.createText(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createText((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } override fun createTextInstanced(shader: MapCoreSharedModule.MCShaderProgramInterfaceProtocol?): MapCoreSharedModule.MCTextInstancedInterfaceProtocol? { - val result = delegate.createTextInstanced(requireNotNull((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp()) + val result = delegate.createTextInstanced((shader as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp()) return result.asPlatform() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt index 3fda975c5..5b7fd38c1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -65,7 +65,7 @@ private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGra } override fun setup(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?) { - delegate.setup(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp()) + delegate.setup((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp()) } override fun clear() { @@ -81,7 +81,7 @@ private class KMGraphicsObjectInterfacePlatformProxy(private val delegate: KMGra } override fun render(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, renderPass: MapCoreSharedModule.MCRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: MapCoreSharedModule.MCVec3D, isMasked: Boolean, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { - delegate.render(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), (renderPass as MapCoreSharedModule.MCRenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) + delegate.render((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (renderPass as MapCoreSharedModule.MCRenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), isMasked, screenPixelAsRealMeterFactor, isScreenSpaceCoords) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt index 38dc52a14..422c3ddd4 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -21,12 +21,12 @@ actual class KMIconFactory actual public constructor( actual fun createIcon(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode): KMIconInfoInterface { val result = MapCoreSharedModule.MCIconFactory.createIcon(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCIconInfoInterface)).asKmp() + return (result as MapCoreSharedModule.MCIconInfoInterface).asKmp() } actual fun createIconWithAnchor(identifier: String, coordinate: KMCoord, texture: KMTextureHolderInterface, iconSize: KMVec2F, scaleType: KMIconType, blendMode: KMBlendMode, iconAnchor: KMVec2F): KMIconInfoInterface { val result = MapCoreSharedModule.MCIconFactory.createIconWithAnchor(identifier, coordinate.asPlatform(), texture.asPlatform(), iconSize.asPlatform(), scaleType.asPlatform(), blendMode.asPlatform(), iconAnchor.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCIconInfoInterface)).asKmp() + return (result as MapCoreSharedModule.MCIconInfoInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt index 21515eff5..a80886c56 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -23,7 +23,7 @@ actual class KMIconInfoInterface actual public constructor( actual fun getTexture(): KMTextureHolderInterface { val result = native.getTexture() - return requireNotNull((result as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() } actual fun setCoordinate(coord: KMCoord) { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt index 043811cd5..d136ed93e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -37,12 +37,12 @@ private class KMIconLayerCallbackInterfacePlatformProxy(private val delegate: KM { override fun onClickConfirmed(icons: List<*>): Boolean { - val result = delegate.onClickConfirmed(ArrayList(((icons as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIconInfoInterface)).asKmp() } ?: (0 until (icons as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((icons as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface)).asKmp() }))) + val result = delegate.onClickConfirmed(ArrayList(((icons as? List<*>)?.map { (it as MapCoreSharedModule.MCIconInfoInterface).asKmp() } ?: (0 until (icons as platform.Foundation.NSArray).count.toInt()).map { idx -> ((icons as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface).asKmp() }))) return result } override fun onLongPress(icons: List<*>): Boolean { - val result = delegate.onLongPress(ArrayList(((icons as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIconInfoInterface)).asKmp() } ?: (0 until (icons as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((icons as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface)).asKmp() }))) + val result = delegate.onLongPress(ArrayList(((icons as? List<*>)?.map { (it as MapCoreSharedModule.MCIconInfoInterface).asKmp() } ?: (0 until (icons as platform.Foundation.NSArray).count.toInt()).map { idx -> ((icons as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface).asKmp() }))) return result } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt index 00f1d7647..6ba16a30e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -22,7 +22,7 @@ actual class KMIconLayerInterface actual public constructor( actual fun getIcons(): ArrayList { val result = native.getIcons() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIconInfoInterface)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCIconInfoInterface).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIconInfoInterface).asKmp() })) } actual fun remove(icon: KMIconInfoInterface) { @@ -59,7 +59,7 @@ actual class KMIconLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual fun invalidate() { @@ -83,7 +83,7 @@ actual class KMIconLayerInterface actual public constructor( actual fun create(): KMIconLayerInterface { val result = MapCoreSharedModule.MCIconLayerInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCIconLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCIconLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt index 37a7e8317..c338b0925 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -28,7 +28,7 @@ private class KMIcosahedronInterfacePlatformWrapper(internal val nativeHandle: M override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt index 0b0cb72d2..c90ee3e84 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -18,7 +18,7 @@ actual class KMIcosahedronLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual companion object @@ -26,7 +26,7 @@ actual class KMIcosahedronLayerInterface actual public constructor( actual fun create(callbackHandler: KMIcosahedronLayerCallbackInterface): KMIcosahedronLayerInterface { val result = MapCoreSharedModule.MCIcosahedronLayerInterface.create(callbackHandler.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCIcosahedronLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCIcosahedronLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt index 544071078..9178ae7a7 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -24,7 +24,7 @@ private class KMIndexedLayerInterfacePlatformWrapper(internal val nativeHandle: override fun getLayerInterface(): KMLayerInterface { val result = nativeHandle.getLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } override fun getIndex(): Int { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt index f8c2667da..12a9228e3 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -64,12 +64,12 @@ private class KMLayerInterfacePlatformWrapper(internal val nativeHandle: MapCore override fun buildRenderPasses(): ArrayList { val result = nativeHandle.buildRenderPasses() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCRenderPassInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderPassInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCRenderPassInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderPassInterfaceProtocol).asKmp() })) } override fun buildComputePasses(): ArrayList { val result = nativeHandle.buildComputePasses() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCComputePassInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCComputePassInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCComputePassInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCComputePassInterfaceProtocol).asKmp() })) } override fun onAdded(mapInterface: KMMapInterface, layerIndex: Int) { @@ -135,7 +135,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa { override fun setMaskingObject(maskingObject: MapCoreSharedModule.MCMaskingObjectInterfaceProtocol?) { - delegate.setMaskingObject(maskingObject?.let { requireNotNull((it as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() }) + delegate.setMaskingObject(maskingObject?.let { (it as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol).asKmp() }) } override fun update() { @@ -153,7 +153,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa } override fun onAdded(mapInterface: MapCoreSharedModule.MCMapInterface?, layerIndex: Int) { - delegate.onAdded(requireNotNull((mapInterface as MapCoreSharedModule.MCMapInterface)).asKmp(), layerIndex) + delegate.onAdded((mapInterface as MapCoreSharedModule.MCMapInterface).asKmp(), layerIndex) } override fun onRemoved() { @@ -199,7 +199,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa } override fun setErrorManager(errorManager: MapCoreSharedModule.MCErrorManager?) { - delegate.setErrorManager(requireNotNull((errorManager as MapCoreSharedModule.MCErrorManager)).asKmp()) + delegate.setErrorManager((errorManager as MapCoreSharedModule.MCErrorManager).asKmp()) } override fun forceReload() { @@ -207,7 +207,7 @@ private class KMLayerInterfacePlatformProxy(private val delegate: KMLayerInterfa } override fun setPrimaryRenderTarget(target: MapCoreSharedModule.MCRenderTargetInterfaceProtocol?) { - delegate.setPrimaryRenderTarget(target?.let { requireNotNull((it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() }) + delegate.setPrimaryRenderTarget(target?.let { (it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol).asKmp() }) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt index 740a153c9..5a6fe3aea 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -22,7 +22,7 @@ actual class KMLayerObjectInterface actual public constructor( actual fun getRenderConfig(): ArrayList { val result = native.getRenderConfig() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCRenderConfigInterface)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderConfigInterface)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCRenderConfigInterface).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderConfigInterface).asKmp() })) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt index c899f33e9..253e91008 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -21,7 +21,7 @@ actual class KMLineFactory actual public constructor( actual fun createLine(identifier: String, coordinates: ArrayList, style: KMLineStyle): KMLineInfoInterface { val result = MapCoreSharedModule.MCLineFactory.createLine(identifier, ArrayList(coordinates.map { it.asPlatform() }), style.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCLineInfoInterface)).asKmp() + return (result as MapCoreSharedModule.MCLineInfoInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt index ff089bdd8..bfeeae2bd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -28,7 +28,7 @@ private class KMLineGroup2dInterfacePlatformWrapper(internal val nativeHandle: M override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt index 95561a65b..2d922fdd2 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -26,7 +26,7 @@ actual class KMLineGroupShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt index ace125cd5..838027d2b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -29,7 +29,7 @@ private class KMLineLayerCallbackInterfacePlatformProxy(private val delegate: KM { override fun onLineClickConfirmed(line: MapCoreSharedModule.MCLineInfoInterface?) { - delegate.onLineClickConfirmed(requireNotNull((line as MapCoreSharedModule.MCLineInfoInterface)).asKmp()) + delegate.onLineClickConfirmed((line as MapCoreSharedModule.MCLineInfoInterface).asKmp()) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt index 58507cae8..484e4749e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -22,7 +22,7 @@ actual class KMLineLayerInterface actual public constructor( actual fun getLines(): ArrayList { val result = native.getLines() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCLineInfoInterface)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCLineInfoInterface)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCLineInfoInterface).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCLineInfoInterface).asKmp() })) } actual fun remove(line: KMLineInfoInterface) { @@ -43,7 +43,7 @@ actual class KMLineLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual fun invalidate() { @@ -71,7 +71,7 @@ actual class KMLineLayerInterface actual public constructor( actual fun create(): KMLineLayerInterface { val result = MapCoreSharedModule.MCLineLayerInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCLineLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCLineLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt index 8c2fe92a0..b53936ac6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -188,7 +188,7 @@ actual class KMMapCameraInterface actual public constructor( actual fun asCameraInterface(): KMCameraInterface { val result = native.asCameraInterface() - return requireNotNull((result as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCCameraInterfaceProtocol).asKmp() } actual fun getLastVpMatrixD(): ArrayList? { @@ -228,7 +228,7 @@ actual class KMMapCameraInterface actual public constructor( actual fun asMapCamera3d(): KMMapCamera3dInterface? { val result = native.asMapCamera3d() - return result?.let { requireNotNull((it as MapCoreSharedModule.MCMapCamera3dInterface)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCMapCamera3dInterface).asKmp() } } actual companion object @@ -236,7 +236,7 @@ actual class KMMapCameraInterface actual public constructor( actual fun create(mapInterface: KMMapInterface, screenDensityPpi: Float, is3D: Boolean): KMMapCameraInterface { val result = MapCoreSharedModule.MCMapCameraInterface.create(mapInterface.asPlatform(), screenDensityPpi, is3D) - return requireNotNull((result as MapCoreSharedModule.MCMapCameraInterface)).asKmp() + return (result as MapCoreSharedModule.MCMapCameraInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt index cd1097078..727a4a046 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -22,22 +22,22 @@ actual class KMMapInterface actual public constructor( actual fun getGraphicsObjectFactory(): KMGraphicsObjectFactoryInterface { val result = native.getGraphicsObjectFactory() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol).asKmp() } actual fun getShaderFactory(): KMShaderFactoryInterface { val result = native.getShaderFactory() - return requireNotNull((result as MapCoreSharedModule.MCShaderFactoryInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderFactoryInterfaceProtocol).asKmp() } actual fun getScheduler(): KMSchedulerInterface { val result = native.getScheduler() - return requireNotNull((result as MapCoreSharedModule.MCSchedulerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCSchedulerInterfaceProtocol).asKmp() } actual fun getRenderingContext(): KMRenderingContextInterface { val result = native.getRenderingContext() - return requireNotNull((result as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp() } actual fun getMapConfig(): KMMapConfig { @@ -47,7 +47,7 @@ actual class KMMapInterface actual public constructor( actual fun getCoordinateConverterHelper(): KMCoordinateConversionHelperInterface { val result = native.getCoordinateConverterHelper() - return requireNotNull((result as MapCoreSharedModule.MCCoordinateConversionHelperInterface)).asKmp() + return (result as MapCoreSharedModule.MCCoordinateConversionHelperInterface).asKmp() } actual fun setCamera(camera: KMMapCameraInterface) { @@ -56,7 +56,7 @@ actual class KMMapInterface actual public constructor( actual fun getCamera(): KMMapCameraInterface { val result = native.getCamera() - return requireNotNull((result as MapCoreSharedModule.MCMapCameraInterface)).asKmp() + return (result as MapCoreSharedModule.MCMapCameraInterface).asKmp() } actual fun setTouchHandler(touchHandler: KMTouchHandlerInterface) { @@ -65,7 +65,7 @@ actual class KMMapInterface actual public constructor( actual fun getTouchHandler(): KMTouchHandlerInterface { val result = native.getTouchHandler() - return requireNotNull((result as MapCoreSharedModule.MCTouchHandlerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTouchHandlerInterfaceProtocol).asKmp() } actual fun setPerformanceLoggers(performanceLoggers: ArrayList) { @@ -74,17 +74,17 @@ actual class KMMapInterface actual public constructor( actual fun getPerformanceLoggers(): ArrayList { val result = native.getPerformanceLoggers() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol).asKmp() })) } actual fun getLayers(): ArrayList { val result = native.getLayers() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() })) } actual fun getLayersIndexed(): ArrayList { val result = native.getLayersIndexed() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCIndexedLayerInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIndexedLayerInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCIndexedLayerInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCIndexedLayerInterfaceProtocol).asKmp() })) } actual fun addLayer(layer: KMLayerInterface) { @@ -174,12 +174,12 @@ actual class KMMapInterface actual public constructor( actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface, mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { val result = MapCoreSharedModule.MCMapInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform(), mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) - return requireNotNull((result as MapCoreSharedModule.MCMapInterface)).asKmp() + return (result as MapCoreSharedModule.MCMapInterface).asKmp() } actual fun createWithOpenGl(mapConfig: KMMapConfig, scheduler: KMSchedulerInterface, pixelDensity: Float, is3D: Boolean): KMMapInterface { val result = MapCoreSharedModule.MCMapInterface.createWithOpenGl(mapConfig.asPlatform(), scheduler.asPlatform(), pixelDensity, is3D) - return requireNotNull((result as MapCoreSharedModule.MCMapInterface)).asKmp() + return (result as MapCoreSharedModule.MCMapInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt index 89ee7635e..c9ee91639 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -24,7 +24,7 @@ private class KMMaskingObjectInterfacePlatformWrapper(internal val nativeHandle: override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } override fun renderAsMask(context: KMRenderingContextInterface, renderPass: KMRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: KMVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { @@ -41,7 +41,7 @@ private class KMMaskingObjectInterfacePlatformProxy(private val delegate: KMMask } override fun renderAsMask(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, renderPass: MapCoreSharedModule.MCRenderPassConfig, vpMatrix: Long, mMatrix: Long, origin: MapCoreSharedModule.MCVec3D, screenPixelAsRealMeterFactor: Double, isScreenSpaceCoords: Boolean) { - delegate.renderAsMask(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), (renderPass as MapCoreSharedModule.MCRenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) + delegate.renderAsMask((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (renderPass as MapCoreSharedModule.MCRenderPassConfig).asKmp(), vpMatrix, mMatrix, (origin as MapCoreSharedModule.MCVec3D).asKmp(), screenPixelAsRealMeterFactor, isScreenSpaceCoords) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt index 5195ea3f3..2e1a8e802 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -18,7 +18,7 @@ actual class KMOpenGlPerformanceLoggerInterface actual public constructor( actual fun asPerformanceLoggerInterface(): KMPerformanceLoggerInterface { val result = native.asPerformanceLoggerInterface() - return requireNotNull((result as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol).asKmp() } actual companion object @@ -26,12 +26,12 @@ actual class KMOpenGlPerformanceLoggerInterface actual public constructor( actual fun create(): KMOpenGlPerformanceLoggerInterface { val result = MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface)).asKmp() + return (result as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface).asKmp() } actual fun createSpecifically(numBuckets: Int, bucketSizeMs: Long): KMOpenGlPerformanceLoggerInterface { val result = MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface.createSpecifically(numBuckets, bucketSizeMs) - return requireNotNull((result as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface)).asKmp() + return (result as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt index 9e10752b2..365b4d13c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -32,7 +32,7 @@ private class KMOpenGlRenderTargetInterfacePlatformWrapper(internal val nativeHa override fun asRenderTargetInterface(): KMRenderTargetInterface { val result = nativeHandle.asRenderTargetInterface() - return requireNotNull((result as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCRenderTargetInterfaceProtocol).asKmp() } override fun setup(size: KMVec2I) { @@ -74,7 +74,7 @@ private class KMOpenGlRenderTargetInterfacePlatformProxy(private val delegate: K } override fun bindFramebuffer(renderingContext: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?) { - delegate.bindFramebuffer(requireNotNull((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp()) + delegate.bindFramebuffer((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp()) } override fun unbindFramebuffer() { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt index f754061a4..3a3482476 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -46,7 +46,7 @@ private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nati override fun getCreateRenderTarget(name: String, textureFilter: KMTextureFilterType, clearColor: KMColor, usesDepthStencil: Boolean): KMOpenGlRenderTargetInterface { val result = nativeHandle.getCreateRenderTarget(name, textureFilter.asPlatform(), clearColor.asPlatform(), usesDepthStencil) - return requireNotNull((result as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol).asKmp() } override fun deleteRenderTarget(name: String) { @@ -55,7 +55,7 @@ private class KMOpenGlRenderingContextInterfacePlatformWrapper(internal val nati override fun getRenderTargets(): ArrayList { val result = nativeHandle.getRenderTargets() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol).asKmp() })) } override fun getProgram(name: String): Int { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index f219a8257..2d99e9623 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -36,12 +36,12 @@ private class KMPolygon2dInterfacePlatformWrapper(internal val nativeHandle: Map override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt index 0efcda300..351691282 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -28,7 +28,7 @@ private class KMPolygonGroup2dInterfacePlatformWrapper(internal val nativeHandle override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt index e7f4791a0..8c7f6be96 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -22,7 +22,7 @@ actual class KMPolygonGroupShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt index e346132d7..30a4cabe0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -47,7 +47,7 @@ actual class KMPolygonLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual fun resetSelection() { @@ -67,7 +67,7 @@ actual class KMPolygonLayerInterface actual public constructor( actual fun create(): KMPolygonLayerInterface { val result = MapCoreSharedModule.MCPolygonLayerInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCPolygonLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCPolygonLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt index 754adebe1..9ce1a999b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -26,7 +26,7 @@ actual class KMPolygonMaskObjectInterface actual public constructor( actual fun getPolygonObject(): KMPolygon2dInterface { val result = native.getPolygonObject() - return requireNotNull((result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygon2dInterfaceProtocol).asKmp() } actual companion object @@ -34,7 +34,7 @@ actual class KMPolygonMaskObjectInterface actual public constructor( actual fun create(graphicsObjectFactory: KMGraphicsObjectFactoryInterface, conversionHelper: KMCoordinateConversionHelperInterface, is3d: Boolean): KMPolygonMaskObjectInterface { val result = MapCoreSharedModule.MCPolygonMaskObjectInterface.create(graphicsObjectFactory.asPlatform(), conversionHelper.asPlatform(), is3d) - return requireNotNull((result as MapCoreSharedModule.MCPolygonMaskObjectInterface)).asKmp() + return (result as MapCoreSharedModule.MCPolygonMaskObjectInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt index 6dc47706c..aee61c709 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -64,7 +64,7 @@ private class KMPolygonPatternGroup2dInterfacePlatformWrapper(internal val nativ override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } } @@ -92,7 +92,7 @@ private class KMPolygonPatternGroup2dInterfacePlatformProxy(private val delegate } override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { - delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + delegate.loadTexture((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt index 749ec6e18..9200c1b75 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -18,7 +18,7 @@ actual class KMPolygonPatternGroupShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt index 8347fbeec..2f7ae9174 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -84,12 +84,12 @@ private class KMQuad2dInstancedInterfacePlatformWrapper(internal val nativeHandl override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol).asKmp() } } @@ -129,7 +129,7 @@ private class KMQuad2dInstancedInterfacePlatformProxy(private val delegate: KMQu } override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { - delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + delegate.loadTexture((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt index f22f98eb1..3ff3ac673 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -54,12 +54,12 @@ private class KMQuad2dInterfacePlatformWrapper(internal val nativeHandle: MapCor override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol).asKmp() } } @@ -79,7 +79,7 @@ private class KMQuad2dInterfacePlatformProxy(private val delegate: KMQuad2dInter } override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { - delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + delegate.loadTexture((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt index 504ce67ca..52c0cfcb3 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -84,12 +84,12 @@ private class KMQuad2dStretchedInstancedInterfacePlatformWrapper(internal val na override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } override fun asMaskingObject(): KMMaskingObjectInterface { val result = nativeHandle.asMaskingObject() - return requireNotNull((result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol).asKmp() } } @@ -129,7 +129,7 @@ private class KMQuad2dStretchedInstancedInterfacePlatformProxy(private val deleg } override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { - delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + delegate.loadTexture((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt index af0ecff16..63267c274 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -22,7 +22,7 @@ actual class KMRasterShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt index 17841f80b..a44ba9d99 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -18,7 +18,7 @@ actual class KMRenderConfigInterface actual public constructor( actual fun getGraphicsObject(): KMGraphicsObjectInterface { val result = native.getGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } actual fun getRenderIndex(): Int { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt index a8a1e3379..cd94322a3 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -32,7 +32,7 @@ private class KMRenderObjectInterfacePlatformWrapper(internal val nativeHandle: override fun getGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.getGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } override fun hasCustomModelMatrix(): Boolean { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index 5621f5134..b8cbc331c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -28,5 +28,5 @@ internal fun KMRenderPassConfig.asPlatform(): MapCoreSharedModule.MCRenderPassCo internal fun MapCoreSharedModule.MCRenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( renderPassIndex = this.renderPassIndex, isPassMasked = this.isPassMasked, - renderTarget = this.renderTarget?.let { requireNotNull((it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() }, + renderTarget = this.renderTarget?.let { (it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol).asKmp() }, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt index 63a691421..b7f9c0f87 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -30,7 +30,7 @@ private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: Ma override fun getRenderObjects(): ArrayList { val result = nativeHandle.getRenderObjects() - return ArrayList(((result as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCRenderObjectInterfaceProtocol)).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderObjectInterfaceProtocol)).asKmp() })) + return ArrayList(((result as? List<*>)?.map { (it as MapCoreSharedModule.MCRenderObjectInterfaceProtocol).asKmp() } ?: (0 until (result as platform.Foundation.NSArray).count.toInt()).map { idx -> ((result as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCRenderObjectInterfaceProtocol).asKmp() })) } override fun addRenderObject(renderObject: KMRenderObjectInterface) { @@ -44,7 +44,7 @@ private class KMRenderPassInterfacePlatformWrapper(internal val nativeHandle: Ma override fun getMaskingObject(): KMMaskingObjectInterface? { val result = nativeHandle.getMaskingObject() - return result?.let { requireNotNull((it as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCMaskingObjectInterfaceProtocol).asKmp() } } override fun getScissoringRect(): KMRectI? { @@ -62,7 +62,7 @@ private class KMRenderPassInterfacePlatformProxy(private val delegate: KMRenderP } override fun addRenderObject(renderObject: MapCoreSharedModule.MCRenderObjectInterfaceProtocol?) { - delegate.addRenderObject(requireNotNull((renderObject as MapCoreSharedModule.MCRenderObjectInterfaceProtocol)).asKmp()) + delegate.addRenderObject((renderObject as MapCoreSharedModule.MCRenderObjectInterfaceProtocol).asKmp()) } override fun getRenderPassConfig(): MapCoreSharedModule.MCRenderPassConfig { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt index 02dde0b11..613124ce0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -22,7 +22,7 @@ private class KMRenderTargetInterfacePlatformWrapper(internal val nativeHandle: override fun asGlRenderTargetInterface(): KMOpenGlRenderTargetInterface? { val result = nativeHandle.asGlRenderTargetInterface() - return result?.let { requireNotNull((it as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt index 99be38df1..84d7ddfc4 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -47,19 +47,19 @@ private class KMRendererInterfacePlatformProxy(private val delegate: KMRendererI { override fun addToRenderQueue(renderPass: MapCoreSharedModule.MCRenderPassInterfaceProtocol?) { - delegate.addToRenderQueue(requireNotNull((renderPass as MapCoreSharedModule.MCRenderPassInterfaceProtocol)).asKmp()) + delegate.addToRenderQueue((renderPass as MapCoreSharedModule.MCRenderPassInterfaceProtocol).asKmp()) } override fun addToComputeQueue(computePass: MapCoreSharedModule.MCComputePassInterfaceProtocol?) { - delegate.addToComputeQueue(requireNotNull((computePass as MapCoreSharedModule.MCComputePassInterfaceProtocol)).asKmp()) + delegate.addToComputeQueue((computePass as MapCoreSharedModule.MCComputePassInterfaceProtocol).asKmp()) } override fun drawFrame(renderingContext: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, camera: MapCoreSharedModule.MCCameraInterfaceProtocol?, target: MapCoreSharedModule.MCRenderTargetInterfaceProtocol?) { - delegate.drawFrame(requireNotNull((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((camera as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp(), target?.let { requireNotNull((it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol)).asKmp() }) + delegate.drawFrame((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (camera as MapCoreSharedModule.MCCameraInterfaceProtocol).asKmp(), target?.let { (it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol).asKmp() }) } override fun compute(renderingContext: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, camera: MapCoreSharedModule.MCCameraInterfaceProtocol?) { - delegate.compute(requireNotNull((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((camera as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp()) + delegate.compute((renderingContext as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (camera as MapCoreSharedModule.MCCameraInterfaceProtocol).asKmp()) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt index 136850c49..a64f340d4 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -77,7 +77,7 @@ private class KMRenderingContextInterfacePlatformWrapper(internal val nativeHand override fun asOpenGlRenderingContext(): KMOpenGlRenderingContextInterface? { val result = nativeHandle.asOpenGlRenderingContext() - return result?.let { requireNotNull((it as MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt index 2d4819083..914362dfd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -31,7 +31,7 @@ actual class KMReverseGeocoderInterface actual public constructor( actual fun create(loader: KMLoaderInterface, tileUrlTemplate: String, zoomLevel: Int): KMReverseGeocoderInterface { val result = MapCoreSharedModule.MCReverseGeocoderInterface.create(loader.asPlatform(), tileUrlTemplate, zoomLevel) - return requireNotNull((result as MapCoreSharedModule.MCReverseGeocoderInterface)).asKmp() + return (result as MapCoreSharedModule.MCReverseGeocoderInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt index 4d5269ebe..a5436ac9b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -26,27 +26,27 @@ actual class KMSceneInterface actual public constructor( actual fun getCamera(): KMCameraInterface { val result = native.getCamera() - return requireNotNull((result as MapCoreSharedModule.MCCameraInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCCameraInterfaceProtocol).asKmp() } actual fun getRenderer(): KMRendererInterface { val result = native.getRenderer() - return requireNotNull((result as MapCoreSharedModule.MCRendererInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCRendererInterfaceProtocol).asKmp() } actual fun getRenderingContext(): KMRenderingContextInterface { val result = native.getRenderingContext() - return requireNotNull((result as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp() } actual fun getGraphicsFactory(): KMGraphicsObjectFactoryInterface { val result = native.getGraphicsFactory() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol).asKmp() } actual fun getShaderFactory(): KMShaderFactoryInterface { val result = native.getShaderFactory() - return requireNotNull((result as MapCoreSharedModule.MCShaderFactoryInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderFactoryInterfaceProtocol).asKmp() } actual fun prepare() { @@ -74,12 +74,12 @@ actual class KMSceneInterface actual public constructor( actual fun create(graphicsFactory: KMGraphicsObjectFactoryInterface, shaderFactory: KMShaderFactoryInterface, renderingContext: KMRenderingContextInterface): KMSceneInterface { val result = MapCoreSharedModule.MCSceneInterface.create(graphicsFactory.asPlatform(), shaderFactory.asPlatform(), renderingContext.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCSceneInterface)).asKmp() + return (result as MapCoreSharedModule.MCSceneInterface).asKmp() } actual fun createWithOpenGl(): KMSceneInterface { val result = MapCoreSharedModule.MCSceneInterface.createWithOpenGl() - return requireNotNull((result as MapCoreSharedModule.MCSceneInterface)).asKmp() + return (result as MapCoreSharedModule.MCSceneInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt index 0cdf9dbc2..c9441f8d5 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -85,11 +85,11 @@ private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedule { override fun addTask(task: MapCoreSharedModule.MCTaskInterfaceProtocol?) { - delegate.addTask(requireNotNull((task as MapCoreSharedModule.MCTaskInterfaceProtocol)).asKmp()) + delegate.addTask((task as MapCoreSharedModule.MCTaskInterfaceProtocol).asKmp()) } override fun addTasks(tasks: List<*>) { - delegate.addTasks(ArrayList(((tasks as? List<*>)?.map { requireNotNull((it as MapCoreSharedModule.MCTaskInterfaceProtocol)).asKmp() } ?: (0 until (tasks as platform.Foundation.NSArray).count.toInt()).map { idx -> requireNotNull(((tasks as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCTaskInterfaceProtocol)).asKmp() }))) + delegate.addTasks(ArrayList(((tasks as? List<*>)?.map { (it as MapCoreSharedModule.MCTaskInterfaceProtocol).asKmp() } ?: (0 until (tasks as platform.Foundation.NSArray).count.toInt()).map { idx -> ((tasks as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCTaskInterfaceProtocol).asKmp() }))) } override fun removeTask(id: String) { @@ -123,7 +123,7 @@ private class KMSchedulerInterfacePlatformProxy(private val delegate: KMSchedule } override fun setSchedulerGraphicsTaskCallbacks(callbacks: MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks?) { - delegate.setSchedulerGraphicsTaskCallbacks(requireNotNull((callbacks as MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks)).asKmp()) + delegate.setSchedulerGraphicsTaskCallbacks((callbacks as MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks).asKmp()) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index 0af65d5fe..396eaf9b1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -74,137 +74,137 @@ private class KMShaderFactoryInterfacePlatformWrapper(internal val nativeHandle: override fun createAlphaShader(): KMAlphaShaderInterface { val result = nativeHandle.createAlphaShader() - return requireNotNull((result as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol).asKmp() } override fun createUnitSphereAlphaShader(): KMAlphaShaderInterface { val result = nativeHandle.createUnitSphereAlphaShader() - return requireNotNull((result as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol).asKmp() } override fun createAlphaInstancedShader(): KMAlphaInstancedShaderInterface { val result = nativeHandle.createAlphaInstancedShader() - return requireNotNull((result as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol).asKmp() } override fun createUnitSphereAlphaInstancedShader(): KMAlphaInstancedShaderInterface { val result = nativeHandle.createUnitSphereAlphaInstancedShader() - return requireNotNull((result as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol).asKmp() } override fun createLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createLineGroupShader() - return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol).asKmp() } override fun createUnitSphereLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createUnitSphereLineGroupShader() - return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol).asKmp() } override fun createSimpleLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createSimpleLineGroupShader() - return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol).asKmp() } override fun createUnitSphereSimpleLineGroupShader(): KMLineGroupShaderInterface { val result = nativeHandle.createUnitSphereSimpleLineGroupShader() - return requireNotNull((result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol).asKmp() } override fun createUnitSphereColorShader(): KMColorShaderInterface { val result = nativeHandle.createUnitSphereColorShader() - return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCColorShaderInterfaceProtocol).asKmp() } override fun createColorShader(): KMColorShaderInterface { val result = nativeHandle.createColorShader() - return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCColorShaderInterfaceProtocol).asKmp() } override fun createPolygonTessellatedShader(unitSphere: Boolean): KMColorShaderInterface { val result = nativeHandle.createPolygonTessellatedShader(unitSphere) - return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCColorShaderInterfaceProtocol).asKmp() } override fun createColorCircleShader(): KMColorCircleShaderInterface { val result = nativeHandle.createColorCircleShader() - return requireNotNull((result as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol).asKmp() } override fun createUnitSphereColorCircleShader(): KMColorCircleShaderInterface { val result = nativeHandle.createUnitSphereColorCircleShader() - return requireNotNull((result as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol).asKmp() } override fun createPolygonGroupShader(isStriped: Boolean, unitSphere: Boolean): KMPolygonGroupShaderInterface { val result = nativeHandle.createPolygonGroupShader(isStriped, unitSphere) - return requireNotNull((result as MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol).asKmp() } override fun createPolygonPatternGroupShader(fadeInPattern: Boolean, unitSphere: Boolean): KMPolygonPatternGroupShaderInterface { val result = nativeHandle.createPolygonPatternGroupShader(fadeInPattern, unitSphere) - return requireNotNull((result as MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol).asKmp() } override fun createTextShader(): KMTextShaderInterface { val result = nativeHandle.createTextShader() - return requireNotNull((result as MapCoreSharedModule.MCTextShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTextShaderInterfaceProtocol).asKmp() } override fun createTextInstancedShader(): KMTextInstancedShaderInterface { val result = nativeHandle.createTextInstancedShader() - return requireNotNull((result as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol).asKmp() } override fun createUnitSphereTextInstancedShader(): KMTextInstancedShaderInterface { val result = nativeHandle.createUnitSphereTextInstancedShader() - return requireNotNull((result as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol).asKmp() } override fun createRasterShader(): KMRasterShaderInterface { val result = nativeHandle.createRasterShader() - return requireNotNull((result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol).asKmp() } override fun createUnitSphereRasterShader(): KMRasterShaderInterface { val result = nativeHandle.createUnitSphereRasterShader() - return requireNotNull((result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol).asKmp() } override fun createQuadTessellatedShader(): KMRasterShaderInterface { val result = nativeHandle.createQuadTessellatedShader() - return requireNotNull((result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCRasterShaderInterfaceProtocol).asKmp() } override fun createStretchShader(): KMStretchShaderInterface { val result = nativeHandle.createStretchShader() - return requireNotNull((result as MapCoreSharedModule.MCStretchShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCStretchShaderInterfaceProtocol).asKmp() } override fun createStretchInstancedShader(unitSphere: Boolean): KMStretchInstancedShaderInterface { val result = nativeHandle.createStretchInstancedShader(unitSphere) - return requireNotNull((result as MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol).asKmp() } override fun createIcosahedronColorShader(): KMColorShaderInterface { val result = nativeHandle.createIcosahedronColorShader() - return requireNotNull((result as MapCoreSharedModule.MCColorShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCColorShaderInterfaceProtocol).asKmp() } override fun createSphereEffectShader(): KMSphereEffectShaderInterface { val result = nativeHandle.createSphereEffectShader() - return requireNotNull((result as MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol).asKmp() } override fun createSkySphereShader(): KMSkySphereShaderInterface { val result = nativeHandle.createSkySphereShader() - return requireNotNull((result as MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol).asKmp() } override fun createElevationInterpolationShader(): KMElevationInterpolationShaderInterface { val result = nativeHandle.createElevationInterpolationShader() - return requireNotNull((result as MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt index 60bf10007..a414e21cf 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -18,7 +18,7 @@ actual class KMSkySphereLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual fun setTexture(texture: KMTextureHolderInterface) { @@ -30,7 +30,7 @@ actual class KMSkySphereLayerInterface actual public constructor( actual fun create(): KMSkySphereLayerInterface { val result = MapCoreSharedModule.MCSkySphereLayerInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCSkySphereLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCSkySphereLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt index 14b474e85..8f13101f4 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -18,7 +18,7 @@ actual class KMSkySphereShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } actual fun setCameraProperties(inverseVP: ArrayList, cameraPosition: KMVec3D) { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt index ce955c9e8..547cbbae3 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -18,7 +18,7 @@ actual class KMSphereEffectLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual companion object @@ -26,7 +26,7 @@ actual class KMSphereEffectLayerInterface actual public constructor( actual fun create(): KMSphereEffectLayerInterface { val result = MapCoreSharedModule.MCSphereEffectLayerInterface.create() - return requireNotNull((result as MapCoreSharedModule.MCSphereEffectLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCSphereEffectLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt index 8d77fdc95..3887ab1ce 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -18,7 +18,7 @@ actual class KMSphereEffectShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } actual fun setEllipse(coefficients: KMSharedBytes) { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt index c3e3fd518..48203ca40 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -18,7 +18,7 @@ actual class KMStretchInstancedShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt index 1102f0343..b3ba4d404 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -26,7 +26,7 @@ actual class KMStretchShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt index de54dffb7..02d594c9f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -21,7 +21,7 @@ actual class KMTextFactory actual public constructor( actual fun createText(text: ArrayList, coordinate: KMCoord, font: KMFont, textAnchor: KMAnchor, textJustify: KMTextJustify): KMTextInfoInterface { val result = MapCoreSharedModule.MCTextFactory.createText(ArrayList(text.map { it.asPlatform() }), coordinate.asPlatform(), font.asPlatform(), textAnchor.asPlatform(), textJustify.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCTextInfoInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTextInfoInterfaceProtocol).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt index e0eedeeb3..abfe13236 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -94,7 +94,7 @@ private class KMTextInstancedInterfacePlatformWrapper(internal val nativeHandle: override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } } @@ -142,7 +142,7 @@ private class KMTextInstancedInterfacePlatformProxy(private val delegate: KMText } override fun loadFont(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, fontData: MapCoreSharedModule.MCFontData, fontMsdfTexture: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { - delegate.loadFont(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), (fontData as MapCoreSharedModule.MCFontData).asKmp(), requireNotNull((fontMsdfTexture as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + delegate.loadFont((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (fontData as MapCoreSharedModule.MCFontData).asKmp(), (fontMsdfTexture as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt index 8a4f9f79e..65fcc9abe 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -18,7 +18,7 @@ actual class KMTextInstancedShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt index abf4f879c..11e4048dc 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -40,7 +40,7 @@ private class KMTextInterfacePlatformWrapper(internal val nativeHandle: MapCoreS override fun asGraphicsObject(): KMGraphicsObjectInterface { val result = nativeHandle.asGraphicsObject() - return requireNotNull((result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol).asKmp() } } @@ -52,7 +52,7 @@ private class KMTextInterfacePlatformProxy(private val delegate: KMTextInterface } override fun loadTexture(context: MapCoreSharedModule.MCRenderingContextInterfaceProtocol?, textureHolder: MapCoreSharedModule.MCTextureHolderInterfaceProtocol?) { - delegate.loadTexture(requireNotNull((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol)).asKmp(), requireNotNull((textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp()) + delegate.loadTexture((context as MapCoreSharedModule.MCRenderingContextInterfaceProtocol).asKmp(), (textureHolder as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp()) } override fun removeTexture() { diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt index cb3c83510..c8e83cb28 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -22,7 +22,7 @@ actual class KMTextLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual fun invalidate() { @@ -34,7 +34,7 @@ actual class KMTextLayerInterface actual public constructor( actual fun create(fontLoader: KMFontLoaderInterface): KMTextLayerInterface { val result = MapCoreSharedModule.MCTextLayerInterface.create(fontLoader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCTextLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCTextLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt index 678cd90ec..9c40d4e91 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -30,7 +30,7 @@ actual class KMTextShaderInterface actual public constructor( actual fun asShaderProgramInterface(): KMShaderProgramInterface { val result = native.asShaderProgramInterface() - return requireNotNull((result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCShaderProgramInterfaceProtocol).asKmp() } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index 9d2489576..20865e13d 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -24,5 +24,5 @@ internal fun KMTextureAtlas.asPlatform(): MapCoreSharedModule.MCTextureAtlas = M ) internal fun MapCoreSharedModule.MCTextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( uvMap = HashMap(((this.uvMap as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.uvMap as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.uvMap as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), - texture = this.texture?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, + texture = this.texture?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index e41ae6e54..b0c17d2a0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -29,7 +29,7 @@ internal fun KMTextureLoaderResult.asPlatform(): MapCoreSharedModule.MCTextureLo errorCode = errorCode?.let { it }, ) internal fun MapCoreSharedModule.MCTextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( - data = this.data?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, + data = this.data?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, etag = this.etag?.let { (it as String) }, status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), errorCode = this.errorCode?.let { (it as String) }, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt index 499b24c71..5c695596d 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -21,7 +21,7 @@ actual class KMThreadPoolScheduler actual public constructor( actual fun create(): KMSchedulerInterface { val result = MapCoreSharedModule.MCThreadPoolScheduler.create() - return requireNotNull((result as MapCoreSharedModule.MCSchedulerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCSchedulerInterfaceProtocol).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt index 345a771f4..149e1a30b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -18,7 +18,7 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual fun setCallbackHandler(handler: KMTiled2dMapRasterLayerCallbackInterface) { @@ -27,7 +27,7 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun getCallbackHandler(): KMTiled2dMapRasterLayerCallbackInterface? { val result = native.getCallbackHandler() - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol).asKmp() } } actual fun removeCallbackHandler() { @@ -84,7 +84,7 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun getConfig(): KMTiled2dMapLayerConfig { val result = native.getConfig() - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } actual fun set3dSubdivisionFactor(factor: Int) { @@ -100,17 +100,17 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( actual fun createWithMask(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, mask: KMMaskingObjectInterface): KMTiled2dMapRasterLayerInterface { val result = MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.createWithMask(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), mask.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface).asKmp() } actual fun createWithShader(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList, shader: KMShaderProgramInterface): KMTiled2dMapRasterLayerInterface { val result = MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.createWithShader(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() }), shader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface).asKmp() } actual fun create(layerConfig: KMTiled2dMapLayerConfig, loaders: ArrayList): KMTiled2dMapRasterLayerInterface { val result = MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.create(layerConfig.asPlatform(), ArrayList(loaders.map { it.asPlatform() })) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index 799db7e02..d25b657d6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -24,5 +24,5 @@ internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): MapCoreSharedModule.MCTil ) internal fun MapCoreSharedModule.MCTiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( featureIdentifiersUv = HashMap(((this.featureIdentifiersUv as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.featureIdentifiersUv as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.featureIdentifiersUv as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), - texture = this.texture?.let { requireNotNull((it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol)).asKmp() }, + texture = this.texture?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt index a2f9f4211..e4ebf82e8 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -22,7 +22,7 @@ actual class KMTiled2dMapVectorLayerInterface actual public constructor( actual fun asLayerInterface(): KMLayerInterface { val result = native.asLayerInterface() - return requireNotNull((result as MapCoreSharedModule.MCLayerInterfaceProtocol)).asKmp() + return (result as MapCoreSharedModule.MCLayerInterfaceProtocol).asKmp() } actual fun setMinZoomLevelIdentifier(value: Int?) { @@ -82,12 +82,12 @@ actual class KMTiled2dMapVectorLayerInterface actual public constructor( actual fun createFromStyleJson(layerName: String, styleJsonUrl: String, loaders: ArrayList, fontLoader: KMFontLoaderInterface): KMTiled2dMapVectorLayerInterface { val result = MapCoreSharedModule.MCTiled2dMapVectorLayerInterface.createFromStyleJson(layerName, styleJsonUrl, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform()) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface).asKmp() } actual fun createExplicitly(layerName: String, styleJson: String?, localStyleJson: Boolean?, loaders: ArrayList, fontLoader: KMFontLoaderInterface, localDataProvider: KMTiled2dMapVectorLayerLocalDataProviderInterface?, customZoomInfo: KMTiled2dMapZoomInfo?, symbolDelegate: KMTiled2dMapVectorLayerSymbolDelegateInterface?, sourceUrlParams: HashMap?): KMTiled2dMapVectorLayerInterface { val result = MapCoreSharedModule.MCTiled2dMapVectorLayerInterface.createExplicitly(layerName, styleJson?.let { it }, localStyleJson?.let { platform.Foundation.NSNumber(bool = it) }, ArrayList(loaders.map { it.asPlatform() }), fontLoader.asPlatform(), localDataProvider?.let { it.asPlatform() }, customZoomInfo?.let { it.asPlatform() }, symbolDelegate?.let { it.asPlatform() }, sourceUrlParams?.let { HashMap(it.map { it.key to it.value }.toMap()) }) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt index 5b80fd4db..eaae3c5eb 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -51,15 +51,15 @@ private class KMTouchHandlerInterfacePlatformProxy(private val delegate: KMTouch } override fun insertListener(listener: MapCoreSharedModule.MCTouchInterfaceProtocol?, index: Int) { - delegate.insertListener(requireNotNull((listener as MapCoreSharedModule.MCTouchInterfaceProtocol)).asKmp(), index) + delegate.insertListener((listener as MapCoreSharedModule.MCTouchInterfaceProtocol).asKmp(), index) } override fun addListener(listener: MapCoreSharedModule.MCTouchInterfaceProtocol?) { - delegate.addListener(requireNotNull((listener as MapCoreSharedModule.MCTouchInterfaceProtocol)).asKmp()) + delegate.addListener((listener as MapCoreSharedModule.MCTouchInterfaceProtocol).asKmp()) } override fun removeListener(listener: MapCoreSharedModule.MCTouchInterfaceProtocol?) { - delegate.removeListener(requireNotNull((listener as MapCoreSharedModule.MCTouchInterfaceProtocol)).asKmp()) + delegate.removeListener((listener as MapCoreSharedModule.MCTouchInterfaceProtocol).asKmp()) } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt index bb1f0f28c..7701c3fad 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -18,42 +18,42 @@ actual class KMWmtsCapabilitiesResource actual public constructor( actual fun createLayer(identifier: String, tileLoaders: ArrayList): KMTiled2dMapRasterLayerInterface? { val result = native.createLayer(identifier, ArrayList(tileLoaders.map { it.asPlatform() })) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerTimed(identifier: String, tileLoaders: ArrayList, numT: Int): KMTiled2dMapRasterLayerInterface? { val result = native.createLayerTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), numT) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerWithZoomInfo(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapRasterLayerInterface? { val result = native.createLayerWithZoomInfo(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform()) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerWithZoomInfoTimed(identifier: String, tileLoaders: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapRasterLayerInterface? { val result = native.createLayerWithZoomInfoTimed(identifier, ArrayList(tileLoaders.map { it.asPlatform() }), zoomInfo.asPlatform(), numT) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface).asKmp() } } actual fun createLayerConfig(identifier: String): KMTiled2dMapLayerConfig? { val result = native.createLayerConfig(identifier) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } } actual fun createLayerConfigTimed(identifier: String, numT: Int): KMTiled2dMapLayerConfig? { val result = native.createLayerConfigTimed(identifier, numT) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } } actual fun createLayerConfigWithZoomInfo(identifier: String, zoomInfo: KMTiled2dMapZoomInfo): KMTiled2dMapLayerConfig? { val result = native.createLayerConfigWithZoomInfo(identifier, zoomInfo.asPlatform()) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } } actual fun createLayerConfigWithZoomInfoTimed(identifier: String, zoomInfo: KMTiled2dMapZoomInfo, numT: Int): KMTiled2dMapLayerConfig? { val result = native.createLayerConfigWithZoomInfoTimed(identifier, zoomInfo.asPlatform(), numT) - return result?.let { requireNotNull((it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() } + return result?.let { (it as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } } actual fun getAllLayers(): ArrayList { @@ -66,7 +66,7 @@ actual class KMWmtsCapabilitiesResource actual public constructor( actual fun create(xml: String): KMWmtsCapabilitiesResource { val result = MapCoreSharedModule.MCWmtsCapabilitiesResource.create(xml) - return requireNotNull((result as MapCoreSharedModule.MCWmtsCapabilitiesResource)).asKmp() + return (result as MapCoreSharedModule.MCWmtsCapabilitiesResource).asKmp() } } } diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt index 19e36ab3d..dc809094b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -21,7 +21,7 @@ actual class KMWmtsTiled2dMapLayerConfigFactory actual public constructor( actual fun create(wmtsLayerConfiguration: KMWmtsLayerDescription, zoomLevelInfo: ArrayList, zoomInfo: KMTiled2dMapZoomInfo, coordinateSystemIdentifier: Int, matrixSetIdentifier: String): KMTiled2dMapLayerConfig { val result = MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory.create(wmtsLayerConfiguration.asPlatform(), ArrayList(zoomLevelInfo.map { it.asPlatform() }), zoomInfo.asPlatform(), coordinateSystemIdentifier, matrixSetIdentifier) - return requireNotNull((result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol)).asKmp() + return (result as MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol).asKmp() } } } diff --git a/external/djinni b/external/djinni index f5abee5d4..33e7f6496 160000 --- a/external/djinni +++ b/external/djinni @@ -1 +1 @@ -Subproject commit f5abee5d4f487a1147e87fadd1e9a84c919abf55 +Subproject commit 33e7f6496194cd727a268eecc9d0904459635ec4 From 833284f1381cdac3c958b26b3a52fa9e18d2dd65 Mon Sep 17 00:00:00 2001 From: Christoph Maurhofer Date: Tue, 10 Feb 2026 16:41:42 +0100 Subject: [PATCH 61/63] Add Android interop functions, update djinni and generated files to expose asKmp --- .../kmp/KMAlphaInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMAlphaShaderInterface.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMAnchor.kt | 2 +- .../mapscore/kmp/KMBlendMode.kt | 2 +- .../mapscore/kmp/KMBoundingBoxInterface.kt | 2 +- .../mapscore/kmp/KMCamera3dConfig.kt | 2 +- .../mapscore/kmp/KMCamera3dConfigFactory.kt | 2 +- .../mapscore/kmp/KMCameraInterface.kt | 2 +- .../mapscore/kmp/KMCameraInterpolation.kt | 2 +- .../kmp/KMCameraInterpolationValue.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMCircleD.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMCircleF.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMCircleI.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMColor.kt | 2 +- .../kmp/KMColorCircleShaderInterface.kt | 2 +- .../mapscore/kmp/KMColorShaderInterface.kt | 2 +- .../mapscore/kmp/KMColorStateList.kt | 2 +- .../mapscore/kmp/KMComputeObjectInterface.kt | 2 +- .../mapscore/kmp/KMComputePassInterface.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMCoord.kt | 2 +- .../KMCoordinateConversionHelperInterface.kt | 2 +- .../kmp/KMCoordinateConverterInterface.kt | 2 +- .../mapscore/kmp/KMCoordinateSystemFactory.kt | 2 +- .../kmp/KMCoordinateSystemIdentifiers.kt | 2 +- .../kmp/KMCpuPerformanceLoggerInterface.kt | 2 +- .../mapscore/kmp/KMDataLoaderResult.kt | 2 +- .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 2 +- .../kmp/KMDefaultTouchHandlerInterface.kt | 2 +- ...KMElevationInterpolationShaderInterface.kt | 2 +- .../mapscore/kmp/KMErrorManager.kt | 2 +- .../mapscore/kmp/KMErrorManagerListener.kt | 2 +- .../kmp/KMExceptionLoggerDelegateInterface.kt | 2 +- .../kmp/KMExceptionLoggerInterface.kt | 2 +- .../mapscore/kmp/KMExecutionEnvironment.kt | 2 +- .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMFont.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMFontData.kt | 2 +- .../mapscore/kmp/KMFontGlyph.kt | 2 +- .../mapscore/kmp/KMFontLoaderInterface.kt | 2 +- .../mapscore/kmp/KMFontLoaderResult.kt | 2 +- .../mapscore/kmp/KMFontWrapper.kt | 2 +- .../mapscore/kmp/KMFormattedStringEntry.kt | 2 +- .../kmp/KMGeoJsonFeatureParserInterface.kt | 2 +- .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 2 +- .../mapscore/kmp/KMGeoJsonLine.kt | 2 +- .../mapscore/kmp/KMGeoJsonPoint.kt | 2 +- .../mapscore/kmp/KMGlyphDescription.kt | 2 +- .../kmp/KMGraphicsObjectFactoryInterface.kt | 2 +- .../mapscore/kmp/KMGraphicsObjectInterface.kt | 2 +- .../mapscore/kmp/KMIconFactory.kt | 2 +- .../mapscore/kmp/KMIconInfoInterface.kt | 2 +- .../kmp/KMIconLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMIconLayerInterface.kt | 2 +- .../mapscore/kmp/KMIconTextFit.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMIconType.kt | 2 +- .../mapscore/kmp/KMIcosahedronInterface.kt | 2 +- .../KMIcosahedronLayerCallbackInterface.kt | 2 +- .../kmp/KMIcosahedronLayerInterface.kt | 2 +- .../mapscore/kmp/KMIndexedLayerInterface.kt | 2 +- .../mapscore/kmp/KMLayerInterface.kt | 2 +- .../mapscore/kmp/KMLayerObjectInterface.kt | 2 +- .../mapscore/kmp/KMLayerReadyState.kt | 2 +- .../mapscore/kmp/KMLineCapType.kt | 2 +- .../mapscore/kmp/KMLineFactory.kt | 2 +- .../mapscore/kmp/KMLineGroup2dInterface.kt | 2 +- .../kmp/KMLineGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMLineInfoInterface.kt | 2 +- .../mapscore/kmp/KMLineJoinType.kt | 2 +- .../kmp/KMLineLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMLineLayerInterface.kt | 2 +- .../mapscore/kmp/KMLineStyle.kt | 2 +- .../mapscore/kmp/KMLoaderInterface.kt | 2 +- .../mapscore/kmp/KMLoaderStatus.kt | 2 +- .../mapscore/kmp/KMLoggerData.kt | 2 +- .../mapscore/kmp/KMMapCallbackInterface.kt | 2 +- .../mapscore/kmp/KMMapCamera3dInterface.kt | 2 +- .../mapscore/kmp/KMMapCameraInterface.kt | 2 +- .../kmp/KMMapCameraListenerInterface.kt | 2 +- .../mapscore/kmp/KMMapConfig.kt | 2 +- .../mapscore/kmp/KMMapCoordinateSystem.kt | 2 +- .../mapscore/kmp/KMMapInterface.kt | 2 +- .../kmp/KMMapReadyCallbackInterface.kt | 2 +- .../mapscore/kmp/KMMapsCoreSharedModule.kt | 2 +- .../mapscore/kmp/KMMaskingObjectInterface.kt | 2 +- .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 2 +- .../kmp/KMOpenGlRenderTargetInterface.kt | 2 +- .../kmp/KMOpenGlRenderingContextInterface.kt | 2 +- .../kmp/KMPerformanceLoggerInterface.kt | 2 +- .../mapscore/kmp/KMPolygon2dInterface.kt | 2 +- .../mapscore/kmp/KMPolygonCoord.kt | 2 +- .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 2 +- .../kmp/KMPolygonGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMPolygonInfo.kt | 2 +- .../kmp/KMPolygonLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMPolygonLayerInterface.kt | 2 +- .../kmp/KMPolygonMaskObjectInterface.kt | 2 +- .../kmp/KMPolygonPatternGroup2dInterface.kt | 2 +- .../KMPolygonPatternGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMPolygonStyle.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 2 +- .../kmp/KMQuad2dInstancedInterface.kt | 2 +- .../mapscore/kmp/KMQuad2dInterface.kt | 2 +- .../KMQuad2dStretchedInstancedInterface.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 2 +- .../mapscore/kmp/KMQuadCoord.kt | 2 +- .../mapscore/kmp/KMRasterShaderInterface.kt | 2 +- .../mapscore/kmp/KMRasterShaderStyle.kt | 2 +- .../mapscore/kmp/KMRectCoord.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMRectD.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMRectF.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMRectI.kt | 2 +- .../mapscore/kmp/KMRectanglePacker.kt | 2 +- .../mapscore/kmp/KMRectanglePackerPage.kt | 2 +- .../mapscore/kmp/KMRenderConfigInterface.kt | 2 +- .../mapscore/kmp/KMRenderLineDescription.kt | 2 +- .../mapscore/kmp/KMRenderObjectInterface.kt | 2 +- .../mapscore/kmp/KMRenderPassConfig.kt | 2 +- .../mapscore/kmp/KMRenderPassInterface.kt | 2 +- .../mapscore/kmp/KMRenderTargetInterface.kt | 2 +- .../kmp/KMRenderVerticesDescription.kt | 2 +- .../mapscore/kmp/KMRendererInterface.kt | 2 +- .../kmp/KMRenderingContextInterface.kt | 2 +- .../mapscore/kmp/KMRenderingCullMode.kt | 2 +- .../kmp/KMReverseGeocoderInterface.kt | 2 +- .../mapscore/kmp/KMSceneCallbackInterface.kt | 2 +- .../mapscore/kmp/KMSceneInterface.kt | 2 +- .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 2 +- .../mapscore/kmp/KMSchedulerInterface.kt | 2 +- .../mapscore/kmp/KMShaderFactoryInterface.kt | 2 +- .../mapscore/kmp/KMShaderProgramInterface.kt | 2 +- .../mapscore/kmp/KMSharedBytes.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMSizeType.kt | 2 +- .../mapscore/kmp/KMSkySphereLayerInterface.kt | 2 +- .../kmp/KMSkySphereShaderInterface.kt | 2 +- .../kmp/KMSphereEffectLayerInterface.kt | 2 +- .../kmp/KMSphereEffectShaderInterface.kt | 2 +- .../kmp/KMStretchInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMStretchShaderInfo.kt | 2 +- .../mapscore/kmp/KMStretchShaderInterface.kt | 2 +- .../mapscore/kmp/KMSymbolAlignment.kt | 2 +- .../mapscore/kmp/KMSymbolZOrder.kt | 2 +- .../mapscore/kmp/KMTaskConfig.kt | 2 +- .../mapscore/kmp/KMTaskInterface.kt | 2 +- .../mapscore/kmp/KMTaskPriority.kt | 2 +- .../mapscore/kmp/KMTessellationMode.kt | 2 +- .../mapscore/kmp/KMTextDescription.kt | 2 +- .../mapscore/kmp/KMTextFactory.kt | 2 +- .../mapscore/kmp/KMTextInfoInterface.kt | 2 +- .../mapscore/kmp/KMTextInstancedInterface.kt | 2 +- .../kmp/KMTextInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextInterface.kt | 2 +- .../mapscore/kmp/KMTextJustify.kt | 2 +- .../mapscore/kmp/KMTextLayerInterface.kt | 2 +- .../mapscore/kmp/KMTextShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextSymbolPlacement.kt | 2 +- .../mapscore/kmp/KMTextureAtlas.kt | 2 +- .../mapscore/kmp/KMTextureFilterType.kt | 2 +- .../mapscore/kmp/KMTextureHolderInterface.kt | 2 +- .../mapscore/kmp/KMTextureLoaderResult.kt | 2 +- .../mapscore/kmp/KMThreadPoolScheduler.kt | 2 +- .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 2 +- ...MTiled2dMapRasterLayerCallbackInterface.kt | 2 +- .../kmp/KMTiled2dMapRasterLayerInterface.kt | 2 +- .../kmp/KMTiled2dMapReadyStateListener.kt | 2 +- .../kmp/KMTiled2dMapSourceInterface.kt | 2 +- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 2 +- .../kmp/KMTiled2dMapVectorLayerInterface.kt | 2 +- ...apVectorLayerLocalDataProviderInterface.kt | 2 +- ...apVectorLayerSelectionCallbackInterface.kt | 2 +- ...2dMapVectorLayerSymbolDelegateInterface.kt | 2 +- .../kmp/KMTiled2dMapVectorSettings.kt | 2 +- .../kmp/KMTiled2dMapVectorTileOrigin.kt | 2 +- .../mapscore/kmp/KMTiled2dMapZoomInfo.kt | 2 +- .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 2 +- .../mapscore/kmp/KMTiledLayerError.kt | 2 +- .../mapscore/kmp/KMTouchAction.kt | 2 +- .../mapscore/kmp/KMTouchEvent.kt | 2 +- .../mapscore/kmp/KMTouchHandlerInterface.kt | 2 +- .../mapscore/kmp/KMTouchInterface.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 2 +- .../kmp/KMVectorLayerFeatureCoordInfo.kt | 2 +- .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 2 +- .../kmp/KMVectorLayerFeatureInfoValue.kt | 2 +- .../kmp/KMWmtsCapabilitiesResource.kt | 2 +- .../mapscore/kmp/KMWmtsLayerDescription.kt | 2 +- .../mapscore/kmp/KMWmtsLayerDimension.kt | 2 +- .../mapscore/kmp/KMWmtsTileMatrix.kt | 2 +- .../mapscore/kmp/KMWmtsTileMatrixSet.kt | 2 +- .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 2 +- .../kmp/KMAlphaInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMAlphaShaderInterface.kt | 2 +- .../mapscore/kmp/KMBoundingBoxInterface.kt | 2 +- .../mapscore/kmp/KMCamera3dConfig.kt | 2 +- .../mapscore/kmp/KMCamera3dConfigFactory.kt | 2 +- .../mapscore/kmp/KMCameraInterface.kt | 2 +- .../mapscore/kmp/KMCameraInterpolation.kt | 2 +- .../kmp/KMCameraInterpolationValue.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMCircleD.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMCircleF.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMCircleI.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMColor.kt | 2 +- .../kmp/KMColorCircleShaderInterface.kt | 2 +- .../mapscore/kmp/KMColorShaderInterface.kt | 2 +- .../mapscore/kmp/KMColorStateList.kt | 2 +- .../mapscore/kmp/KMComputeObjectInterface.kt | 2 +- .../mapscore/kmp/KMComputePassInterface.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMCoord.kt | 2 +- .../KMCoordinateConversionHelperInterface.kt | 2 +- .../kmp/KMCoordinateConverterInterface.kt | 2 +- .../mapscore/kmp/KMCoordinateSystemFactory.kt | 2 +- .../kmp/KMCoordinateSystemIdentifiers.kt | 2 +- .../kmp/KMCpuPerformanceLoggerInterface.kt | 2 +- .../mapscore/kmp/KMDataLoaderResult.kt | 2 +- .../kmp/KMDefaultTiled2dMapLayerConfigs.kt | 2 +- .../kmp/KMDefaultTouchHandlerInterface.kt | 2 +- ...KMElevationInterpolationShaderInterface.kt | 2 +- .../mapscore/kmp/KMErrorManager.kt | 2 +- .../mapscore/kmp/KMErrorManagerListener.kt | 2 +- .../kmp/KMExceptionLoggerDelegateInterface.kt | 2 +- .../kmp/KMExceptionLoggerInterface.kt | 2 +- .../mapscore/kmp/KMFeatureInfoValueFactory.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMFont.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMFontData.kt | 2 +- .../mapscore/kmp/KMFontGlyph.kt | 2 +- .../mapscore/kmp/KMFontLoaderInterface.kt | 2 +- .../mapscore/kmp/KMFontLoaderResult.kt | 2 +- .../mapscore/kmp/KMFontWrapper.kt | 2 +- .../mapscore/kmp/KMFormattedStringEntry.kt | 2 +- .../kmp/KMGeoJsonFeatureParserInterface.kt | 2 +- .../mapscore/kmp/KMGeoJsonHelperInterface.kt | 2 +- .../mapscore/kmp/KMGeoJsonLine.kt | 2 +- .../mapscore/kmp/KMGeoJsonPoint.kt | 2 +- .../mapscore/kmp/KMGlyphDescription.kt | 2 +- .../kmp/KMGraphicsObjectFactoryInterface.kt | 2 +- .../mapscore/kmp/KMGraphicsObjectInterface.kt | 2 +- .../mapscore/kmp/KMIconFactory.kt | 2 +- .../mapscore/kmp/KMIconInfoInterface.kt | 2 +- .../kmp/KMIconLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMIconLayerInterface.kt | 2 +- .../mapscore/kmp/KMIcosahedronInterface.kt | 2 +- .../KMIcosahedronLayerCallbackInterface.kt | 2 +- .../kmp/KMIcosahedronLayerInterface.kt | 2 +- .../mapscore/kmp/KMIndexedLayerInterface.kt | 2 +- .../mapscore/kmp/KMLayerInterface.kt | 2 +- .../mapscore/kmp/KMLayerObjectInterface.kt | 2 +- .../mapscore/kmp/KMLineFactory.kt | 2 +- .../mapscore/kmp/KMLineGroup2dInterface.kt | 2 +- .../kmp/KMLineGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMLineInfoInterface.kt | 2 +- .../kmp/KMLineLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMLineLayerInterface.kt | 2 +- .../mapscore/kmp/KMLineStyle.kt | 2 +- .../mapscore/kmp/KMLoaderInterface.kt | 2 +- .../mapscore/kmp/KMLoggerData.kt | 2 +- .../mapscore/kmp/KMMapCallbackInterface.kt | 2 +- .../mapscore/kmp/KMMapCamera3dInterface.kt | 2 +- .../mapscore/kmp/KMMapCameraInterface.kt | 2 +- .../kmp/KMMapCameraListenerInterface.kt | 2 +- .../mapscore/kmp/KMMapConfig.kt | 2 +- .../mapscore/kmp/KMMapCoordinateSystem.kt | 2 +- .../mapscore/kmp/KMMapInterface.kt | 2 +- .../kmp/KMMapReadyCallbackInterface.kt | 2 +- .../mapscore/kmp/KMMapsCoreSharedModule.kt | 2 +- .../mapscore/kmp/KMMaskingObjectInterface.kt | 2 +- .../kmp/KMOpenGlPerformanceLoggerInterface.kt | 2 +- .../kmp/KMOpenGlRenderTargetInterface.kt | 2 +- .../kmp/KMOpenGlRenderingContextInterface.kt | 2 +- .../kmp/KMPerformanceLoggerInterface.kt | 2 +- .../mapscore/kmp/KMPolygon2dInterface.kt | 2 +- .../mapscore/kmp/KMPolygonCoord.kt | 2 +- .../mapscore/kmp/KMPolygonGroup2dInterface.kt | 2 +- .../kmp/KMPolygonGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMPolygonInfo.kt | 2 +- .../kmp/KMPolygonLayerCallbackInterface.kt | 2 +- .../mapscore/kmp/KMPolygonLayerInterface.kt | 2 +- .../kmp/KMPolygonMaskObjectInterface.kt | 2 +- .../kmp/KMPolygonPatternGroup2dInterface.kt | 2 +- .../KMPolygonPatternGroupShaderInterface.kt | 2 +- .../mapscore/kmp/KMPolygonStyle.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMQuad2dD.kt | 2 +- .../kmp/KMQuad2dInstancedInterface.kt | 2 +- .../mapscore/kmp/KMQuad2dInterface.kt | 2 +- .../KMQuad2dStretchedInstancedInterface.kt | 2 +- .../openmobilemaps/mapscore/kmp/KMQuad3dD.kt | 2 +- .../mapscore/kmp/KMQuadCoord.kt | 2 +- .../mapscore/kmp/KMRasterShaderInterface.kt | 2 +- .../mapscore/kmp/KMRasterShaderStyle.kt | 2 +- .../mapscore/kmp/KMRectCoord.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMRectD.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMRectF.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMRectI.kt | 2 +- .../mapscore/kmp/KMRectanglePacker.kt | 2 +- .../mapscore/kmp/KMRectanglePackerPage.kt | 2 +- .../mapscore/kmp/KMRenderConfigInterface.kt | 2 +- .../mapscore/kmp/KMRenderLineDescription.kt | 2 +- .../mapscore/kmp/KMRenderObjectInterface.kt | 2 +- .../mapscore/kmp/KMRenderPassConfig.kt | 2 +- .../mapscore/kmp/KMRenderPassInterface.kt | 2 +- .../mapscore/kmp/KMRenderTargetInterface.kt | 2 +- .../kmp/KMRenderVerticesDescription.kt | 2 +- .../mapscore/kmp/KMRendererInterface.kt | 2 +- .../kmp/KMRenderingContextInterface.kt | 2 +- .../kmp/KMReverseGeocoderInterface.kt | 2 +- .../mapscore/kmp/KMSceneCallbackInterface.kt | 2 +- .../mapscore/kmp/KMSceneInterface.kt | 2 +- .../kmp/KMSchedulerGraphicsTaskCallbacks.kt | 2 +- .../mapscore/kmp/KMSchedulerInterface.kt | 2 +- .../mapscore/kmp/KMShaderFactoryInterface.kt | 2 +- .../mapscore/kmp/KMShaderProgramInterface.kt | 2 +- .../mapscore/kmp/KMSharedBytes.kt | 2 +- .../mapscore/kmp/KMSkySphereLayerInterface.kt | 2 +- .../kmp/KMSkySphereShaderInterface.kt | 2 +- .../kmp/KMSphereEffectLayerInterface.kt | 2 +- .../kmp/KMSphereEffectShaderInterface.kt | 2 +- .../kmp/KMStretchInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMStretchShaderInfo.kt | 2 +- .../mapscore/kmp/KMStretchShaderInterface.kt | 2 +- .../mapscore/kmp/KMTaskConfig.kt | 2 +- .../mapscore/kmp/KMTaskInterface.kt | 2 +- .../mapscore/kmp/KMTextDescription.kt | 2 +- .../mapscore/kmp/KMTextFactory.kt | 2 +- .../mapscore/kmp/KMTextInfoInterface.kt | 2 +- .../mapscore/kmp/KMTextInstancedInterface.kt | 2 +- .../kmp/KMTextInstancedShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextInterface.kt | 2 +- .../mapscore/kmp/KMTextLayerInterface.kt | 2 +- .../mapscore/kmp/KMTextShaderInterface.kt | 2 +- .../mapscore/kmp/KMTextureAtlas.kt | 2 +- .../mapscore/kmp/KMTextureHolderInterface.kt | 2 +- .../mapscore/kmp/KMTextureLoaderResult.kt | 2 +- .../mapscore/kmp/KMThreadPoolScheduler.kt | 2 +- .../mapscore/kmp/KMTiled2dMapLayerConfig.kt | 2 +- ...MTiled2dMapRasterLayerCallbackInterface.kt | 2 +- .../kmp/KMTiled2dMapRasterLayerInterface.kt | 2 +- .../kmp/KMTiled2dMapReadyStateListener.kt | 2 +- .../kmp/KMTiled2dMapSourceInterface.kt | 2 +- .../kmp/KMTiled2dMapVectorAssetInfo.kt | 2 +- .../kmp/KMTiled2dMapVectorLayerInterface.kt | 2 +- ...apVectorLayerLocalDataProviderInterface.kt | 2 +- ...apVectorLayerSelectionCallbackInterface.kt | 2 +- ...2dMapVectorLayerSymbolDelegateInterface.kt | 2 +- .../kmp/KMTiled2dMapVectorSettings.kt | 2 +- .../mapscore/kmp/KMTiled2dMapZoomInfo.kt | 2 +- .../mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt | 2 +- .../mapscore/kmp/KMTiledLayerError.kt | 2 +- .../mapscore/kmp/KMTouchEvent.kt | 2 +- .../mapscore/kmp/KMTouchHandlerInterface.kt | 2 +- .../mapscore/kmp/KMTouchInterface.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec2D.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec2F.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec2I.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec3D.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec3F.kt | 2 +- .../io/openmobilemaps/mapscore/kmp/KMVec3I.kt | 2 +- .../kmp/KMVectorLayerFeatureCoordInfo.kt | 2 +- .../mapscore/kmp/KMVectorLayerFeatureInfo.kt | 2 +- .../kmp/KMVectorLayerFeatureInfoValue.kt | 2 +- .../kmp/KMWmtsCapabilitiesResource.kt | 2 +- .../mapscore/kmp/KMWmtsLayerDescription.kt | 2 +- .../mapscore/kmp/KMWmtsLayerDimension.kt | 2 +- .../mapscore/kmp/KMWmtsTileMatrix.kt | 2 +- .../mapscore/kmp/KMWmtsTileMatrixSet.kt | 2 +- .../kmp/KMWmtsTiled2dMapLayerConfigFactory.kt | 2 +- external/djinni | 2 +- .../openmobilemaps/mapscore/kmp/KMFuture.kt | 12 ++++ .../mapscore/kmp/MapCoreKmpInterop.kt | 55 +++++++++++++++++++ .../openmobilemaps/mapscore/kmp/KMFuture.kt | 5 ++ .../openmobilemaps/mapscore/kmp/KMFuture.kt | 6 +- 373 files changed, 444 insertions(+), 372 deletions(-) create mode 100644 kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt index 71f9d3f2f..56a083312 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -18,4 +18,4 @@ actual class KMAlphaInstancedShaderInterface actual public constructor( } internal fun KMAlphaInstancedShaderInterface.asPlatform(): AlphaInstancedShaderInterface = nativeHandle as AlphaInstancedShaderInterface -internal fun AlphaInstancedShaderInterface.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) +public fun AlphaInstancedShaderInterface.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt index a93e199ef..23b027f15 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -22,4 +22,4 @@ actual class KMAlphaShaderInterface actual public constructor( } internal fun KMAlphaShaderInterface.asPlatform(): AlphaShaderInterface = nativeHandle as AlphaShaderInterface -internal fun AlphaShaderInterface.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) +public fun AlphaShaderInterface.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt index 58a5a94b2..fd98dbf72 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAnchor.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMAnchor = io.openmobilemaps.mapscore.shared.map.layers.text.Anchor internal fun KMAnchor.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.Anchor = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.Anchor.asKmp(): KMAnchor = this +public fun io.openmobilemaps.mapscore.shared.map.layers.text.Anchor.asKmp(): KMAnchor = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt index 5847585e5..341033bd3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBlendMode.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMBlendMode = io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode internal fun KMBlendMode.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode = this -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode.asKmp(): KMBlendMode = this +public fun io.openmobilemaps.mapscore.shared.graphics.shader.BlendMode.asKmp(): KMBlendMode = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt index cbb39da8f..1b2a49ebf 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -51,4 +51,4 @@ actual class KMBoundingBoxInterface actual public constructor( } internal fun KMBoundingBoxInterface.asPlatform(): BoundingBoxInterface = nativeHandle as BoundingBoxInterface -internal fun BoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) +public fun BoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt index b237c0992..6c11cb8c5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMCamera3dConfig = io.openmobilemaps.mapscore.shared.map.Camera3dConfig internal fun KMCamera3dConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.Camera3dConfig = this -internal fun io.openmobilemaps.mapscore.shared.map.Camera3dConfig.asKmp(): KMCamera3dConfig = this +public fun io.openmobilemaps.mapscore.shared.map.Camera3dConfig.asKmp(): KMCamera3dConfig = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt index eb94112f1..80dc9cf0e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -27,4 +27,4 @@ actual class KMCamera3dConfigFactory actual public constructor( } internal fun KMCamera3dConfigFactory.asPlatform(): Camera3dConfigFactory = nativeHandle as Camera3dConfigFactory -internal fun Camera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) +public fun Camera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt index d69e5b93a..50f43e0ab 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt @@ -67,4 +67,4 @@ internal fun KMCameraInterface.asPlatform(): CameraInterface = when (this) { is KMCameraInterfacePlatformWrapper -> this.nativeHandle else -> KMCameraInterfacePlatformProxy(this) } -internal fun CameraInterface.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) +public fun CameraInterface.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt index ff505ca8d..7415db7e5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMCameraInterpolation = io.openmobilemaps.mapscore.shared.map.CameraInterpolation internal fun KMCameraInterpolation.asPlatform(): io.openmobilemaps.mapscore.shared.map.CameraInterpolation = this -internal fun io.openmobilemaps.mapscore.shared.map.CameraInterpolation.asKmp(): KMCameraInterpolation = this +public fun io.openmobilemaps.mapscore.shared.map.CameraInterpolation.asKmp(): KMCameraInterpolation = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt index 6d1443809..3bdb2b775 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMCameraInterpolationValue = io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue internal fun KMCameraInterpolationValue.asPlatform(): io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue = this -internal fun io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue.asKmp(): KMCameraInterpolationValue = this +public fun io.openmobilemaps.mapscore.shared.map.CameraInterpolationValue.asKmp(): KMCameraInterpolationValue = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt index 0fa6c991a..412cab83f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMCircleD = io.openmobilemaps.mapscore.shared.graphics.common.CircleD internal fun KMCircleD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.CircleD = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.CircleD.asKmp(): KMCircleD = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.CircleD.asKmp(): KMCircleD = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt index f6d68c3ef..dbccaba15 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMCircleF = io.openmobilemaps.mapscore.shared.graphics.common.CircleF internal fun KMCircleF.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.CircleF = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.CircleF.asKmp(): KMCircleF = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.CircleF.asKmp(): KMCircleF = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt index 2373fc491..cd0e418e0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMCircleI = io.openmobilemaps.mapscore.shared.graphics.common.CircleI internal fun KMCircleI.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.CircleI = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.CircleI.asKmp(): KMCircleI = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.CircleI.asKmp(): KMCircleI = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt index 23a5b020f..b399758fb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMColor = io.openmobilemaps.mapscore.shared.graphics.common.Color internal fun KMColor.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Color = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Color.asKmp(): KMColor = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Color.asKmp(): KMColor = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt index 5588c1ef7..8a41bdbc2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -22,4 +22,4 @@ actual class KMColorCircleShaderInterface actual public constructor( } internal fun KMColorCircleShaderInterface.asPlatform(): ColorCircleShaderInterface = nativeHandle as ColorCircleShaderInterface -internal fun ColorCircleShaderInterface.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) +public fun ColorCircleShaderInterface.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt index a896ac08f..ab4107e74 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -22,4 +22,4 @@ actual class KMColorShaderInterface actual public constructor( } internal fun KMColorShaderInterface.asPlatform(): ColorShaderInterface = nativeHandle as ColorShaderInterface -internal fun ColorShaderInterface.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) +public fun ColorShaderInterface.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt index a55291d86..ae5f7dcbb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMColorStateList = io.openmobilemaps.mapscore.shared.map.layers.ColorStateList internal fun KMColorStateList.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.ColorStateList = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.ColorStateList.asKmp(): KMColorStateList = this +public fun io.openmobilemaps.mapscore.shared.map.layers.ColorStateList.asKmp(): KMColorStateList = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt index 560eae4d1..233dfc0d9 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -31,4 +31,4 @@ internal fun KMComputeObjectInterface.asPlatform(): ComputeObjectInterface = whe is KMComputeObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMComputeObjectInterfacePlatformProxy(this) } -internal fun ComputeObjectInterface.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) +public fun ComputeObjectInterface.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt index 843dd8405..b408145ea 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -33,4 +33,4 @@ internal fun KMComputePassInterface.asPlatform(): ComputePassInterface = when (t is KMComputePassInterfacePlatformWrapper -> this.nativeHandle else -> KMComputePassInterfacePlatformProxy(this) } -internal fun ComputePassInterface.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) +public fun ComputePassInterface.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt index 24d0baf66..de2aa9e11 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMCoord = io.openmobilemaps.mapscore.shared.map.coordinates.Coord internal fun KMCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.Coord = this -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.Coord.asKmp(): KMCoord = this +public fun io.openmobilemaps.mapscore.shared.map.coordinates.Coord.asKmp(): KMCoord = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt index 1b3c3f7fe..064d7c537 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -56,4 +56,4 @@ actual class KMCoordinateConversionHelperInterface actual public constructor( } internal fun KMCoordinateConversionHelperInterface.asPlatform(): CoordinateConversionHelperInterface = nativeHandle as CoordinateConversionHelperInterface -internal fun CoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) +public fun CoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt index b2df15cae..5874b9972 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt @@ -57,4 +57,4 @@ internal fun KMCoordinateConverterInterface.asPlatform(): CoordinateConverterInt is KMCoordinateConverterInterfacePlatformWrapper -> this.nativeHandle else -> KMCoordinateConverterInterfacePlatformProxy(this) } -internal fun CoordinateConverterInterface.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) +public fun CoordinateConverterInterface.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt index aae3b6165..ec4166977 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -42,4 +42,4 @@ actual class KMCoordinateSystemFactory actual public constructor( } internal fun KMCoordinateSystemFactory.asPlatform(): CoordinateSystemFactory = nativeHandle as CoordinateSystemFactory -internal fun CoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) +public fun CoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt index fe6b99ab6..856263013 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -57,4 +57,4 @@ actual class KMCoordinateSystemIdentifiers actual public constructor( } internal fun KMCoordinateSystemIdentifiers.asPlatform(): CoordinateSystemIdentifiers = nativeHandle as CoordinateSystemIdentifiers -internal fun CoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) +public fun CoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt index 9a69cbde4..de4932d11 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -32,4 +32,4 @@ actual class KMCpuPerformanceLoggerInterface actual public constructor( } internal fun KMCpuPerformanceLoggerInterface.asPlatform(): CpuPerformanceLoggerInterface = nativeHandle as CpuPerformanceLoggerInterface -internal fun CpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) +public fun CpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt index b3dda839a..d252bccb8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMDataLoaderResult = io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult internal fun KMDataLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult.asKmp(): KMDataLoaderResult = this +public fun io.openmobilemaps.mapscore.shared.map.loader.DataLoaderResult.asKmp(): KMDataLoaderResult = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt index 05604d6ca..6e63b01e6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -37,4 +37,4 @@ actual class KMDefaultTiled2dMapLayerConfigs actual public constructor( } internal fun KMDefaultTiled2dMapLayerConfigs.asPlatform(): DefaultTiled2dMapLayerConfigs = nativeHandle as DefaultTiled2dMapLayerConfigs -internal fun DefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) +public fun DefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt index 278d83813..fb5246787 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -22,4 +22,4 @@ actual class KMDefaultTouchHandlerInterface actual public constructor( } internal fun KMDefaultTouchHandlerInterface.asPlatform(): DefaultTouchHandlerInterface = nativeHandle as DefaultTouchHandlerInterface -internal fun DefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) +public fun DefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt index fb6f1e7c1..3b755e953 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -18,4 +18,4 @@ actual class KMElevationInterpolationShaderInterface actual public constructor( } internal fun KMElevationInterpolationShaderInterface.asPlatform(): ElevationInterpolationShaderInterface = nativeHandle as ElevationInterpolationShaderInterface -internal fun ElevationInterpolationShaderInterface.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) +public fun ElevationInterpolationShaderInterface.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt index 87eed15fc..32fda3e93 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -46,4 +46,4 @@ actual class KMErrorManager actual public constructor( } internal fun KMErrorManager.asPlatform(): ErrorManager = nativeHandle as ErrorManager -internal fun ErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) +public fun ErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt index b22e6aa32..ce4054e4f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt @@ -31,4 +31,4 @@ internal fun KMErrorManagerListener.asPlatform(): ErrorManagerListener = when (t is KMErrorManagerListenerPlatformWrapper -> this.nativeHandle else -> KMErrorManagerListenerPlatformProxy(this) } -internal fun ErrorManagerListener.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) +public fun ErrorManagerListener.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt index 503ec523d..23c8b9d48 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -31,4 +31,4 @@ internal fun KMExceptionLoggerDelegateInterface.asPlatform(): ExceptionLoggerDel is KMExceptionLoggerDelegateInterfacePlatformWrapper -> this.nativeHandle else -> KMExceptionLoggerDelegateInterfacePlatformProxy(this) } -internal fun ExceptionLoggerDelegateInterface.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) +public fun ExceptionLoggerDelegateInterface.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt index 1899845c6..56791eeff 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -21,4 +21,4 @@ actual class KMExceptionLoggerInterface actual public constructor( } internal fun KMExceptionLoggerInterface.asPlatform(): ExceptionLoggerInterface = nativeHandle as ExceptionLoggerInterface -internal fun ExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) +public fun ExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt index 539668022..aab4c7c1e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExecutionEnvironment.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMExecutionEnvironment = io.openmobilemaps.mapscore.shared.map.scheduling.ExecutionEnvironment internal fun KMExecutionEnvironment.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.ExecutionEnvironment = this -internal fun io.openmobilemaps.mapscore.shared.map.scheduling.ExecutionEnvironment.asKmp(): KMExecutionEnvironment = this +public fun io.openmobilemaps.mapscore.shared.map.scheduling.ExecutionEnvironment.asKmp(): KMExecutionEnvironment = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt index 260924ea3..8b82f3d57 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -52,4 +52,4 @@ actual class KMFeatureInfoValueFactory actual public constructor( } internal fun KMFeatureInfoValueFactory.asPlatform(): FeatureInfoValueFactory = nativeHandle as FeatureInfoValueFactory -internal fun FeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) +public fun FeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt index 8af301f7b..9f32fe061 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMFont = io.openmobilemaps.mapscore.shared.map.loader.Font internal fun KMFont.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.Font = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.Font.asKmp(): KMFont = this +public fun io.openmobilemaps.mapscore.shared.map.loader.Font.asKmp(): KMFont = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt index 94098d1ce..3741ac54b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMFontData = io.openmobilemaps.mapscore.shared.map.loader.FontData internal fun KMFontData.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontData = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontData.asKmp(): KMFontData = this +public fun io.openmobilemaps.mapscore.shared.map.loader.FontData.asKmp(): KMFontData = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt index 59f22f118..2ab3f81e8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMFontGlyph = io.openmobilemaps.mapscore.shared.map.loader.FontGlyph internal fun KMFontGlyph.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontGlyph = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontGlyph.asKmp(): KMFontGlyph = this +public fun io.openmobilemaps.mapscore.shared.map.loader.FontGlyph.asKmp(): KMFontGlyph = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt index cdb02b076..4be62bf27 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt @@ -33,4 +33,4 @@ internal fun KMFontLoaderInterface.asPlatform(): FontLoaderInterface = when (thi is KMFontLoaderInterfacePlatformWrapper -> this.nativeHandle else -> KMFontLoaderInterfacePlatformProxy(this) } -internal fun FontLoaderInterface.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) +public fun FontLoaderInterface.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index 13013ec01..9b87ca50f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -18,7 +18,7 @@ internal fun KMFontLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shared. fontData = fontData?.let { it.asPlatform() }, status = status.asPlatform(), ) -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( +public fun io.openmobilemaps.mapscore.shared.map.loader.FontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( imageData = this.imageData?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, fontData = this.fontData?.let { (it as io.openmobilemaps.mapscore.shared.map.loader.FontData).asKmp() }, status = (this.status as io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus).asKmp(), diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt index fc98b18e0..28a17bfec 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMFontWrapper = io.openmobilemaps.mapscore.shared.map.loader.FontWrapper internal fun KMFontWrapper.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.FontWrapper = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.FontWrapper.asKmp(): KMFontWrapper = this +public fun io.openmobilemaps.mapscore.shared.map.loader.FontWrapper.asKmp(): KMFontWrapper = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt index 9da63982a..9f51f9925 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMFormattedStringEntry = io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry internal fun KMFormattedStringEntry.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry.asKmp(): KMFormattedStringEntry = this +public fun io.openmobilemaps.mapscore.shared.map.layers.text.FormattedStringEntry.asKmp(): KMFormattedStringEntry = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt index 1900b7509..7d9678958 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -37,4 +37,4 @@ actual class KMGeoJsonFeatureParserInterface actual public constructor( } internal fun KMGeoJsonFeatureParserInterface.asPlatform(): GeoJsonFeatureParserInterface = nativeHandle as GeoJsonFeatureParserInterface -internal fun GeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) +public fun GeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt index 5c82b9266..575413503 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -32,4 +32,4 @@ actual class KMGeoJsonHelperInterface actual public constructor( } internal fun KMGeoJsonHelperInterface.asPlatform(): GeoJsonHelperInterface = nativeHandle as GeoJsonHelperInterface -internal fun GeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) +public fun GeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt index 6a21e318e..fb4ad2251 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMGeoJsonLine = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine internal fun KMGeoJsonLine.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine.asKmp(): KMGeoJsonLine = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonLine.asKmp(): KMGeoJsonLine = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt index 08b93df82..e6b1e8c06 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMGeoJsonPoint = io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint internal fun KMGeoJsonPoint.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint.asKmp(): KMGeoJsonPoint = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.GeoJsonPoint.asKmp(): KMGeoJsonPoint = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt index e1a5d27c4..2c623134c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMGlyphDescription = io.openmobilemaps.mapscore.shared.graphics.objects.GlyphDescription internal fun KMGlyphDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.GlyphDescription = this -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.GlyphDescription.asKmp(): KMGlyphDescription = this +public fun io.openmobilemaps.mapscore.shared.graphics.objects.GlyphDescription.asKmp(): KMGlyphDescription = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index ef2e6d002..697dda80c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -201,4 +201,4 @@ internal fun KMGraphicsObjectFactoryInterface.asPlatform(): GraphicsObjectFactor is KMGraphicsObjectFactoryInterfacePlatformWrapper -> this.nativeHandle else -> KMGraphicsObjectFactoryInterfacePlatformProxy(this) } -internal fun GraphicsObjectFactoryInterface.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) +public fun GraphicsObjectFactoryInterface.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt index 10d4d73a8..40844ec23 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -83,4 +83,4 @@ internal fun KMGraphicsObjectInterface.asPlatform(): GraphicsObjectInterface = w is KMGraphicsObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMGraphicsObjectInterfacePlatformProxy(this) } -internal fun GraphicsObjectInterface.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) +public fun GraphicsObjectInterface.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt index 569dcf4f4..6e0d5fd56 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -27,4 +27,4 @@ actual class KMIconFactory actual public constructor( } internal fun KMIconFactory.asPlatform(): IconFactory = nativeHandle as IconFactory -internal fun IconFactory.asKmp(): KMIconFactory = KMIconFactory(this) +public fun IconFactory.asKmp(): KMIconFactory = KMIconFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt index b14a8a149..5e46e422c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -60,4 +60,4 @@ actual class KMIconInfoInterface actual public constructor( } internal fun KMIconInfoInterface.asPlatform(): IconInfoInterface = nativeHandle as IconInfoInterface -internal fun IconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) +public fun IconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt index e7ed744cb..32cab35dd 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -45,4 +45,4 @@ internal fun KMIconLayerCallbackInterface.asPlatform(): IconLayerCallbackInterfa is KMIconLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMIconLayerCallbackInterfacePlatformProxy(this) } -internal fun IconLayerCallbackInterface.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) +public fun IconLayerCallbackInterface.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt index c7ce6cee4..b8a98bf75 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -84,4 +84,4 @@ actual class KMIconLayerInterface actual public constructor( } internal fun KMIconLayerInterface.asPlatform(): IconLayerInterface = nativeHandle as IconLayerInterface -internal fun IconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) +public fun IconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt index ed6eebcbc..14779c16e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconTextFit.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMIconTextFit = io.openmobilemaps.mapscore.shared.map.layers.text.IconTextFit internal fun KMIconTextFit.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.IconTextFit = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.IconTextFit.asKmp(): KMIconTextFit = this +public fun io.openmobilemaps.mapscore.shared.map.layers.text.IconTextFit.asKmp(): KMIconTextFit = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt index e37bf5dfa..dbc408042 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconType.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMIconType = io.openmobilemaps.mapscore.shared.map.layers.icon.IconType internal fun KMIconType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.icon.IconType = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconType.asKmp(): KMIconType = this +public fun io.openmobilemaps.mapscore.shared.map.layers.icon.IconType.asKmp(): KMIconType = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt index 0b5bbbe64..f649d7524 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -43,4 +43,4 @@ internal fun KMIcosahedronInterface.asPlatform(): IcosahedronInterface = when (t is KMIcosahedronInterfacePlatformWrapper -> this.nativeHandle else -> KMIcosahedronInterfacePlatformProxy(this) } -internal fun IcosahedronInterface.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) +public fun IcosahedronInterface.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt index 24453a835..8f954ccf0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt @@ -33,4 +33,4 @@ internal fun KMIcosahedronLayerCallbackInterface.asPlatform(): IcosahedronLayerC is KMIcosahedronLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMIcosahedronLayerCallbackInterfacePlatformProxy(this) } -internal fun IcosahedronLayerCallbackInterface.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) +public fun IcosahedronLayerCallbackInterface.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt index 2266790ed..babfd2d40 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -27,4 +27,4 @@ actual class KMIcosahedronLayerInterface actual public constructor( } internal fun KMIcosahedronLayerInterface.asPlatform(): IcosahedronLayerInterface = nativeHandle as IcosahedronLayerInterface -internal fun IcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) +public fun IcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt index 82844bbbc..e36038eeb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -45,4 +45,4 @@ internal fun KMIndexedLayerInterface.asPlatform(): IndexedLayerInterface = when is KMIndexedLayerInterfacePlatformWrapper -> this.nativeHandle else -> KMIndexedLayerInterfacePlatformProxy(this) } -internal fun IndexedLayerInterface.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) +public fun IndexedLayerInterface.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt index d13af40f2..62a4b3299 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -209,4 +209,4 @@ internal fun KMLayerInterface.asPlatform(): LayerInterface = when (this) { is KMLayerInterfacePlatformWrapper -> this.nativeHandle else -> KMLayerInterfacePlatformProxy(this) } -internal fun LayerInterface.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) +public fun LayerInterface.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt index c20caa639..a152aaa03 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -22,4 +22,4 @@ actual class KMLayerObjectInterface actual public constructor( } internal fun KMLayerObjectInterface.asPlatform(): LayerObjectInterface = nativeHandle as LayerObjectInterface -internal fun LayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) +public fun LayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt index 9c3f0df2c..99f5210c2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerReadyState.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMLayerReadyState = io.openmobilemaps.mapscore.shared.map.LayerReadyState internal fun KMLayerReadyState.asPlatform(): io.openmobilemaps.mapscore.shared.map.LayerReadyState = this -internal fun io.openmobilemaps.mapscore.shared.map.LayerReadyState.asKmp(): KMLayerReadyState = this +public fun io.openmobilemaps.mapscore.shared.map.LayerReadyState.asKmp(): KMLayerReadyState = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt index bc426777e..f3d758125 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineCapType.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMLineCapType = io.openmobilemaps.mapscore.shared.map.layers.line.LineCapType internal fun KMLineCapType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineCapType = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineCapType.asKmp(): KMLineCapType = this +public fun io.openmobilemaps.mapscore.shared.map.layers.line.LineCapType.asKmp(): KMLineCapType = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt index bd0b2fc0b..beb41468f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -22,4 +22,4 @@ actual class KMLineFactory actual public constructor( } internal fun KMLineFactory.asPlatform(): LineFactory = nativeHandle as LineFactory -internal fun LineFactory.asKmp(): KMLineFactory = KMLineFactory(this) +public fun LineFactory.asKmp(): KMLineFactory = KMLineFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt index 1cad2b3df..9c7dd509e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -43,4 +43,4 @@ internal fun KMLineGroup2dInterface.asPlatform(): LineGroup2dInterface = when (t is KMLineGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMLineGroup2dInterfacePlatformProxy(this) } -internal fun LineGroup2dInterface.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) +public fun LineGroup2dInterface.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt index 7a8ec596f..17ff62427 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -26,4 +26,4 @@ actual class KMLineGroupShaderInterface actual public constructor( } internal fun KMLineGroupShaderInterface.asPlatform(): LineGroupShaderInterface = nativeHandle as LineGroupShaderInterface -internal fun LineGroupShaderInterface.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) +public fun LineGroupShaderInterface.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt index 28fdc7b78..ae2324977 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -28,4 +28,4 @@ actual class KMLineInfoInterface actual public constructor( } internal fun KMLineInfoInterface.asPlatform(): LineInfoInterface = nativeHandle as LineInfoInterface -internal fun LineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) +public fun LineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt index 41f56eb74..23746788d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineJoinType.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMLineJoinType = io.openmobilemaps.mapscore.shared.map.layers.line.LineJoinType internal fun KMLineJoinType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineJoinType = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineJoinType.asKmp(): KMLineJoinType = this +public fun io.openmobilemaps.mapscore.shared.map.layers.line.LineJoinType.asKmp(): KMLineJoinType = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt index 5fa5ce136..165c6321a 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -31,4 +31,4 @@ internal fun KMLineLayerCallbackInterface.asPlatform(): LineLayerCallbackInterfa is KMLineLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMLineLayerCallbackInterfacePlatformProxy(this) } -internal fun LineLayerCallbackInterface.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) +public fun LineLayerCallbackInterface.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt index 5780e3d52..041a805ee 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -72,4 +72,4 @@ actual class KMLineLayerInterface actual public constructor( } internal fun KMLineLayerInterface.asPlatform(): LineLayerInterface = nativeHandle as LineLayerInterface -internal fun LineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) +public fun LineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt index 8d3f0ff13..4cc2e4ef9 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMLineStyle = io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle internal fun KMLineStyle.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle.asKmp(): KMLineStyle = this +public fun io.openmobilemaps.mapscore.shared.map.layers.line.LineStyle.asKmp(): KMLineStyle = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt index 3a70a93c5..ebdd939ae 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -79,4 +79,4 @@ internal fun KMLoaderInterface.asPlatform(): LoaderInterface = when (this) { is KMLoaderInterfacePlatformWrapper -> this.nativeHandle else -> KMLoaderInterfacePlatformProxy(this) } -internal fun LoaderInterface.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) +public fun LoaderInterface.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt index aeaa4f6cd..bbabdea08 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderStatus.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMLoaderStatus = io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus internal fun KMLoaderStatus.asPlatform(): io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus = this -internal fun io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus.asKmp(): KMLoaderStatus = this +public fun io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus.asKmp(): KMLoaderStatus = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt index d6d9351b8..26c67c560 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMLoggerData = io.openmobilemaps.mapscore.shared.map.LoggerData internal fun KMLoggerData.asPlatform(): io.openmobilemaps.mapscore.shared.map.LoggerData = this -internal fun io.openmobilemaps.mapscore.shared.map.LoggerData.asKmp(): KMLoggerData = this +public fun io.openmobilemaps.mapscore.shared.map.LoggerData.asKmp(): KMLoggerData = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt index 8e97b2d9b..56851ca99 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt @@ -41,4 +41,4 @@ internal fun KMMapCallbackInterface.asPlatform(): MapCallbackInterface = when (t is KMMapCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMMapCallbackInterfacePlatformProxy(this) } -internal fun MapCallbackInterface.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) +public fun MapCallbackInterface.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt index 561449c22..4564792c1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -22,4 +22,4 @@ actual class KMMapCamera3dInterface actual public constructor( } internal fun KMMapCamera3dInterface.asPlatform(): MapCamera3dInterface = nativeHandle as MapCamera3dInterface -internal fun MapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) +public fun MapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt index 12d571003..025fcc3a0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -237,4 +237,4 @@ actual class KMMapCameraInterface actual public constructor( } internal fun KMMapCameraInterface.asPlatform(): MapCameraInterface = nativeHandle as MapCameraInterface -internal fun MapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) +public fun MapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt index 7bb585f0b..18138c6a9 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt @@ -61,4 +61,4 @@ internal fun KMMapCameraListenerInterface.asPlatform(): MapCameraListenerInterfa is KMMapCameraListenerInterfacePlatformWrapper -> this.nativeHandle else -> KMMapCameraListenerInterfacePlatformProxy(this) } -internal fun MapCameraListenerInterface.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) +public fun MapCameraListenerInterface.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt index 864415eed..689c788c8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMMapConfig = io.openmobilemaps.mapscore.shared.map.MapConfig internal fun KMMapConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.MapConfig = this -internal fun io.openmobilemaps.mapscore.shared.map.MapConfig.asKmp(): KMMapConfig = this +public fun io.openmobilemaps.mapscore.shared.map.MapConfig.asKmp(): KMMapConfig = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt index 5cd2d5ea6..4dc20046e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMMapCoordinateSystem = io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem internal fun KMMapCoordinateSystem.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem = this -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem.asKmp(): KMMapCoordinateSystem = this +public fun io.openmobilemaps.mapscore.shared.map.coordinates.MapCoordinateSystem.asKmp(): KMMapCoordinateSystem = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt index 37de8bdec..15fd1e961 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -180,4 +180,4 @@ actual class KMMapInterface actual public constructor( } internal fun KMMapInterface.asPlatform(): MapInterface = nativeHandle as MapInterface -internal fun MapInterface.asKmp(): KMMapInterface = KMMapInterface(this) +public fun MapInterface.asKmp(): KMMapInterface = KMMapInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt index 7bf6602f1..1993c13c5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt @@ -31,4 +31,4 @@ internal fun KMMapReadyCallbackInterface.asPlatform(): MapReadyCallbackInterface is KMMapReadyCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMMapReadyCallbackInterfacePlatformProxy(this) } -internal fun MapReadyCallbackInterface.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) +public fun MapReadyCallbackInterface.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt index c0902eb2b..aeacef210 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -22,4 +22,4 @@ actual class KMMapsCoreSharedModule actual public constructor( } internal fun KMMapsCoreSharedModule.asPlatform(): MapsCoreSharedModule = nativeHandle as MapsCoreSharedModule -internal fun MapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) +public fun MapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt index 2f5f6b182..f08f945af 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -43,4 +43,4 @@ internal fun KMMaskingObjectInterface.asPlatform(): MaskingObjectInterface = whe is KMMaskingObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMMaskingObjectInterfacePlatformProxy(this) } -internal fun MaskingObjectInterface.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) +public fun MaskingObjectInterface.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt index 396dd5106..003e37baf 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -32,4 +32,4 @@ actual class KMOpenGlPerformanceLoggerInterface actual public constructor( } internal fun KMOpenGlPerformanceLoggerInterface.asPlatform(): OpenGlPerformanceLoggerInterface = nativeHandle as OpenGlPerformanceLoggerInterface -internal fun OpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) +public fun OpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt index c12d53da6..cc920a3e9 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -85,4 +85,4 @@ internal fun KMOpenGlRenderTargetInterface.asPlatform(): OpenGlRenderTargetInter is KMOpenGlRenderTargetInterfacePlatformWrapper -> this.nativeHandle else -> KMOpenGlRenderTargetInterfacePlatformProxy(this) } -internal fun OpenGlRenderTargetInterface.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) +public fun OpenGlRenderTargetInterface.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt index bce00b782..cd58fb7d6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -121,4 +121,4 @@ internal fun KMOpenGlRenderingContextInterface.asPlatform(): OpenGlRenderingCont is KMOpenGlRenderingContextInterfacePlatformWrapper -> this.nativeHandle else -> KMOpenGlRenderingContextInterfacePlatformProxy(this) } -internal fun OpenGlRenderingContextInterface.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) +public fun OpenGlRenderingContextInterface.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt index c5dc36d2a..6022a98cd 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt @@ -97,4 +97,4 @@ internal fun KMPerformanceLoggerInterface.asPlatform(): PerformanceLoggerInterfa is KMPerformanceLoggerInterfacePlatformWrapper -> this.nativeHandle else -> KMPerformanceLoggerInterfacePlatformProxy(this) } -internal fun PerformanceLoggerInterface.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) +public fun PerformanceLoggerInterface.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index 0b8d68f4e..5377e38f7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -65,4 +65,4 @@ internal fun KMPolygon2dInterface.asPlatform(): Polygon2dInterface = when (this) is KMPolygon2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygon2dInterfacePlatformProxy(this) } -internal fun Polygon2dInterface.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) +public fun Polygon2dInterface.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt index 45672fe70..500417ebd 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMPolygonCoord = io.openmobilemaps.mapscore.shared.map.coordinates.PolygonCoord internal fun KMPolygonCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.PolygonCoord = this -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.PolygonCoord.asKmp(): KMPolygonCoord = this +public fun io.openmobilemaps.mapscore.shared.map.coordinates.PolygonCoord.asKmp(): KMPolygonCoord = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt index a00fbe3aa..f4dfb8fa5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -43,4 +43,4 @@ internal fun KMPolygonGroup2dInterface.asPlatform(): PolygonGroup2dInterface = w is KMPolygonGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonGroup2dInterfacePlatformProxy(this) } -internal fun PolygonGroup2dInterface.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) +public fun PolygonGroup2dInterface.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt index 7db784aa2..731cafd45 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -22,4 +22,4 @@ actual class KMPolygonGroupShaderInterface actual public constructor( } internal fun KMPolygonGroupShaderInterface.asPlatform(): PolygonGroupShaderInterface = nativeHandle as PolygonGroupShaderInterface -internal fun PolygonGroupShaderInterface.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) +public fun PolygonGroupShaderInterface.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt index a720be953..1242737f2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMPolygonInfo = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo internal fun KMPolygonInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo.asKmp(): KMPolygonInfo = this +public fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonInfo.asKmp(): KMPolygonInfo = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt index e791beaaa..b9d890b90 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt @@ -45,4 +45,4 @@ internal fun KMPolygonLayerCallbackInterface.asPlatform(): PolygonLayerCallbackI is KMPolygonLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonLayerCallbackInterfacePlatformProxy(this) } -internal fun PolygonLayerCallbackInterface.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) +public fun PolygonLayerCallbackInterface.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt index 153552697..ebb8ef599 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -68,4 +68,4 @@ actual class KMPolygonLayerInterface actual public constructor( } internal fun KMPolygonLayerInterface.asPlatform(): PolygonLayerInterface = nativeHandle as PolygonLayerInterface -internal fun PolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) +public fun PolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt index 50724b53d..9eb7b0765 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -35,4 +35,4 @@ actual class KMPolygonMaskObjectInterface actual public constructor( } internal fun KMPolygonMaskObjectInterface.asPlatform(): PolygonMaskObjectInterface = nativeHandle as PolygonMaskObjectInterface -internal fun PolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) +public fun PolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt index 40072067d..e3138038d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -103,4 +103,4 @@ internal fun KMPolygonPatternGroup2dInterface.asPlatform(): PolygonPatternGroup2 is KMPolygonPatternGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonPatternGroup2dInterfacePlatformProxy(this) } -internal fun PolygonPatternGroup2dInterface.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) +public fun PolygonPatternGroup2dInterface.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt index a61273766..64531f5ed 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -18,4 +18,4 @@ actual class KMPolygonPatternGroupShaderInterface actual public constructor( } internal fun KMPolygonPatternGroupShaderInterface.asPlatform(): PolygonPatternGroupShaderInterface = nativeHandle as PolygonPatternGroupShaderInterface -internal fun PolygonPatternGroupShaderInterface.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) +public fun PolygonPatternGroupShaderInterface.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt index cf79ecb4e..5e1d0cd81 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMPolygonStyle = io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonStyle internal fun KMPolygonStyle.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonStyle = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonStyle.asKmp(): KMPolygonStyle = this +public fun io.openmobilemaps.mapscore.shared.map.layers.polygon.PolygonStyle.asKmp(): KMPolygonStyle = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt index 20910e25e..4df185ca8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMQuad2dD = io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD internal fun KMQuad2dD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD.asKmp(): KMQuad2dD = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Quad2dD.asKmp(): KMQuad2dD = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt index 1edb9d554..12ba00f21 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -145,4 +145,4 @@ internal fun KMQuad2dInstancedInterface.asPlatform(): Quad2dInstancedInterface = is KMQuad2dInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dInstancedInterfacePlatformProxy(this) } -internal fun Quad2dInstancedInterface.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) +public fun Quad2dInstancedInterface.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt index 8eb9a2611..e020a5957 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -95,4 +95,4 @@ internal fun KMQuad2dInterface.asPlatform(): Quad2dInterface = when (this) { is KMQuad2dInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dInterfacePlatformProxy(this) } -internal fun Quad2dInterface.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) +public fun Quad2dInterface.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt index 5caceb968..0322535c8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -145,4 +145,4 @@ internal fun KMQuad2dStretchedInstancedInterface.asPlatform(): Quad2dStretchedIn is KMQuad2dStretchedInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dStretchedInstancedInterfacePlatformProxy(this) } -internal fun Quad2dStretchedInstancedInterface.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) +public fun Quad2dStretchedInstancedInterface.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt index bf2a3f460..cfbbdce43 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMQuad3dD = io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD internal fun KMQuad3dD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD.asKmp(): KMQuad3dD = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Quad3dD.asKmp(): KMQuad3dD = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt index 8e34f1045..a31349540 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMQuadCoord = io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord internal fun KMQuadCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord = this -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord.asKmp(): KMQuadCoord = this +public fun io.openmobilemaps.mapscore.shared.map.coordinates.QuadCoord.asKmp(): KMQuadCoord = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt index 815741e2d..357db6ae8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -22,4 +22,4 @@ actual class KMRasterShaderInterface actual public constructor( } internal fun KMRasterShaderInterface.asPlatform(): RasterShaderInterface = nativeHandle as RasterShaderInterface -internal fun RasterShaderInterface.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) +public fun RasterShaderInterface.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt index ef990f253..1865609a3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRasterShaderStyle = io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle internal fun KMRasterShaderStyle.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle = this -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle.asKmp(): KMRasterShaderStyle = this +public fun io.openmobilemaps.mapscore.shared.graphics.shader.RasterShaderStyle.asKmp(): KMRasterShaderStyle = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt index a15b92a93..82900df7e 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRectCoord = io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord internal fun KMRectCoord.asPlatform(): io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord = this -internal fun io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord.asKmp(): KMRectCoord = this +public fun io.openmobilemaps.mapscore.shared.map.coordinates.RectCoord.asKmp(): KMRectCoord = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt index fc798f72c..352b63906 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRectD = io.openmobilemaps.mapscore.shared.graphics.common.RectD internal fun KMRectD.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.RectD = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.RectD.asKmp(): KMRectD = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.RectD.asKmp(): KMRectD = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt index af4728757..46bf323d8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRectF = io.openmobilemaps.mapscore.shared.graphics.common.RectF internal fun KMRectF.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.RectF = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.RectF.asKmp(): KMRectF = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.RectF.asKmp(): KMRectF = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt index 602111788..d99e33c55 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRectI = io.openmobilemaps.mapscore.shared.graphics.common.RectI internal fun KMRectI.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.RectI = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.RectI.asKmp(): KMRectI = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.RectI.asKmp(): KMRectI = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt index 22d61f087..65e943234 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -22,4 +22,4 @@ actual class KMRectanglePacker actual public constructor( } internal fun KMRectanglePacker.asPlatform(): RectanglePacker = nativeHandle as RectanglePacker -internal fun RectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) +public fun RectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt index c5970a83a..209040057 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRectanglePackerPage = io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage internal fun KMRectanglePackerPage.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage = this -internal fun io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage.asKmp(): KMRectanglePackerPage = this +public fun io.openmobilemaps.mapscore.shared.graphics.RectanglePackerPage.asKmp(): KMRectanglePackerPage = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt index abf579735..8c7dfc1c0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -23,4 +23,4 @@ actual class KMRenderConfigInterface actual public constructor( } internal fun KMRenderConfigInterface.asPlatform(): RenderConfigInterface = nativeHandle as RenderConfigInterface -internal fun RenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) +public fun RenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt index 6bcfd5210..758b1a436 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRenderLineDescription = io.openmobilemaps.mapscore.shared.graphics.objects.RenderLineDescription internal fun KMRenderLineDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.RenderLineDescription = this -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.RenderLineDescription.asKmp(): KMRenderLineDescription = this +public fun io.openmobilemaps.mapscore.shared.graphics.objects.RenderLineDescription.asKmp(): KMRenderLineDescription = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt index fa1582f06..5f5a1bfdb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -91,4 +91,4 @@ internal fun KMRenderObjectInterface.asPlatform(): RenderObjectInterface = when is KMRenderObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderObjectInterfacePlatformProxy(this) } -internal fun RenderObjectInterface.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) +public fun RenderObjectInterface.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index fc27c8e78..1defc5c67 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -18,7 +18,7 @@ internal fun KMRenderPassConfig.asPlatform(): io.openmobilemaps.mapscore.shared. isPassMasked = isPassMasked, renderTarget = renderTarget?.let { it.asPlatform() }, ) -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( +public fun io.openmobilemaps.mapscore.shared.graphics.RenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( renderPassIndex = this.renderPassIndex, isPassMasked = this.isPassMasked, renderTarget = this.renderTarget?.let { (it as io.openmobilemaps.mapscore.shared.graphics.RenderTargetInterface).asKmp() }, diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt index ec7b87cf5..8ebf562e6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -79,4 +79,4 @@ internal fun KMRenderPassInterface.asPlatform(): RenderPassInterface = when (thi is KMRenderPassInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderPassInterfacePlatformProxy(this) } -internal fun RenderPassInterface.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) +public fun RenderPassInterface.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt index 82262acf3..7cfbe3936 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -33,4 +33,4 @@ internal fun KMRenderTargetInterface.asPlatform(): RenderTargetInterface = when is KMRenderTargetInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderTargetInterfacePlatformProxy(this) } -internal fun RenderTargetInterface.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) +public fun RenderTargetInterface.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt index ea7e90141..bb4485fc7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRenderVerticesDescription = io.openmobilemaps.mapscore.shared.graphics.objects.RenderVerticesDescription internal fun KMRenderVerticesDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.RenderVerticesDescription = this -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.RenderVerticesDescription.asKmp(): KMRenderVerticesDescription = this +public fun io.openmobilemaps.mapscore.shared.graphics.objects.RenderVerticesDescription.asKmp(): KMRenderVerticesDescription = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt index 4019999ff..46f381c5d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -61,4 +61,4 @@ internal fun KMRendererInterface.asPlatform(): RendererInterface = when (this) { is KMRendererInterfacePlatformWrapper -> this.nativeHandle else -> KMRendererInterfacePlatformProxy(this) } -internal fun RendererInterface.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) +public fun RendererInterface.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt index eaf4dbe82..70a96f483 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -125,4 +125,4 @@ internal fun KMRenderingContextInterface.asPlatform(): RenderingContextInterface is KMRenderingContextInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderingContextInterfacePlatformProxy(this) } -internal fun RenderingContextInterface.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) +public fun RenderingContextInterface.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt index f1e42e8b8..cab873613 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingCullMode.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMRenderingCullMode = io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode internal fun KMRenderingCullMode.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode = this -internal fun io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode.asKmp(): KMRenderingCullMode = this +public fun io.openmobilemaps.mapscore.shared.graphics.RenderingCullMode.asKmp(): KMRenderingCullMode = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt index b5a0684dd..cee55ef36 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -32,4 +32,4 @@ actual class KMReverseGeocoderInterface actual public constructor( } internal fun KMReverseGeocoderInterface.asPlatform(): ReverseGeocoderInterface = nativeHandle as ReverseGeocoderInterface -internal fun ReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) +public fun ReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt index 04be2dff7..4ed15db80 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt @@ -31,4 +31,4 @@ internal fun KMSceneCallbackInterface.asPlatform(): SceneCallbackInterface = whe is KMSceneCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMSceneCallbackInterfacePlatformProxy(this) } -internal fun SceneCallbackInterface.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) +public fun SceneCallbackInterface.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt index 785967b09..fba733939 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -80,4 +80,4 @@ actual class KMSceneInterface actual public constructor( } internal fun KMSceneInterface.asPlatform(): SceneInterface = nativeHandle as SceneInterface -internal fun SceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) +public fun SceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt index ef7ab0da1..928de7a35 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -17,4 +17,4 @@ actual class KMSchedulerGraphicsTaskCallbacks actual public constructor( } internal fun KMSchedulerGraphicsTaskCallbacks.asPlatform(): SchedulerGraphicsTaskCallbacks = nativeHandle as SchedulerGraphicsTaskCallbacks -internal fun SchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) +public fun SchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt index 449a2a5c5..a3961b729 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -125,4 +125,4 @@ internal fun KMSchedulerInterface.asPlatform(): SchedulerInterface = when (this) is KMSchedulerInterfacePlatformWrapper -> this.nativeHandle else -> KMSchedulerInterfacePlatformProxy(this) } -internal fun SchedulerInterface.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) +public fun SchedulerInterface.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index a0442a05b..f1b2b1900 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -345,4 +345,4 @@ internal fun KMShaderFactoryInterface.asPlatform(): ShaderFactoryInterface = whe is KMShaderFactoryInterfacePlatformWrapper -> this.nativeHandle else -> KMShaderFactoryInterfacePlatformProxy(this) } -internal fun ShaderFactoryInterface.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) +public fun ShaderFactoryInterface.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt index 468bd7aac..30dcce8b6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -35,4 +35,4 @@ actual class KMShaderProgramInterface actual public constructor( } internal fun KMShaderProgramInterface.asPlatform(): ShaderProgramInterface = nativeHandle as ShaderProgramInterface -internal fun ShaderProgramInterface.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) +public fun ShaderProgramInterface.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt index 5d0ad0aa6..a477fac3b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMSharedBytes = io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes internal fun KMSharedBytes.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes.asKmp(): KMSharedBytes = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.SharedBytes.asKmp(): KMSharedBytes = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt index fdb8408e2..1288ed8d6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSizeType.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMSizeType = io.openmobilemaps.mapscore.shared.map.layers.SizeType internal fun KMSizeType.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.SizeType = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.SizeType.asKmp(): KMSizeType = this +public fun io.openmobilemaps.mapscore.shared.map.layers.SizeType.asKmp(): KMSizeType = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt index fc4bf1977..3d5368126 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -31,4 +31,4 @@ actual class KMSkySphereLayerInterface actual public constructor( } internal fun KMSkySphereLayerInterface.asPlatform(): SkySphereLayerInterface = nativeHandle as SkySphereLayerInterface -internal fun SkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) +public fun SkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt index a1e1cdbbd..44923b6f7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -22,4 +22,4 @@ actual class KMSkySphereShaderInterface actual public constructor( } internal fun KMSkySphereShaderInterface.asPlatform(): SkySphereShaderInterface = nativeHandle as SkySphereShaderInterface -internal fun SkySphereShaderInterface.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) +public fun SkySphereShaderInterface.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt index 229321411..c164c317c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -27,4 +27,4 @@ actual class KMSphereEffectLayerInterface actual public constructor( } internal fun KMSphereEffectLayerInterface.asPlatform(): SphereEffectLayerInterface = nativeHandle as SphereEffectLayerInterface -internal fun SphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) +public fun SphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt index 754db591f..007fa605c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -22,4 +22,4 @@ actual class KMSphereEffectShaderInterface actual public constructor( } internal fun KMSphereEffectShaderInterface.asPlatform(): SphereEffectShaderInterface = nativeHandle as SphereEffectShaderInterface -internal fun SphereEffectShaderInterface.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) +public fun SphereEffectShaderInterface.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt index 56f1e3e49..da85a6154 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -18,4 +18,4 @@ actual class KMStretchInstancedShaderInterface actual public constructor( } internal fun KMStretchInstancedShaderInterface.asPlatform(): StretchInstancedShaderInterface = nativeHandle as StretchInstancedShaderInterface -internal fun StretchInstancedShaderInterface.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) +public fun StretchInstancedShaderInterface.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt index 370fe7335..700bf5118 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMStretchShaderInfo = io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInfo internal fun KMStretchShaderInfo.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInfo = this -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInfo.asKmp(): KMStretchShaderInfo = this +public fun io.openmobilemaps.mapscore.shared.graphics.shader.StretchShaderInfo.asKmp(): KMStretchShaderInfo = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt index 1f27a9128..093401d0d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -26,4 +26,4 @@ actual class KMStretchShaderInterface actual public constructor( } internal fun KMStretchShaderInterface.asPlatform(): StretchShaderInterface = nativeHandle as StretchShaderInterface -internal fun StretchShaderInterface.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) +public fun StretchShaderInterface.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt index 4ba2c09f7..91f628377 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolAlignment.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMSymbolAlignment = io.openmobilemaps.mapscore.shared.map.layers.text.SymbolAlignment internal fun KMSymbolAlignment.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.SymbolAlignment = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.SymbolAlignment.asKmp(): KMSymbolAlignment = this +public fun io.openmobilemaps.mapscore.shared.map.layers.text.SymbolAlignment.asKmp(): KMSymbolAlignment = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt index 371e71925..8372c2d39 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSymbolZOrder.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMSymbolZOrder = io.openmobilemaps.mapscore.shared.map.layers.text.SymbolZOrder internal fun KMSymbolZOrder.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.SymbolZOrder = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.SymbolZOrder.asKmp(): KMSymbolZOrder = this +public fun io.openmobilemaps.mapscore.shared.map.layers.text.SymbolZOrder.asKmp(): KMSymbolZOrder = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt index 24672c0ca..5d438b862 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTaskConfig = io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig internal fun KMTaskConfig.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig = this -internal fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig.asKmp(): KMTaskConfig = this +public fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskConfig.asKmp(): KMTaskConfig = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt index 75405ef0f..fba0204e6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt @@ -43,4 +43,4 @@ internal fun KMTaskInterface.asPlatform(): TaskInterface = when (this) { is KMTaskInterfacePlatformWrapper -> this.nativeHandle else -> KMTaskInterfacePlatformProxy(this) } -internal fun TaskInterface.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) +public fun TaskInterface.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt index 3cfd44484..3b33b8259 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskPriority.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTaskPriority = io.openmobilemaps.mapscore.shared.map.scheduling.TaskPriority internal fun KMTaskPriority.asPlatform(): io.openmobilemaps.mapscore.shared.map.scheduling.TaskPriority = this -internal fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskPriority.asKmp(): KMTaskPriority = this +public fun io.openmobilemaps.mapscore.shared.map.scheduling.TaskPriority.asKmp(): KMTaskPriority = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt index 8d767bf39..878c4aa69 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTessellationMode.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTessellationMode = io.openmobilemaps.mapscore.shared.graphics.shader.TessellationMode internal fun KMTessellationMode.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.shader.TessellationMode = this -internal fun io.openmobilemaps.mapscore.shared.graphics.shader.TessellationMode.asKmp(): KMTessellationMode = this +public fun io.openmobilemaps.mapscore.shared.graphics.shader.TessellationMode.asKmp(): KMTessellationMode = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt index 09d219a5c..62fc6cb2a 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTextDescription = io.openmobilemaps.mapscore.shared.graphics.objects.TextDescription internal fun KMTextDescription.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextDescription = this -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextDescription.asKmp(): KMTextDescription = this +public fun io.openmobilemaps.mapscore.shared.graphics.objects.TextDescription.asKmp(): KMTextDescription = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt index 782d7c3e8..b0d58e6e4 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -22,4 +22,4 @@ actual class KMTextFactory actual public constructor( } internal fun KMTextFactory.asPlatform(): TextFactory = nativeHandle as TextFactory -internal fun TextFactory.asKmp(): KMTextFactory = KMTextFactory(this) +public fun TextFactory.asKmp(): KMTextFactory = KMTextFactory(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt index e19bd59ed..5a6473a0d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt @@ -105,4 +105,4 @@ internal fun KMTextInfoInterface.asPlatform(): TextInfoInterface = when (this) { is KMTextInfoInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInfoInterfacePlatformProxy(this) } -internal fun TextInfoInterface.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) +public fun TextInfoInterface.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt index f78c7aa37..44603e313 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -153,4 +153,4 @@ internal fun KMTextInstancedInterface.asPlatform(): TextInstancedInterface = whe is KMTextInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInstancedInterfacePlatformProxy(this) } -internal fun TextInstancedInterface.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) +public fun TextInstancedInterface.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt index 5dc963265..687b5e44d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -18,4 +18,4 @@ actual class KMTextInstancedShaderInterface actual public constructor( } internal fun KMTextInstancedShaderInterface.asPlatform(): TextInstancedShaderInterface = nativeHandle as TextInstancedShaderInterface -internal fun TextInstancedShaderInterface.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) +public fun TextInstancedShaderInterface.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt index 3a6ff5a78..355a6985c 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -63,4 +63,4 @@ internal fun KMTextInterface.asPlatform(): TextInterface = when (this) { is KMTextInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInterfacePlatformProxy(this) } -internal fun TextInterface.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) +public fun TextInterface.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt index c35aebff8..99c284fa2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextJustify.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTextJustify = io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify internal fun KMTextJustify.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify.asKmp(): KMTextJustify = this +public fun io.openmobilemaps.mapscore.shared.map.layers.text.TextJustify.asKmp(): KMTextJustify = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt index 9d8388043..ebf463915 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -35,4 +35,4 @@ actual class KMTextLayerInterface actual public constructor( } internal fun KMTextLayerInterface.asPlatform(): TextLayerInterface = nativeHandle as TextLayerInterface -internal fun TextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) +public fun TextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt index 468839e0c..92f258aa5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -30,4 +30,4 @@ actual class KMTextShaderInterface actual public constructor( } internal fun KMTextShaderInterface.asPlatform(): TextShaderInterface = nativeHandle as TextShaderInterface -internal fun TextShaderInterface.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) +public fun TextShaderInterface.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt index d5ed82843..1f0c244e1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextSymbolPlacement.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTextSymbolPlacement = io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement internal fun KMTextSymbolPlacement.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement.asKmp(): KMTextSymbolPlacement = this +public fun io.openmobilemaps.mapscore.shared.map.layers.text.TextSymbolPlacement.asKmp(): KMTextSymbolPlacement = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index f5482f325..c011cfdf7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -15,7 +15,7 @@ internal fun KMTextureAtlas.asPlatform(): io.openmobilemaps.mapscore.shared.grap uvMap = HashMap(uvMap.map { it.key to it.value.asPlatform() }.toMap()), texture = texture?.let { it.asPlatform() }, ) -internal fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( +public fun io.openmobilemaps.mapscore.shared.graphics.TextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( uvMap = HashMap(this.uvMap.map { it.key to (it.value as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }.toMap()), texture = this.texture?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, ) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt index 8ece2ed05..8857a66b8 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureFilterType.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTextureFilterType = io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType internal fun KMTextureFilterType.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType = this -internal fun io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType.asKmp(): KMTextureFilterType = this +public fun io.openmobilemaps.mapscore.shared.graphics.objects.TextureFilterType.asKmp(): KMTextureFilterType = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt index 59ca5e70f..a2d724c76 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt @@ -91,4 +91,4 @@ internal fun KMTextureHolderInterface.asPlatform(): TextureHolderInterface = whe is KMTextureHolderInterfacePlatformWrapper -> this.nativeHandle else -> KMTextureHolderInterfacePlatformProxy(this) } -internal fun TextureHolderInterface.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) +public fun TextureHolderInterface.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index fb44676dd..41e049d06 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -21,7 +21,7 @@ internal fun KMTextureLoaderResult.asPlatform(): io.openmobilemaps.mapscore.shar status = status.asPlatform(), errorCode = errorCode?.let { it }, ) -internal fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( +public fun io.openmobilemaps.mapscore.shared.map.loader.TextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( data = this.data?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, etag = this.etag?.let { it }, status = (this.status as io.openmobilemaps.mapscore.shared.map.loader.LoaderStatus).asKmp(), diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt index ba6efb087..7e77269bb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -22,4 +22,4 @@ actual class KMThreadPoolScheduler actual public constructor( } internal fun KMThreadPoolScheduler.asPlatform(): ThreadPoolScheduler = nativeHandle as ThreadPoolScheduler -internal fun ThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) +public fun ThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt index adc330b9f..ee7d8703f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt @@ -117,4 +117,4 @@ internal fun KMTiled2dMapLayerConfig.asPlatform(): Tiled2dMapLayerConfig = when is KMTiled2dMapLayerConfigPlatformWrapper -> this.nativeHandle else -> KMTiled2dMapLayerConfigPlatformProxy(this) } -internal fun Tiled2dMapLayerConfig.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) +public fun Tiled2dMapLayerConfig.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt index 48e6b0168..2219413e0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt @@ -45,4 +45,4 @@ internal fun KMTiled2dMapRasterLayerCallbackInterface.asPlatform(): Tiled2dMapRa is KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(this) } -internal fun Tiled2dMapRasterLayerCallbackInterface.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) +public fun Tiled2dMapRasterLayerCallbackInterface.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt index e85455a66..24a127443 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -111,4 +111,4 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( } internal fun KMTiled2dMapRasterLayerInterface.asPlatform(): Tiled2dMapRasterLayerInterface = nativeHandle as Tiled2dMapRasterLayerInterface -internal fun Tiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) +public fun Tiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt index 04b2d8a42..4b6c5d6c0 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt @@ -31,4 +31,4 @@ internal fun KMTiled2dMapReadyStateListener.asPlatform(): Tiled2dMapReadyStateLi is KMTiled2dMapReadyStateListenerPlatformWrapper -> this.nativeHandle else -> KMTiled2dMapReadyStateListenerPlatformProxy(this) } -internal fun Tiled2dMapReadyStateListener.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) +public fun Tiled2dMapReadyStateListener.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt index aa7240479..4b26312a6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -64,4 +64,4 @@ actual class KMTiled2dMapSourceInterface actual public constructor( } internal fun KMTiled2dMapSourceInterface.asPlatform(): Tiled2dMapSourceInterface = nativeHandle as Tiled2dMapSourceInterface -internal fun Tiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) +public fun Tiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index 745243aab..71af3c2a6 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -15,7 +15,7 @@ internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): io.openmobilemaps.mapscor featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asPlatform() }.toMap()), texture = texture?.let { it.asPlatform() }, ) -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.Tiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( featureIdentifiersUv = HashMap(this.featureIdentifiersUv.map { it.key to (it.value as io.openmobilemaps.mapscore.shared.graphics.common.RectI).asKmp() }.toMap()), texture = this.texture?.let { (it as io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface).asKmp() }, ) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt index cb4e2f7b0..1151bd882 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -88,4 +88,4 @@ actual class KMTiled2dMapVectorLayerInterface actual public constructor( } internal fun KMTiled2dMapVectorLayerInterface.asPlatform(): Tiled2dMapVectorLayerInterface = nativeHandle as Tiled2dMapVectorLayerInterface -internal fun Tiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) +public fun Tiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt index 780d1defa..7299320c3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -69,4 +69,4 @@ internal fun KMTiled2dMapVectorLayerLocalDataProviderInterface.asPlatform(): Til is KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(this) } -internal fun Tiled2dMapVectorLayerLocalDataProviderInterface.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) +public fun Tiled2dMapVectorLayerLocalDataProviderInterface.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt index 3af9227a6..4c262a2d5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt @@ -57,4 +57,4 @@ internal fun KMTiled2dMapVectorLayerSelectionCallbackInterface.asPlatform(): Til is KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(this) } -internal fun Tiled2dMapVectorLayerSelectionCallbackInterface.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) +public fun Tiled2dMapVectorLayerSelectionCallbackInterface.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt index ee42ffed4..db6b4c262 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt @@ -33,4 +33,4 @@ internal fun KMTiled2dMapVectorLayerSymbolDelegateInterface.asPlatform(): Tiled2 is KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(this) } -internal fun Tiled2dMapVectorLayerSymbolDelegateInterface.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) +public fun Tiled2dMapVectorLayerSymbolDelegateInterface.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt index 939ce8a27..f8dbc4989 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTiled2dMapVectorSettings = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings internal fun KMTiled2dMapVectorSettings.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings.asKmp(): KMTiled2dMapVectorSettings = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorSettings.asKmp(): KMTiled2dMapVectorSettings = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt index 0bb162350..bf2a319af 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorTileOrigin.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTiled2dMapVectorTileOrigin = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorTileOrigin internal fun KMTiled2dMapVectorTileOrigin.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorTileOrigin = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorTileOrigin.asKmp(): KMTiled2dMapVectorTileOrigin = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapVectorTileOrigin.asKmp(): KMTiled2dMapVectorTileOrigin = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt index a766ea2a5..a038b9383 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTiled2dMapZoomInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo internal fun KMTiled2dMapZoomInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo.asKmp(): KMTiled2dMapZoomInfo = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomInfo.asKmp(): KMTiled2dMapZoomInfo = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt index bdef17a83..686528c6f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTiled2dMapZoomLevelInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo internal fun KMTiled2dMapZoomLevelInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo.asKmp(): KMTiled2dMapZoomLevelInfo = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.Tiled2dMapZoomLevelInfo.asKmp(): KMTiled2dMapZoomLevelInfo = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt index f64cad6ff..0c387b1ce 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTiledLayerError = io.openmobilemaps.mapscore.shared.map.TiledLayerError internal fun KMTiledLayerError.asPlatform(): io.openmobilemaps.mapscore.shared.map.TiledLayerError = this -internal fun io.openmobilemaps.mapscore.shared.map.TiledLayerError.asKmp(): KMTiledLayerError = this +public fun io.openmobilemaps.mapscore.shared.map.TiledLayerError.asKmp(): KMTiledLayerError = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt index 9980cf871..55e7491e7 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchAction.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTouchAction = io.openmobilemaps.mapscore.shared.map.controls.TouchAction internal fun KMTouchAction.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchAction = this -internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchAction.asKmp(): KMTouchAction = this +public fun io.openmobilemaps.mapscore.shared.map.controls.TouchAction.asKmp(): KMTouchAction = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt index 2f2418e21..ca5f4c5aa 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMTouchEvent = io.openmobilemaps.mapscore.shared.map.controls.TouchEvent internal fun KMTouchEvent.asPlatform(): io.openmobilemaps.mapscore.shared.map.controls.TouchEvent = this -internal fun io.openmobilemaps.mapscore.shared.map.controls.TouchEvent.asKmp(): KMTouchEvent = this +public fun io.openmobilemaps.mapscore.shared.map.controls.TouchEvent.asKmp(): KMTouchEvent = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt index a859c0ff3..7360a3133 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -61,4 +61,4 @@ internal fun KMTouchHandlerInterface.asPlatform(): TouchHandlerInterface = when is KMTouchHandlerInterfacePlatformWrapper -> this.nativeHandle else -> KMTouchHandlerInterfacePlatformProxy(this) } -internal fun TouchHandlerInterface.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) +public fun TouchHandlerInterface.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt index b3220f98f..1f965dc7b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -175,4 +175,4 @@ internal fun KMTouchInterface.asPlatform(): TouchInterface = when (this) { is KMTouchInterfacePlatformWrapper -> this.nativeHandle else -> KMTouchInterfacePlatformProxy(this) } -internal fun TouchInterface.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) +public fun TouchInterface.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt index ba75add22..39c1f0f3f 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVec2D = io.openmobilemaps.mapscore.shared.graphics.common.Vec2D internal fun KMVec2D.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec2D = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2D.asKmp(): KMVec2D = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2D.asKmp(): KMVec2D = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt index 70128616c..eca9798b2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVec2F = io.openmobilemaps.mapscore.shared.graphics.common.Vec2F internal fun KMVec2F.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec2F = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2F.asKmp(): KMVec2F = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2F.asKmp(): KMVec2F = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt index 490273d42..e14bcea5b 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVec2I = io.openmobilemaps.mapscore.shared.graphics.common.Vec2I internal fun KMVec2I.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec2I = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2I.asKmp(): KMVec2I = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Vec2I.asKmp(): KMVec2I = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt index 514a92cc2..4e28085eb 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVec3D = io.openmobilemaps.mapscore.shared.graphics.common.Vec3D internal fun KMVec3D.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec3D = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3D.asKmp(): KMVec3D = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3D.asKmp(): KMVec3D = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt index b24a967cc..d73c9a6ff 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVec3F = io.openmobilemaps.mapscore.shared.graphics.common.Vec3F internal fun KMVec3F.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec3F = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3F.asKmp(): KMVec3F = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3F.asKmp(): KMVec3F = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt index a0b1b5051..48a421e5d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVec3I = io.openmobilemaps.mapscore.shared.graphics.common.Vec3I internal fun KMVec3I.asPlatform(): io.openmobilemaps.mapscore.shared.graphics.common.Vec3I = this -internal fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3I.asKmp(): KMVec3I = this +public fun io.openmobilemaps.mapscore.shared.graphics.common.Vec3I.asKmp(): KMVec3I = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt index c62de52ca..dbaf139b3 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVectorLayerFeatureCoordInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo internal fun KMVectorLayerFeatureCoordInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo.asKmp(): KMVectorLayerFeatureCoordInfo = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureCoordInfo.asKmp(): KMVectorLayerFeatureCoordInfo = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt index d214feddd..35aeb85f2 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVectorLayerFeatureInfo = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo internal fun KMVectorLayerFeatureInfo.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo.asKmp(): KMVectorLayerFeatureInfo = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfo.asKmp(): KMVectorLayerFeatureInfo = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt index d925c068b..0551cbbbc 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMVectorLayerFeatureInfoValue = io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue internal fun KMVectorLayerFeatureInfoValue.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue.asKmp(): KMVectorLayerFeatureInfoValue = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.vector.VectorLayerFeatureInfoValue.asKmp(): KMVectorLayerFeatureInfoValue = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt index 9b51d39c9..5c308e90d 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -67,4 +67,4 @@ actual class KMWmtsCapabilitiesResource actual public constructor( } internal fun KMWmtsCapabilitiesResource.asPlatform(): WmtsCapabilitiesResource = nativeHandle as WmtsCapabilitiesResource -internal fun WmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) +public fun WmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt index 0e956c4d2..d45d969b5 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMWmtsLayerDescription = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription internal fun KMWmtsLayerDescription.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription.asKmp(): KMWmtsLayerDescription = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDescription.asKmp(): KMWmtsLayerDescription = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt index fcc55afc8..c9abd06ef 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMWmtsLayerDimension = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDimension internal fun KMWmtsLayerDimension.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDimension = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDimension.asKmp(): KMWmtsLayerDimension = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsLayerDimension.asKmp(): KMWmtsLayerDimension = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt index 7cf317e77..b674f56da 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMWmtsTileMatrix = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrix internal fun KMWmtsTileMatrix.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrix = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrix.asKmp(): KMWmtsTileMatrix = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrix.asKmp(): KMWmtsTileMatrix = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt index a9f111c90..73acce2da 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt @@ -6,4 +6,4 @@ package io.openmobilemaps.mapscore.kmp actual typealias KMWmtsTileMatrixSet = io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrixSet internal fun KMWmtsTileMatrixSet.asPlatform(): io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrixSet = this -internal fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrixSet.asKmp(): KMWmtsTileMatrixSet = this +public fun io.openmobilemaps.mapscore.shared.map.layers.tiled.raster.wmts.WmtsTileMatrixSet.asKmp(): KMWmtsTileMatrixSet = this diff --git a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt index cff5ac2a5..f04f04ef1 100644 --- a/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt +++ b/bridging/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -22,4 +22,4 @@ actual class KMWmtsTiled2dMapLayerConfigFactory actual public constructor( } internal fun KMWmtsTiled2dMapLayerConfigFactory.asPlatform(): WmtsTiled2dMapLayerConfigFactory = nativeHandle as WmtsTiled2dMapLayerConfigFactory -internal fun WmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) +public fun WmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt index 196323de7..855b47adc 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaInstancedShaderInterface.kt @@ -23,4 +23,4 @@ actual class KMAlphaInstancedShaderInterface actual public constructor( } internal fun KMAlphaInstancedShaderInterface.asPlatform(): MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) +public fun MapCoreSharedModule.MCAlphaInstancedShaderInterfaceProtocol.asKmp(): KMAlphaInstancedShaderInterface = KMAlphaInstancedShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt index fa16f3851..b45067faf 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMAlphaShaderInterface.kt @@ -27,4 +27,4 @@ actual class KMAlphaShaderInterface actual public constructor( } internal fun KMAlphaShaderInterface.asPlatform(): MapCoreSharedModule.MCAlphaShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCAlphaShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCAlphaShaderInterfaceProtocol.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) +public fun MapCoreSharedModule.MCAlphaShaderInterfaceProtocol.asKmp(): KMAlphaShaderInterface = KMAlphaShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt index d1f05e228..25d6a9d86 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMBoundingBoxInterface.kt @@ -56,4 +56,4 @@ actual class KMBoundingBoxInterface actual public constructor( } internal fun KMBoundingBoxInterface.asPlatform(): MapCoreSharedModule.MCBoundingBoxInterface = nativeHandle as MapCoreSharedModule.MCBoundingBoxInterface -internal fun MapCoreSharedModule.MCBoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) +public fun MapCoreSharedModule.MCBoundingBoxInterface.asKmp(): KMBoundingBoxInterface = KMBoundingBoxInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt index fd01ba78e..eb6c1ede9 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfig.kt @@ -40,7 +40,7 @@ internal fun KMCamera3dConfig.asPlatform(): MapCoreSharedModule.MCCamera3dConfig pitchInterpolationValues = pitchInterpolationValues.asPlatform(), verticalDisplacementInterpolationValues = verticalDisplacementInterpolationValues.asPlatform(), ) -internal fun MapCoreSharedModule.MCCamera3dConfig.asKmp(): KMCamera3dConfig = KMCamera3dConfig( +public fun MapCoreSharedModule.MCCamera3dConfig.asKmp(): KMCamera3dConfig = KMCamera3dConfig( key = this.key, allowUserInteraction = this.allowUserInteraction, rotationSpeed = this.rotationSpeed?.let { (it as platform.Foundation.NSNumber).floatValue }, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt index f6849df6c..173a7ca60 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCamera3dConfigFactory.kt @@ -32,4 +32,4 @@ actual class KMCamera3dConfigFactory actual public constructor( } internal fun KMCamera3dConfigFactory.asPlatform(): MapCoreSharedModule.MCCamera3dConfigFactory = nativeHandle as MapCoreSharedModule.MCCamera3dConfigFactory -internal fun MapCoreSharedModule.MCCamera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) +public fun MapCoreSharedModule.MCCamera3dConfigFactory.asKmp(): KMCamera3dConfigFactory = KMCamera3dConfigFactory(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt index c8136dfb2..a0c28b027 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterface.kt @@ -73,4 +73,4 @@ internal fun KMCameraInterface.asPlatform(): MapCoreSharedModule.MCCameraInterfa is KMCameraInterfacePlatformWrapper -> this.nativeHandle else -> KMCameraInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCCameraInterfaceProtocol.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCCameraInterfaceProtocol.asKmp(): KMCameraInterface = KMCameraInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt index acae655bc..58168eadf 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolation.kt @@ -19,6 +19,6 @@ actual class KMCameraInterpolation actual public constructor( internal fun KMCameraInterpolation.asPlatform(): MapCoreSharedModule.MCCameraInterpolation = MapCoreSharedModule.MCCameraInterpolation( stops = ArrayList(stops.map { it.asPlatform() }), ) -internal fun MapCoreSharedModule.MCCameraInterpolation.asKmp(): KMCameraInterpolation = KMCameraInterpolation( +public fun MapCoreSharedModule.MCCameraInterpolation.asKmp(): KMCameraInterpolation = KMCameraInterpolation( stops = ArrayList(((this.stops as? List<*>)?.map { (it as MapCoreSharedModule.MCCameraInterpolationValue).asKmp() } ?: (0 until (this.stops as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.stops as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCameraInterpolationValue).asKmp() })), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt index f6e538b18..2b97b8adf 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCameraInterpolationValue.kt @@ -22,7 +22,7 @@ internal fun KMCameraInterpolationValue.asPlatform(): MapCoreSharedModule.MCCame stop = stop, value = value, ) -internal fun MapCoreSharedModule.MCCameraInterpolationValue.asKmp(): KMCameraInterpolationValue = KMCameraInterpolationValue( +public fun MapCoreSharedModule.MCCameraInterpolationValue.asKmp(): KMCameraInterpolationValue = KMCameraInterpolationValue( stop = this.stop, value = this.value, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt index 42240e033..30851c423 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleD.kt @@ -25,7 +25,7 @@ internal fun KMCircleD.asPlatform(): MapCoreSharedModule.MCCircleD = MapCoreShar y = y, radius = radius, ) -internal fun MapCoreSharedModule.MCCircleD.asKmp(): KMCircleD = KMCircleD( +public fun MapCoreSharedModule.MCCircleD.asKmp(): KMCircleD = KMCircleD( x = this.x, y = this.y, radius = this.radius, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt index ed736a8e6..4058c82f0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleF.kt @@ -25,7 +25,7 @@ internal fun KMCircleF.asPlatform(): MapCoreSharedModule.MCCircleF = MapCoreShar y = y, radius = radius, ) -internal fun MapCoreSharedModule.MCCircleF.asKmp(): KMCircleF = KMCircleF( +public fun MapCoreSharedModule.MCCircleF.asKmp(): KMCircleF = KMCircleF( x = this.x, y = this.y, radius = this.radius, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt index 9e30fb804..76968952d 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCircleI.kt @@ -25,7 +25,7 @@ internal fun KMCircleI.asPlatform(): MapCoreSharedModule.MCCircleI = MapCoreShar y = y, radius = radius, ) -internal fun MapCoreSharedModule.MCCircleI.asKmp(): KMCircleI = KMCircleI( +public fun MapCoreSharedModule.MCCircleI.asKmp(): KMCircleI = KMCircleI( x = this.x, y = this.y, radius = this.radius, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt index 15118b851..7f2d7ca78 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColor.kt @@ -28,7 +28,7 @@ internal fun KMColor.asPlatform(): MapCoreSharedModule.MCColor = MapCoreSharedMo b = b, a = a, ) -internal fun MapCoreSharedModule.MCColor.asKmp(): KMColor = KMColor( +public fun MapCoreSharedModule.MCColor.asKmp(): KMColor = KMColor( r = this.r, g = this.g, b = this.b, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt index 654e4583d..9441b761c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorCircleShaderInterface.kt @@ -27,4 +27,4 @@ actual class KMColorCircleShaderInterface actual public constructor( } internal fun KMColorCircleShaderInterface.asPlatform(): MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) +public fun MapCoreSharedModule.MCColorCircleShaderInterfaceProtocol.asKmp(): KMColorCircleShaderInterface = KMColorCircleShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt index 8c8129daf..998668713 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorShaderInterface.kt @@ -27,4 +27,4 @@ actual class KMColorShaderInterface actual public constructor( } internal fun KMColorShaderInterface.asPlatform(): MapCoreSharedModule.MCColorShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCColorShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCColorShaderInterfaceProtocol.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) +public fun MapCoreSharedModule.MCColorShaderInterfaceProtocol.asKmp(): KMColorShaderInterface = KMColorShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt index a8c8e2c6a..8a1a398ce 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMColorStateList.kt @@ -22,7 +22,7 @@ internal fun KMColorStateList.asPlatform(): MapCoreSharedModule.MCColorStateList normal = normal.asPlatform(), highlighted = highlighted.asPlatform(), ) -internal fun MapCoreSharedModule.MCColorStateList.asKmp(): KMColorStateList = KMColorStateList( +public fun MapCoreSharedModule.MCColorStateList.asKmp(): KMColorStateList = KMColorStateList( normal = (this.normal as MapCoreSharedModule.MCColor).asKmp(), highlighted = (this.highlighted as MapCoreSharedModule.MCColor).asKmp(), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt index b96cf6cc8..0fb5e5178 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputeObjectInterface.kt @@ -37,4 +37,4 @@ internal fun KMComputeObjectInterface.asPlatform(): MapCoreSharedModule.MCComput is KMComputeObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMComputeObjectInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCComputeObjectInterfaceProtocol.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCComputeObjectInterfaceProtocol.asKmp(): KMComputeObjectInterface = KMComputeObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt index c83a1866a..d5793cb91 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMComputePassInterface.kt @@ -39,4 +39,4 @@ internal fun KMComputePassInterface.asPlatform(): MapCoreSharedModule.MCComputeP is KMComputePassInterfacePlatformWrapper -> this.nativeHandle else -> KMComputePassInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCComputePassInterfaceProtocol.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCComputePassInterfaceProtocol.asKmp(): KMComputePassInterface = KMComputePassInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt index f3c4ec611..e02706839 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoord.kt @@ -28,7 +28,7 @@ internal fun KMCoord.asPlatform(): MapCoreSharedModule.MCCoord = MapCoreSharedMo y = y, z = z, ) -internal fun MapCoreSharedModule.MCCoord.asKmp(): KMCoord = KMCoord( +public fun MapCoreSharedModule.MCCoord.asKmp(): KMCoord = KMCoord( systemIdentifier = this.systemIdentifier, x = this.x, y = this.y, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt index e4797dbe1..bad626b18 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConversionHelperInterface.kt @@ -61,4 +61,4 @@ actual class KMCoordinateConversionHelperInterface actual public constructor( } internal fun KMCoordinateConversionHelperInterface.asPlatform(): MapCoreSharedModule.MCCoordinateConversionHelperInterface = nativeHandle as MapCoreSharedModule.MCCoordinateConversionHelperInterface -internal fun MapCoreSharedModule.MCCoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) +public fun MapCoreSharedModule.MCCoordinateConversionHelperInterface.asKmp(): KMCoordinateConversionHelperInterface = KMCoordinateConversionHelperInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt index f0b49c37a..d12e36519 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateConverterInterface.kt @@ -63,4 +63,4 @@ internal fun KMCoordinateConverterInterface.asPlatform(): MapCoreSharedModule.MC is KMCoordinateConverterInterfacePlatformWrapper -> this.nativeHandle else -> KMCoordinateConverterInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCCoordinateConverterInterfaceProtocol.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCCoordinateConverterInterfaceProtocol.asKmp(): KMCoordinateConverterInterface = KMCoordinateConverterInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt index b767f0995..3561b0720 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemFactory.kt @@ -47,4 +47,4 @@ actual class KMCoordinateSystemFactory actual public constructor( } internal fun KMCoordinateSystemFactory.asPlatform(): MapCoreSharedModule.MCCoordinateSystemFactory = nativeHandle as MapCoreSharedModule.MCCoordinateSystemFactory -internal fun MapCoreSharedModule.MCCoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) +public fun MapCoreSharedModule.MCCoordinateSystemFactory.asKmp(): KMCoordinateSystemFactory = KMCoordinateSystemFactory(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt index 2f477f986..96422cdaf 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCoordinateSystemIdentifiers.kt @@ -62,4 +62,4 @@ actual class KMCoordinateSystemIdentifiers actual public constructor( } internal fun KMCoordinateSystemIdentifiers.asPlatform(): MapCoreSharedModule.MCCoordinateSystemIdentifiers = nativeHandle as MapCoreSharedModule.MCCoordinateSystemIdentifiers -internal fun MapCoreSharedModule.MCCoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) +public fun MapCoreSharedModule.MCCoordinateSystemIdentifiers.asKmp(): KMCoordinateSystemIdentifiers = KMCoordinateSystemIdentifiers(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt index 710aa2a42..fc99700a1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMCpuPerformanceLoggerInterface.kt @@ -37,4 +37,4 @@ actual class KMCpuPerformanceLoggerInterface actual public constructor( } internal fun KMCpuPerformanceLoggerInterface.asPlatform(): MapCoreSharedModule.MCCpuPerformanceLoggerInterface = nativeHandle as MapCoreSharedModule.MCCpuPerformanceLoggerInterface -internal fun MapCoreSharedModule.MCCpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) +public fun MapCoreSharedModule.MCCpuPerformanceLoggerInterface.asKmp(): KMCpuPerformanceLoggerInterface = KMCpuPerformanceLoggerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt index 439233cae..26544fab3 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDataLoaderResult.kt @@ -28,7 +28,7 @@ internal fun KMDataLoaderResult.asPlatform(): MapCoreSharedModule.MCDataLoaderRe status = status.asPlatform(), errorCode = errorCode?.let { it }, ) -internal fun MapCoreSharedModule.MCDataLoaderResult.asKmp(): KMDataLoaderResult = KMDataLoaderResult( +public fun MapCoreSharedModule.MCDataLoaderResult.asKmp(): KMDataLoaderResult = KMDataLoaderResult( data = this.data?.let { (it as platform.Foundation.NSData).asKmp() }, etag = this.etag?.let { (it as String) }, status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt index d71250c96..11c0cdd7a 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTiled2dMapLayerConfigs.kt @@ -42,4 +42,4 @@ actual class KMDefaultTiled2dMapLayerConfigs actual public constructor( } internal fun KMDefaultTiled2dMapLayerConfigs.asPlatform(): MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs = nativeHandle as MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs -internal fun MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) +public fun MapCoreSharedModule.MCDefaultTiled2dMapLayerConfigs.asKmp(): KMDefaultTiled2dMapLayerConfigs = KMDefaultTiled2dMapLayerConfigs(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt index a209ba25e..970d3a232 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMDefaultTouchHandlerInterface.kt @@ -27,4 +27,4 @@ actual class KMDefaultTouchHandlerInterface actual public constructor( } internal fun KMDefaultTouchHandlerInterface.asPlatform(): MapCoreSharedModule.MCDefaultTouchHandlerInterface = nativeHandle as MapCoreSharedModule.MCDefaultTouchHandlerInterface -internal fun MapCoreSharedModule.MCDefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) +public fun MapCoreSharedModule.MCDefaultTouchHandlerInterface.asKmp(): KMDefaultTouchHandlerInterface = KMDefaultTouchHandlerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt index 6bf5a57bd..ca829d801 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMElevationInterpolationShaderInterface.kt @@ -23,4 +23,4 @@ actual class KMElevationInterpolationShaderInterface actual public constructor( } internal fun KMElevationInterpolationShaderInterface.asPlatform(): MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) +public fun MapCoreSharedModule.MCElevationInterpolationShaderInterfaceProtocol.asKmp(): KMElevationInterpolationShaderInterface = KMElevationInterpolationShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt index 1c5649a69..1e0e9e6c1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManager.kt @@ -51,4 +51,4 @@ actual class KMErrorManager actual public constructor( } internal fun KMErrorManager.asPlatform(): MapCoreSharedModule.MCErrorManager = nativeHandle as MapCoreSharedModule.MCErrorManager -internal fun MapCoreSharedModule.MCErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) +public fun MapCoreSharedModule.MCErrorManager.asKmp(): KMErrorManager = KMErrorManager(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt index 3a4f9a23a..47a4d863b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMErrorManagerListener.kt @@ -37,4 +37,4 @@ internal fun KMErrorManagerListener.asPlatform(): MapCoreSharedModule.MCErrorMan is KMErrorManagerListenerPlatformWrapper -> this.nativeHandle else -> KMErrorManagerListenerPlatformProxy(this) } -internal fun MapCoreSharedModule.MCErrorManagerListenerProtocol.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) +public fun MapCoreSharedModule.MCErrorManagerListenerProtocol.asKmp(): KMErrorManagerListener = KMErrorManagerListenerPlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt index 8367f14b8..f353d3302 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerDelegateInterface.kt @@ -37,4 +37,4 @@ internal fun KMExceptionLoggerDelegateInterface.asPlatform(): MapCoreSharedModul is KMExceptionLoggerDelegateInterfacePlatformWrapper -> this.nativeHandle else -> KMExceptionLoggerDelegateInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCExceptionLoggerDelegateInterfaceProtocol.asKmp(): KMExceptionLoggerDelegateInterface = KMExceptionLoggerDelegateInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt index 666cd18b8..0dfe2eb32 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMExceptionLoggerInterface.kt @@ -26,4 +26,4 @@ actual class KMExceptionLoggerInterface actual public constructor( } internal fun KMExceptionLoggerInterface.asPlatform(): MapCoreSharedModule.MCExceptionLoggerInterface = nativeHandle as MapCoreSharedModule.MCExceptionLoggerInterface -internal fun MapCoreSharedModule.MCExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) +public fun MapCoreSharedModule.MCExceptionLoggerInterface.asKmp(): KMExceptionLoggerInterface = KMExceptionLoggerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt index 2e2a74f63..19e0fbb11 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFeatureInfoValueFactory.kt @@ -57,4 +57,4 @@ actual class KMFeatureInfoValueFactory actual public constructor( } internal fun KMFeatureInfoValueFactory.asPlatform(): MapCoreSharedModule.MCFeatureInfoValueFactory = nativeHandle as MapCoreSharedModule.MCFeatureInfoValueFactory -internal fun MapCoreSharedModule.MCFeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) +public fun MapCoreSharedModule.MCFeatureInfoValueFactory.asKmp(): KMFeatureInfoValueFactory = KMFeatureInfoValueFactory(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt index edf8a5529..2601588bd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFont.kt @@ -19,6 +19,6 @@ actual class KMFont actual public constructor( internal fun KMFont.asPlatform(): MapCoreSharedModule.MCFont = MapCoreSharedModule.MCFont( name = name, ) -internal fun MapCoreSharedModule.MCFont.asKmp(): KMFont = KMFont( +public fun MapCoreSharedModule.MCFont.asKmp(): KMFont = KMFont( name = this.name, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt index 58adcd6ec..b011dc113 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontData.kt @@ -22,7 +22,7 @@ internal fun KMFontData.asPlatform(): MapCoreSharedModule.MCFontData = MapCoreSh info = info.asPlatform(), glyphs = ArrayList(glyphs.map { it.asPlatform() }), ) -internal fun MapCoreSharedModule.MCFontData.asKmp(): KMFontData = KMFontData( +public fun MapCoreSharedModule.MCFontData.asKmp(): KMFontData = KMFontData( info = (this.info as MapCoreSharedModule.MCFontWrapper).asKmp(), glyphs = ArrayList(((this.glyphs as? List<*>)?.map { (it as MapCoreSharedModule.MCFontGlyph).asKmp() } ?: (0 until (this.glyphs as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.glyphs as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCFontGlyph).asKmp() })), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt index d8d5e9517..2c306ba86 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontGlyph.kt @@ -31,7 +31,7 @@ internal fun KMFontGlyph.asPlatform(): MapCoreSharedModule.MCFontGlyph = MapCore bearing = bearing.asPlatform(), uv = uv.asPlatform(), ) -internal fun MapCoreSharedModule.MCFontGlyph.asKmp(): KMFontGlyph = KMFontGlyph( +public fun MapCoreSharedModule.MCFontGlyph.asKmp(): KMFontGlyph = KMFontGlyph( charCode = this.charCode, advance = (this.advance as MapCoreSharedModule.MCVec2D).asKmp(), boundingBoxSize = (this.boundingBoxSize as MapCoreSharedModule.MCVec2D).asKmp(), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt index 47d407324..0090687a8 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderInterface.kt @@ -39,4 +39,4 @@ internal fun KMFontLoaderInterface.asPlatform(): MapCoreSharedModule.MCFontLoade is KMFontLoaderInterfacePlatformWrapper -> this.nativeHandle else -> KMFontLoaderInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCFontLoaderInterfaceProtocol.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCFontLoaderInterfaceProtocol.asKmp(): KMFontLoaderInterface = KMFontLoaderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt index 5de1bc304..447a08e68 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontLoaderResult.kt @@ -25,7 +25,7 @@ internal fun KMFontLoaderResult.asPlatform(): MapCoreSharedModule.MCFontLoaderRe fontData = fontData?.let { it.asPlatform() }, status = status.asPlatform(), ) -internal fun MapCoreSharedModule.MCFontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( +public fun MapCoreSharedModule.MCFontLoaderResult.asKmp(): KMFontLoaderResult = KMFontLoaderResult( imageData = this.imageData?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, fontData = this.fontData?.let { (it as MapCoreSharedModule.MCFontData).asKmp() }, status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt index 23d8895d9..e6828d944 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFontWrapper.kt @@ -34,7 +34,7 @@ internal fun KMFontWrapper.asPlatform(): MapCoreSharedModule.MCFontWrapper = Map size = size, distanceRange = distanceRange, ) -internal fun MapCoreSharedModule.MCFontWrapper.asKmp(): KMFontWrapper = KMFontWrapper( +public fun MapCoreSharedModule.MCFontWrapper.asKmp(): KMFontWrapper = KMFontWrapper( name = this.name, lineHeight = this.lineHeight, base = this.base, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt index 1bcadbc95..c14bb4f5c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFormattedStringEntry.kt @@ -22,7 +22,7 @@ internal fun KMFormattedStringEntry.asPlatform(): MapCoreSharedModule.MCFormatte text = text, scale = scale, ) -internal fun MapCoreSharedModule.MCFormattedStringEntry.asKmp(): KMFormattedStringEntry = KMFormattedStringEntry( +public fun MapCoreSharedModule.MCFormattedStringEntry.asKmp(): KMFormattedStringEntry = KMFormattedStringEntry( text = this.text, scale = this.scale, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt index 62a245507..0c2c2b5f2 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonFeatureParserInterface.kt @@ -42,4 +42,4 @@ actual class KMGeoJsonFeatureParserInterface actual public constructor( } internal fun KMGeoJsonFeatureParserInterface.asPlatform(): MapCoreSharedModule.MCGeoJsonFeatureParserInterface = nativeHandle as MapCoreSharedModule.MCGeoJsonFeatureParserInterface -internal fun MapCoreSharedModule.MCGeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) +public fun MapCoreSharedModule.MCGeoJsonFeatureParserInterface.asKmp(): KMGeoJsonFeatureParserInterface = KMGeoJsonFeatureParserInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt index 5acfa7563..bcd43e829 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonHelperInterface.kt @@ -37,4 +37,4 @@ actual class KMGeoJsonHelperInterface actual public constructor( } internal fun KMGeoJsonHelperInterface.asPlatform(): MapCoreSharedModule.MCGeoJsonHelperInterface = nativeHandle as MapCoreSharedModule.MCGeoJsonHelperInterface -internal fun MapCoreSharedModule.MCGeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) +public fun MapCoreSharedModule.MCGeoJsonHelperInterface.asKmp(): KMGeoJsonHelperInterface = KMGeoJsonHelperInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt index 227bc9c15..685a8cb8c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonLine.kt @@ -22,7 +22,7 @@ internal fun KMGeoJsonLine.asPlatform(): MapCoreSharedModule.MCGeoJsonLine = Map points = ArrayList(points.map { it.asPlatform() }), featureInfo = featureInfo.asPlatform(), ) -internal fun MapCoreSharedModule.MCGeoJsonLine.asKmp(): KMGeoJsonLine = KMGeoJsonLine( +public fun MapCoreSharedModule.MCGeoJsonLine.asKmp(): KMGeoJsonLine = KMGeoJsonLine( points = ArrayList(((this.points as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (this.points as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.points as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })), featureInfo = (this.featureInfo as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp(), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt index 0109d4330..7c1a2012a 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGeoJsonPoint.kt @@ -22,7 +22,7 @@ internal fun KMGeoJsonPoint.asPlatform(): MapCoreSharedModule.MCGeoJsonPoint = M point = point.asPlatform(), featureInfo = featureInfo.asPlatform(), ) -internal fun MapCoreSharedModule.MCGeoJsonPoint.asKmp(): KMGeoJsonPoint = KMGeoJsonPoint( +public fun MapCoreSharedModule.MCGeoJsonPoint.asKmp(): KMGeoJsonPoint = KMGeoJsonPoint( point = (this.point as MapCoreSharedModule.MCCoord).asKmp(), featureInfo = (this.featureInfo as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp(), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt index 62f7599f3..fa63d82bd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGlyphDescription.kt @@ -22,7 +22,7 @@ internal fun KMGlyphDescription.asPlatform(): MapCoreSharedModule.MCGlyphDescrip frame = frame.asPlatform(), textureCoordinates = textureCoordinates.asPlatform(), ) -internal fun MapCoreSharedModule.MCGlyphDescription.asKmp(): KMGlyphDescription = KMGlyphDescription( +public fun MapCoreSharedModule.MCGlyphDescription.asKmp(): KMGlyphDescription = KMGlyphDescription( frame = (this.frame as MapCoreSharedModule.MCQuad2dD).asKmp(), textureCoordinates = (this.textureCoordinates as MapCoreSharedModule.MCQuad2dD).asKmp(), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt index 31b2fafe5..ee1df27c9 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectFactoryInterface.kt @@ -207,4 +207,4 @@ internal fun KMGraphicsObjectFactoryInterface.asPlatform(): MapCoreSharedModule. is KMGraphicsObjectFactoryInterfacePlatformWrapper -> this.nativeHandle else -> KMGraphicsObjectFactoryInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCGraphicsObjectFactoryInterfaceProtocol.asKmp(): KMGraphicsObjectFactoryInterface = KMGraphicsObjectFactoryInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt index 5b7fd38c1..135e86194 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMGraphicsObjectInterface.kt @@ -89,4 +89,4 @@ internal fun KMGraphicsObjectInterface.asPlatform(): MapCoreSharedModule.MCGraph is KMGraphicsObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMGraphicsObjectInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCGraphicsObjectInterfaceProtocol.asKmp(): KMGraphicsObjectInterface = KMGraphicsObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt index 422c3ddd4..4e9066f11 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconFactory.kt @@ -32,4 +32,4 @@ actual class KMIconFactory actual public constructor( } internal fun KMIconFactory.asPlatform(): MapCoreSharedModule.MCIconFactory = nativeHandle as MapCoreSharedModule.MCIconFactory -internal fun MapCoreSharedModule.MCIconFactory.asKmp(): KMIconFactory = KMIconFactory(this) +public fun MapCoreSharedModule.MCIconFactory.asKmp(): KMIconFactory = KMIconFactory(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt index a80886c56..d30b9eef6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconInfoInterface.kt @@ -65,4 +65,4 @@ actual class KMIconInfoInterface actual public constructor( } internal fun KMIconInfoInterface.asPlatform(): MapCoreSharedModule.MCIconInfoInterface = nativeHandle as MapCoreSharedModule.MCIconInfoInterface -internal fun MapCoreSharedModule.MCIconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) +public fun MapCoreSharedModule.MCIconInfoInterface.asKmp(): KMIconInfoInterface = KMIconInfoInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt index d136ed93e..d35cdca47 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerCallbackInterface.kt @@ -51,4 +51,4 @@ internal fun KMIconLayerCallbackInterface.asPlatform(): MapCoreSharedModule.MCIc is KMIconLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMIconLayerCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCIconLayerCallbackInterfaceProtocol.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCIconLayerCallbackInterfaceProtocol.asKmp(): KMIconLayerCallbackInterface = KMIconLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt index 6ba16a30e..df4e14ab7 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIconLayerInterface.kt @@ -89,4 +89,4 @@ actual class KMIconLayerInterface actual public constructor( } internal fun KMIconLayerInterface.asPlatform(): MapCoreSharedModule.MCIconLayerInterface = nativeHandle as MapCoreSharedModule.MCIconLayerInterface -internal fun MapCoreSharedModule.MCIconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) +public fun MapCoreSharedModule.MCIconLayerInterface.asKmp(): KMIconLayerInterface = KMIconLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt index c338b0925..4414daadd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronInterface.kt @@ -49,4 +49,4 @@ internal fun KMIcosahedronInterface.asPlatform(): MapCoreSharedModule.MCIcosahed is KMIcosahedronInterfacePlatformWrapper -> this.nativeHandle else -> KMIcosahedronInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCIcosahedronInterfaceProtocol.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCIcosahedronInterfaceProtocol.asKmp(): KMIcosahedronInterface = KMIcosahedronInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt index 4450d481d..898f0177d 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerCallbackInterface.kt @@ -39,4 +39,4 @@ internal fun KMIcosahedronLayerCallbackInterface.asPlatform(): MapCoreSharedModu is KMIcosahedronLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMIcosahedronLayerCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCIcosahedronLayerCallbackInterfaceProtocol.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCIcosahedronLayerCallbackInterfaceProtocol.asKmp(): KMIcosahedronLayerCallbackInterface = KMIcosahedronLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt index c90ee3e84..a556fcbfb 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIcosahedronLayerInterface.kt @@ -32,4 +32,4 @@ actual class KMIcosahedronLayerInterface actual public constructor( } internal fun KMIcosahedronLayerInterface.asPlatform(): MapCoreSharedModule.MCIcosahedronLayerInterface = nativeHandle as MapCoreSharedModule.MCIcosahedronLayerInterface -internal fun MapCoreSharedModule.MCIcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) +public fun MapCoreSharedModule.MCIcosahedronLayerInterface.asKmp(): KMIcosahedronLayerInterface = KMIcosahedronLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt index 9178ae7a7..826ee9f45 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMIndexedLayerInterface.kt @@ -51,4 +51,4 @@ internal fun KMIndexedLayerInterface.asPlatform(): MapCoreSharedModule.MCIndexed is KMIndexedLayerInterfacePlatformWrapper -> this.nativeHandle else -> KMIndexedLayerInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCIndexedLayerInterfaceProtocol.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCIndexedLayerInterfaceProtocol.asKmp(): KMIndexedLayerInterface = KMIndexedLayerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt index 12a9228e3..17f6e2ac6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerInterface.kt @@ -215,4 +215,4 @@ internal fun KMLayerInterface.asPlatform(): MapCoreSharedModule.MCLayerInterface is KMLayerInterfacePlatformWrapper -> this.nativeHandle else -> KMLayerInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCLayerInterfaceProtocol.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCLayerInterfaceProtocol.asKmp(): KMLayerInterface = KMLayerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt index 5a6fe3aea..95b7fd382 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLayerObjectInterface.kt @@ -27,4 +27,4 @@ actual class KMLayerObjectInterface actual public constructor( } internal fun KMLayerObjectInterface.asPlatform(): MapCoreSharedModule.MCLayerObjectInterface = nativeHandle as MapCoreSharedModule.MCLayerObjectInterface -internal fun MapCoreSharedModule.MCLayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) +public fun MapCoreSharedModule.MCLayerObjectInterface.asKmp(): KMLayerObjectInterface = KMLayerObjectInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt index 253e91008..3a543ee38 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineFactory.kt @@ -27,4 +27,4 @@ actual class KMLineFactory actual public constructor( } internal fun KMLineFactory.asPlatform(): MapCoreSharedModule.MCLineFactory = nativeHandle as MapCoreSharedModule.MCLineFactory -internal fun MapCoreSharedModule.MCLineFactory.asKmp(): KMLineFactory = KMLineFactory(this) +public fun MapCoreSharedModule.MCLineFactory.asKmp(): KMLineFactory = KMLineFactory(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt index bfeeae2bd..48e518481 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroup2dInterface.kt @@ -49,4 +49,4 @@ internal fun KMLineGroup2dInterface.asPlatform(): MapCoreSharedModule.MCLineGrou is KMLineGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMLineGroup2dInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCLineGroup2dInterfaceProtocol.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCLineGroup2dInterfaceProtocol.asKmp(): KMLineGroup2dInterface = KMLineGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt index 2d922fdd2..8eb6bd989 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineGroupShaderInterface.kt @@ -31,4 +31,4 @@ actual class KMLineGroupShaderInterface actual public constructor( } internal fun KMLineGroupShaderInterface.asPlatform(): MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) +public fun MapCoreSharedModule.MCLineGroupShaderInterfaceProtocol.asKmp(): KMLineGroupShaderInterface = KMLineGroupShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt index 20e8b2c6c..f726db42c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineInfoInterface.kt @@ -33,4 +33,4 @@ actual class KMLineInfoInterface actual public constructor( } internal fun KMLineInfoInterface.asPlatform(): MapCoreSharedModule.MCLineInfoInterface = nativeHandle as MapCoreSharedModule.MCLineInfoInterface -internal fun MapCoreSharedModule.MCLineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) +public fun MapCoreSharedModule.MCLineInfoInterface.asKmp(): KMLineInfoInterface = KMLineInfoInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt index 838027d2b..d52b8d639 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerCallbackInterface.kt @@ -37,4 +37,4 @@ internal fun KMLineLayerCallbackInterface.asPlatform(): MapCoreSharedModule.MCLi is KMLineLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMLineLayerCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCLineLayerCallbackInterfaceProtocol.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCLineLayerCallbackInterfaceProtocol.asKmp(): KMLineLayerCallbackInterface = KMLineLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt index 484e4749e..9e0876fd0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineLayerInterface.kt @@ -77,4 +77,4 @@ actual class KMLineLayerInterface actual public constructor( } internal fun KMLineLayerInterface.asPlatform(): MapCoreSharedModule.MCLineLayerInterface = nativeHandle as MapCoreSharedModule.MCLineLayerInterface -internal fun MapCoreSharedModule.MCLineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) +public fun MapCoreSharedModule.MCLineLayerInterface.asKmp(): KMLineLayerInterface = KMLineLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt index 6a95872b6..4156650f5 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLineStyle.kt @@ -58,7 +58,7 @@ internal fun KMLineStyle.asPlatform(): MapCoreSharedModule.MCLineStyle = MapCore dotted = dotted, dottedSkew = dottedSkew, ) -internal fun MapCoreSharedModule.MCLineStyle.asKmp(): KMLineStyle = KMLineStyle( +public fun MapCoreSharedModule.MCLineStyle.asKmp(): KMLineStyle = KMLineStyle( color = (this.color as MapCoreSharedModule.MCColorStateList).asKmp(), gapColor = (this.gapColor as MapCoreSharedModule.MCColorStateList).asKmp(), opacity = this.opacity, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt index 25ba93a53..91950996b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoaderInterface.kt @@ -85,4 +85,4 @@ internal fun KMLoaderInterface.asPlatform(): MapCoreSharedModule.MCLoaderInterfa is KMLoaderInterfacePlatformWrapper -> this.nativeHandle else -> KMLoaderInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCLoaderInterfaceProtocol.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCLoaderInterfaceProtocol.asKmp(): KMLoaderInterface = KMLoaderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt index c0f17f8e3..cdeaaa6c2 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMLoggerData.kt @@ -43,7 +43,7 @@ internal fun KMLoggerData.asPlatform(): MapCoreSharedModule.MCLoggerData = MapCo variance = variance, stdDeviation = stdDeviation, ) -internal fun MapCoreSharedModule.MCLoggerData.asKmp(): KMLoggerData = KMLoggerData( +public fun MapCoreSharedModule.MCLoggerData.asKmp(): KMLoggerData = KMLoggerData( id = this.id, buckets = ArrayList(((this.buckets as? List<*>)?.map { (it as platform.Foundation.NSNumber).longLongValue } ?: (0 until (this.buckets as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.buckets as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSNumber).longLongValue })), bucketSizeMs = this.bucketSizeMs, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt index 110bce2d5..c807c9342 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCallbackInterface.kt @@ -47,4 +47,4 @@ internal fun KMMapCallbackInterface.asPlatform(): MapCoreSharedModule.MCMapCallb is KMMapCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMMapCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCMapCallbackInterfaceProtocol.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCMapCallbackInterfaceProtocol.asKmp(): KMMapCallbackInterface = KMMapCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt index 2df1d6a80..06b6ed67f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCamera3dInterface.kt @@ -27,4 +27,4 @@ actual class KMMapCamera3dInterface actual public constructor( } internal fun KMMapCamera3dInterface.asPlatform(): MapCoreSharedModule.MCMapCamera3dInterface = nativeHandle as MapCoreSharedModule.MCMapCamera3dInterface -internal fun MapCoreSharedModule.MCMapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) +public fun MapCoreSharedModule.MCMapCamera3dInterface.asKmp(): KMMapCamera3dInterface = KMMapCamera3dInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt index b53936ac6..f9af8783c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraInterface.kt @@ -242,4 +242,4 @@ actual class KMMapCameraInterface actual public constructor( } internal fun KMMapCameraInterface.asPlatform(): MapCoreSharedModule.MCMapCameraInterface = nativeHandle as MapCoreSharedModule.MCMapCameraInterface -internal fun MapCoreSharedModule.MCMapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) +public fun MapCoreSharedModule.MCMapCameraInterface.asKmp(): KMMapCameraInterface = KMMapCameraInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt index a86271a77..51754fafe 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCameraListenerInterface.kt @@ -67,4 +67,4 @@ internal fun KMMapCameraListenerInterface.asPlatform(): MapCoreSharedModule.MCMa is KMMapCameraListenerInterfacePlatformWrapper -> this.nativeHandle else -> KMMapCameraListenerInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCMapCameraListenerInterfaceProtocol.asKmp(): KMMapCameraListenerInterface = KMMapCameraListenerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt index 2afea9bfd..2bc005fe7 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapConfig.kt @@ -19,6 +19,6 @@ actual class KMMapConfig actual public constructor( internal fun KMMapConfig.asPlatform(): MapCoreSharedModule.MCMapConfig = MapCoreSharedModule.MCMapConfig( mapCoordinateSystem = mapCoordinateSystem.asPlatform(), ) -internal fun MapCoreSharedModule.MCMapConfig.asKmp(): KMMapConfig = KMMapConfig( +public fun MapCoreSharedModule.MCMapConfig.asKmp(): KMMapConfig = KMMapConfig( mapCoordinateSystem = (this.mapCoordinateSystem as MapCoreSharedModule.MCMapCoordinateSystem).asKmp(), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt index 85ead253e..4ddac6d45 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapCoordinateSystem.kt @@ -25,7 +25,7 @@ internal fun KMMapCoordinateSystem.asPlatform(): MapCoreSharedModule.MCMapCoordi bounds = bounds.asPlatform(), unitToScreenMeterFactor = unitToScreenMeterFactor, ) -internal fun MapCoreSharedModule.MCMapCoordinateSystem.asKmp(): KMMapCoordinateSystem = KMMapCoordinateSystem( +public fun MapCoreSharedModule.MCMapCoordinateSystem.asKmp(): KMMapCoordinateSystem = KMMapCoordinateSystem( identifier = this.identifier, bounds = (this.bounds as MapCoreSharedModule.MCRectCoord).asKmp(), unitToScreenMeterFactor = this.unitToScreenMeterFactor, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt index 727a4a046..a02fe3334 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapInterface.kt @@ -185,4 +185,4 @@ actual class KMMapInterface actual public constructor( } internal fun KMMapInterface.asPlatform(): MapCoreSharedModule.MCMapInterface = nativeHandle as MapCoreSharedModule.MCMapInterface -internal fun MapCoreSharedModule.MCMapInterface.asKmp(): KMMapInterface = KMMapInterface(this) +public fun MapCoreSharedModule.MCMapInterface.asKmp(): KMMapInterface = KMMapInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt index f8a97046b..19675778f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapReadyCallbackInterface.kt @@ -37,4 +37,4 @@ internal fun KMMapReadyCallbackInterface.asPlatform(): MapCoreSharedModule.MCMap is KMMapReadyCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMMapReadyCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCMapReadyCallbackInterfaceProtocol.asKmp(): KMMapReadyCallbackInterface = KMMapReadyCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt index 855a46cd1..bffa0e78c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMapsCoreSharedModule.kt @@ -27,4 +27,4 @@ actual class KMMapsCoreSharedModule actual public constructor( } internal fun KMMapsCoreSharedModule.asPlatform(): MapCoreSharedModule.MCMapsCoreSharedModule = nativeHandle as MapCoreSharedModule.MCMapsCoreSharedModule -internal fun MapCoreSharedModule.MCMapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) +public fun MapCoreSharedModule.MCMapsCoreSharedModule.asKmp(): KMMapsCoreSharedModule = KMMapsCoreSharedModule(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt index c9ee91639..ad41d4910 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMMaskingObjectInterface.kt @@ -49,4 +49,4 @@ internal fun KMMaskingObjectInterface.asPlatform(): MapCoreSharedModule.MCMaskin is KMMaskingObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMMaskingObjectInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCMaskingObjectInterfaceProtocol.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCMaskingObjectInterfaceProtocol.asKmp(): KMMaskingObjectInterface = KMMaskingObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt index 2e1a8e802..9ba521f8f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlPerformanceLoggerInterface.kt @@ -37,4 +37,4 @@ actual class KMOpenGlPerformanceLoggerInterface actual public constructor( } internal fun KMOpenGlPerformanceLoggerInterface.asPlatform(): MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface = nativeHandle as MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface -internal fun MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) +public fun MapCoreSharedModule.MCOpenGlPerformanceLoggerInterface.asKmp(): KMOpenGlPerformanceLoggerInterface = KMOpenGlPerformanceLoggerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt index 365b4d13c..de4c108a8 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderTargetInterface.kt @@ -91,4 +91,4 @@ internal fun KMOpenGlRenderTargetInterface.asPlatform(): MapCoreSharedModule.MCO is KMOpenGlRenderTargetInterfacePlatformWrapper -> this.nativeHandle else -> KMOpenGlRenderTargetInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCOpenGlRenderTargetInterfaceProtocol.asKmp(): KMOpenGlRenderTargetInterface = KMOpenGlRenderTargetInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt index 3a3482476..c5fe3c6f1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMOpenGlRenderingContextInterface.kt @@ -127,4 +127,4 @@ internal fun KMOpenGlRenderingContextInterface.asPlatform(): MapCoreSharedModule is KMOpenGlRenderingContextInterfacePlatformWrapper -> this.nativeHandle else -> KMOpenGlRenderingContextInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCOpenGlRenderingContextInterfaceProtocol.asKmp(): KMOpenGlRenderingContextInterface = KMOpenGlRenderingContextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt index 492645f20..dc65348bd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPerformanceLoggerInterface.kt @@ -103,4 +103,4 @@ internal fun KMPerformanceLoggerInterface.asPlatform(): MapCoreSharedModule.MCPe is KMPerformanceLoggerInterfacePlatformWrapper -> this.nativeHandle else -> KMPerformanceLoggerInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCPerformanceLoggerInterfaceProtocol.asKmp(): KMPerformanceLoggerInterface = KMPerformanceLoggerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt index 2d99e9623..e3c50e74e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygon2dInterface.kt @@ -71,4 +71,4 @@ internal fun KMPolygon2dInterface.asPlatform(): MapCoreSharedModule.MCPolygon2dI is KMPolygon2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygon2dInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCPolygon2dInterfaceProtocol.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCPolygon2dInterfaceProtocol.asKmp(): KMPolygon2dInterface = KMPolygon2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt index 690430f91..c439848aa 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonCoord.kt @@ -22,7 +22,7 @@ internal fun KMPolygonCoord.asPlatform(): MapCoreSharedModule.MCPolygonCoord = M positions = ArrayList(positions.map { it.asPlatform() }), holes = ArrayList(holes.map { ArrayList(it.map { it.asPlatform() }) }), ) -internal fun MapCoreSharedModule.MCPolygonCoord.asKmp(): KMPolygonCoord = KMPolygonCoord( +public fun MapCoreSharedModule.MCPolygonCoord.asKmp(): KMPolygonCoord = KMPolygonCoord( positions = ArrayList(((this.positions as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (this.positions as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.positions as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })), holes = ArrayList(((this.holes as? List<*>)?.map { ArrayList(((it as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until (it as platform.Foundation.NSArray).count.toInt()).map { idx -> ((it as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })) } ?: (0 until (this.holes as platform.Foundation.NSArray).count.toInt()).map { idx -> ArrayList((((this.holes as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as? List<*>)?.map { (it as MapCoreSharedModule.MCCoord).asKmp() } ?: (0 until ((this.holes as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSArray).count.toInt()).map { idx -> (((this.holes as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCCoord).asKmp() })) })), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt index 351691282..6509f2fd2 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroup2dInterface.kt @@ -49,4 +49,4 @@ internal fun KMPolygonGroup2dInterface.asPlatform(): MapCoreSharedModule.MCPolyg is KMPolygonGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonGroup2dInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCPolygonGroup2dInterfaceProtocol.asKmp(): KMPolygonGroup2dInterface = KMPolygonGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt index 8c7f6be96..9845803ea 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonGroupShaderInterface.kt @@ -27,4 +27,4 @@ actual class KMPolygonGroupShaderInterface actual public constructor( } internal fun KMPolygonGroupShaderInterface.asPlatform(): MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) +public fun MapCoreSharedModule.MCPolygonGroupShaderInterfaceProtocol.asKmp(): KMPolygonGroupShaderInterface = KMPolygonGroupShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt index ca69a7d62..30162a088 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonInfo.kt @@ -28,7 +28,7 @@ internal fun KMPolygonInfo.asPlatform(): MapCoreSharedModule.MCPolygonInfo = Map color = color.asPlatform(), highlightColor = highlightColor.asPlatform(), ) -internal fun MapCoreSharedModule.MCPolygonInfo.asKmp(): KMPolygonInfo = KMPolygonInfo( +public fun MapCoreSharedModule.MCPolygonInfo.asKmp(): KMPolygonInfo = KMPolygonInfo( identifier = this.identifier, coordinates = (this.coordinates as MapCoreSharedModule.MCPolygonCoord).asKmp(), color = (this.color as MapCoreSharedModule.MCColor).asKmp(), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt index 67f686607..809c6144d 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerCallbackInterface.kt @@ -51,4 +51,4 @@ internal fun KMPolygonLayerCallbackInterface.asPlatform(): MapCoreSharedModule.M is KMPolygonLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonLayerCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCPolygonLayerCallbackInterfaceProtocol.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCPolygonLayerCallbackInterfaceProtocol.asKmp(): KMPolygonLayerCallbackInterface = KMPolygonLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt index 30a4cabe0..a51ea809f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonLayerInterface.kt @@ -73,4 +73,4 @@ actual class KMPolygonLayerInterface actual public constructor( } internal fun KMPolygonLayerInterface.asPlatform(): MapCoreSharedModule.MCPolygonLayerInterface = nativeHandle as MapCoreSharedModule.MCPolygonLayerInterface -internal fun MapCoreSharedModule.MCPolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) +public fun MapCoreSharedModule.MCPolygonLayerInterface.asKmp(): KMPolygonLayerInterface = KMPolygonLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt index 9ce1a999b..ac8d575da 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonMaskObjectInterface.kt @@ -40,4 +40,4 @@ actual class KMPolygonMaskObjectInterface actual public constructor( } internal fun KMPolygonMaskObjectInterface.asPlatform(): MapCoreSharedModule.MCPolygonMaskObjectInterface = nativeHandle as MapCoreSharedModule.MCPolygonMaskObjectInterface -internal fun MapCoreSharedModule.MCPolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) +public fun MapCoreSharedModule.MCPolygonMaskObjectInterface.asKmp(): KMPolygonMaskObjectInterface = KMPolygonMaskObjectInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt index aee61c709..fa18a31a0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroup2dInterface.kt @@ -109,4 +109,4 @@ internal fun KMPolygonPatternGroup2dInterface.asPlatform(): MapCoreSharedModule. is KMPolygonPatternGroup2dInterfacePlatformWrapper -> this.nativeHandle else -> KMPolygonPatternGroup2dInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCPolygonPatternGroup2dInterfaceProtocol.asKmp(): KMPolygonPatternGroup2dInterface = KMPolygonPatternGroup2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt index 9200c1b75..e51ac444e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonPatternGroupShaderInterface.kt @@ -23,4 +23,4 @@ actual class KMPolygonPatternGroupShaderInterface actual public constructor( } internal fun KMPolygonPatternGroupShaderInterface.asPlatform(): MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) +public fun MapCoreSharedModule.MCPolygonPatternGroupShaderInterfaceProtocol.asKmp(): KMPolygonPatternGroupShaderInterface = KMPolygonPatternGroupShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt index 6d27ba7f8..e36c5374f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMPolygonStyle.kt @@ -22,7 +22,7 @@ internal fun KMPolygonStyle.asPlatform(): MapCoreSharedModule.MCPolygonStyle = M color = color.asPlatform(), opacity = opacity, ) -internal fun MapCoreSharedModule.MCPolygonStyle.asKmp(): KMPolygonStyle = KMPolygonStyle( +public fun MapCoreSharedModule.MCPolygonStyle.asKmp(): KMPolygonStyle = KMPolygonStyle( color = (this.color as MapCoreSharedModule.MCColor).asKmp(), opacity = this.opacity, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt index 434dc0d52..215037f03 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dD.kt @@ -28,7 +28,7 @@ internal fun KMQuad2dD.asPlatform(): MapCoreSharedModule.MCQuad2dD = MapCoreShar bottomRight = bottomRight.asPlatform(), bottomLeft = bottomLeft.asPlatform(), ) -internal fun MapCoreSharedModule.MCQuad2dD.asKmp(): KMQuad2dD = KMQuad2dD( +public fun MapCoreSharedModule.MCQuad2dD.asKmp(): KMQuad2dD = KMQuad2dD( topLeft = (this.topLeft as MapCoreSharedModule.MCVec2D).asKmp(), topRight = (this.topRight as MapCoreSharedModule.MCVec2D).asKmp(), bottomRight = (this.bottomRight as MapCoreSharedModule.MCVec2D).asKmp(), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt index 2f7ae9174..e7068015b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInstancedInterface.kt @@ -151,4 +151,4 @@ internal fun KMQuad2dInstancedInterface.asPlatform(): MapCoreSharedModule.MCQuad is KMQuad2dInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dInstancedInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCQuad2dInstancedInterfaceProtocol.asKmp(): KMQuad2dInstancedInterface = KMQuad2dInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt index 3ff3ac673..fb134d309 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dInterface.kt @@ -101,4 +101,4 @@ internal fun KMQuad2dInterface.asPlatform(): MapCoreSharedModule.MCQuad2dInterfa is KMQuad2dInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCQuad2dInterfaceProtocol.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCQuad2dInterfaceProtocol.asKmp(): KMQuad2dInterface = KMQuad2dInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt index 52c0cfcb3..238c2d081 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad2dStretchedInstancedInterface.kt @@ -151,4 +151,4 @@ internal fun KMQuad2dStretchedInstancedInterface.asPlatform(): MapCoreSharedModu is KMQuad2dStretchedInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMQuad2dStretchedInstancedInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCQuad2dStretchedInstancedInterfaceProtocol.asKmp(): KMQuad2dStretchedInstancedInterface = KMQuad2dStretchedInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt index 549e01461..28b9f3abd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuad3dD.kt @@ -28,7 +28,7 @@ internal fun KMQuad3dD.asPlatform(): MapCoreSharedModule.MCQuad3dD = MapCoreShar bottomRight = bottomRight.asPlatform(), bottomLeft = bottomLeft.asPlatform(), ) -internal fun MapCoreSharedModule.MCQuad3dD.asKmp(): KMQuad3dD = KMQuad3dD( +public fun MapCoreSharedModule.MCQuad3dD.asKmp(): KMQuad3dD = KMQuad3dD( topLeft = (this.topLeft as MapCoreSharedModule.MCVec3D).asKmp(), topRight = (this.topRight as MapCoreSharedModule.MCVec3D).asKmp(), bottomRight = (this.bottomRight as MapCoreSharedModule.MCVec3D).asKmp(), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt index 6c7a10dec..1c19d4f78 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMQuadCoord.kt @@ -28,7 +28,7 @@ internal fun KMQuadCoord.asPlatform(): MapCoreSharedModule.MCQuadCoord = MapCore bottomRight = bottomRight.asPlatform(), bottomLeft = bottomLeft.asPlatform(), ) -internal fun MapCoreSharedModule.MCQuadCoord.asKmp(): KMQuadCoord = KMQuadCoord( +public fun MapCoreSharedModule.MCQuadCoord.asKmp(): KMQuadCoord = KMQuadCoord( topLeft = (this.topLeft as MapCoreSharedModule.MCCoord).asKmp(), topRight = (this.topRight as MapCoreSharedModule.MCCoord).asKmp(), bottomRight = (this.bottomRight as MapCoreSharedModule.MCCoord).asKmp(), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt index 63267c274..ba4f0bc3f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderInterface.kt @@ -27,4 +27,4 @@ actual class KMRasterShaderInterface actual public constructor( } internal fun KMRasterShaderInterface.asPlatform(): MapCoreSharedModule.MCRasterShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCRasterShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCRasterShaderInterfaceProtocol.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) +public fun MapCoreSharedModule.MCRasterShaderInterfaceProtocol.asKmp(): KMRasterShaderInterface = KMRasterShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt index cf8cd0bc1..3797bc2f6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRasterShaderStyle.kt @@ -37,7 +37,7 @@ internal fun KMRasterShaderStyle.asPlatform(): MapCoreSharedModule.MCRasterShade gamma = gamma, brightnessShift = brightnessShift, ) -internal fun MapCoreSharedModule.MCRasterShaderStyle.asKmp(): KMRasterShaderStyle = KMRasterShaderStyle( +public fun MapCoreSharedModule.MCRasterShaderStyle.asKmp(): KMRasterShaderStyle = KMRasterShaderStyle( opacity = this.opacity, brightnessMin = this.brightnessMin, brightnessMax = this.brightnessMax, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt index af1200708..1d700125c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectCoord.kt @@ -22,7 +22,7 @@ internal fun KMRectCoord.asPlatform(): MapCoreSharedModule.MCRectCoord = MapCore topLeft = topLeft.asPlatform(), bottomRight = bottomRight.asPlatform(), ) -internal fun MapCoreSharedModule.MCRectCoord.asKmp(): KMRectCoord = KMRectCoord( +public fun MapCoreSharedModule.MCRectCoord.asKmp(): KMRectCoord = KMRectCoord( topLeft = (this.topLeft as MapCoreSharedModule.MCCoord).asKmp(), bottomRight = (this.bottomRight as MapCoreSharedModule.MCCoord).asKmp(), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt index 1729acb95..ae8b55aa7 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectD.kt @@ -28,7 +28,7 @@ internal fun KMRectD.asPlatform(): MapCoreSharedModule.MCRectD = MapCoreSharedMo width = width, height = height, ) -internal fun MapCoreSharedModule.MCRectD.asKmp(): KMRectD = KMRectD( +public fun MapCoreSharedModule.MCRectD.asKmp(): KMRectD = KMRectD( x = this.x, y = this.y, width = this.width, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt index d602f877f..ba65ffc91 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectF.kt @@ -28,7 +28,7 @@ internal fun KMRectF.asPlatform(): MapCoreSharedModule.MCRectF = MapCoreSharedMo width = width, height = height, ) -internal fun MapCoreSharedModule.MCRectF.asKmp(): KMRectF = KMRectF( +public fun MapCoreSharedModule.MCRectF.asKmp(): KMRectF = KMRectF( x = this.x, y = this.y, width = this.width, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt index 862554920..b8c4fbe2f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectI.kt @@ -28,7 +28,7 @@ internal fun KMRectI.asPlatform(): MapCoreSharedModule.MCRectI = MapCoreSharedMo width = width, height = height, ) -internal fun MapCoreSharedModule.MCRectI.asKmp(): KMRectI = KMRectI( +public fun MapCoreSharedModule.MCRectI.asKmp(): KMRectI = KMRectI( x = this.x, y = this.y, width = this.width, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt index c91f1fe71..2a34f3c9f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePacker.kt @@ -27,4 +27,4 @@ actual class KMRectanglePacker actual public constructor( } internal fun KMRectanglePacker.asPlatform(): MapCoreSharedModule.MCRectanglePacker = nativeHandle as MapCoreSharedModule.MCRectanglePacker -internal fun MapCoreSharedModule.MCRectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) +public fun MapCoreSharedModule.MCRectanglePacker.asKmp(): KMRectanglePacker = KMRectanglePacker(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt index b58bf98e4..c0653ebd6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRectanglePackerPage.kt @@ -19,6 +19,6 @@ actual class KMRectanglePackerPage actual public constructor( internal fun KMRectanglePackerPage.asPlatform(): MapCoreSharedModule.MCRectanglePackerPage = MapCoreSharedModule.MCRectanglePackerPage( uvs = HashMap(uvs.map { it.key to it.value.asPlatform() }.toMap()), ) -internal fun MapCoreSharedModule.MCRectanglePackerPage.asKmp(): KMRectanglePackerPage = KMRectanglePackerPage( +public fun MapCoreSharedModule.MCRectanglePackerPage.asKmp(): KMRectanglePackerPage = KMRectanglePackerPage( uvs = HashMap(((this.uvs as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.uvs as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.uvs as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt index a44ba9d99..6dc97641b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderConfigInterface.kt @@ -28,4 +28,4 @@ actual class KMRenderConfigInterface actual public constructor( } internal fun KMRenderConfigInterface.asPlatform(): MapCoreSharedModule.MCRenderConfigInterface = nativeHandle as MapCoreSharedModule.MCRenderConfigInterface -internal fun MapCoreSharedModule.MCRenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) +public fun MapCoreSharedModule.MCRenderConfigInterface.asKmp(): KMRenderConfigInterface = KMRenderConfigInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt index 62f52ddd2..845026715 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderLineDescription.kt @@ -22,7 +22,7 @@ internal fun KMRenderLineDescription.asPlatform(): MapCoreSharedModule.MCRenderL positions = ArrayList(positions.map { it.asPlatform() }), styleIndex = styleIndex, ) -internal fun MapCoreSharedModule.MCRenderLineDescription.asKmp(): KMRenderLineDescription = KMRenderLineDescription( +public fun MapCoreSharedModule.MCRenderLineDescription.asKmp(): KMRenderLineDescription = KMRenderLineDescription( positions = ArrayList(((this.positions as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2D).asKmp() } ?: (0 until (this.positions as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.positions as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2D).asKmp() })), styleIndex = this.styleIndex, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt index cd94322a3..21427d67e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderObjectInterface.kt @@ -97,4 +97,4 @@ internal fun KMRenderObjectInterface.asPlatform(): MapCoreSharedModule.MCRenderO is KMRenderObjectInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderObjectInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCRenderObjectInterfaceProtocol.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCRenderObjectInterfaceProtocol.asKmp(): KMRenderObjectInterface = KMRenderObjectInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt index b8cbc331c..329a576b2 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassConfig.kt @@ -25,7 +25,7 @@ internal fun KMRenderPassConfig.asPlatform(): MapCoreSharedModule.MCRenderPassCo isPassMasked = isPassMasked, renderTarget = renderTarget?.let { it.asPlatform() }, ) -internal fun MapCoreSharedModule.MCRenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( +public fun MapCoreSharedModule.MCRenderPassConfig.asKmp(): KMRenderPassConfig = KMRenderPassConfig( renderPassIndex = this.renderPassIndex, isPassMasked = this.isPassMasked, renderTarget = this.renderTarget?.let { (it as MapCoreSharedModule.MCRenderTargetInterfaceProtocol).asKmp() }, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt index b7f9c0f87..78a85c123 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderPassInterface.kt @@ -85,4 +85,4 @@ internal fun KMRenderPassInterface.asPlatform(): MapCoreSharedModule.MCRenderPas is KMRenderPassInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderPassInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCRenderPassInterfaceProtocol.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCRenderPassInterfaceProtocol.asKmp(): KMRenderPassInterface = KMRenderPassInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt index 613124ce0..0348af4e3 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderTargetInterface.kt @@ -39,4 +39,4 @@ internal fun KMRenderTargetInterface.asPlatform(): MapCoreSharedModule.MCRenderT is KMRenderTargetInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderTargetInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCRenderTargetInterfaceProtocol.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCRenderTargetInterfaceProtocol.asKmp(): KMRenderTargetInterface = KMRenderTargetInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt index b4a416209..0846f20ca 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderVerticesDescription.kt @@ -22,7 +22,7 @@ internal fun KMRenderVerticesDescription.asPlatform(): MapCoreSharedModule.MCRen vertices = ArrayList(vertices.map { it.asPlatform() }), styleIndex = styleIndex, ) -internal fun MapCoreSharedModule.MCRenderVerticesDescription.asKmp(): KMRenderVerticesDescription = KMRenderVerticesDescription( +public fun MapCoreSharedModule.MCRenderVerticesDescription.asKmp(): KMRenderVerticesDescription = KMRenderVerticesDescription( vertices = ArrayList(((this.vertices as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2D).asKmp() } ?: (0 until (this.vertices as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.vertices as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2D).asKmp() })), styleIndex = this.styleIndex, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt index 84d7ddfc4..e77a3919b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRendererInterface.kt @@ -67,4 +67,4 @@ internal fun KMRendererInterface.asPlatform(): MapCoreSharedModule.MCRendererInt is KMRendererInterfacePlatformWrapper -> this.nativeHandle else -> KMRendererInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCRendererInterfaceProtocol.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCRendererInterfaceProtocol.asKmp(): KMRendererInterface = KMRendererInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt index a64f340d4..24a02f585 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMRenderingContextInterface.kt @@ -131,4 +131,4 @@ internal fun KMRenderingContextInterface.asPlatform(): MapCoreSharedModule.MCRen is KMRenderingContextInterfacePlatformWrapper -> this.nativeHandle else -> KMRenderingContextInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCRenderingContextInterfaceProtocol.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCRenderingContextInterfaceProtocol.asKmp(): KMRenderingContextInterface = KMRenderingContextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt index 914362dfd..490ad9c32 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMReverseGeocoderInterface.kt @@ -37,4 +37,4 @@ actual class KMReverseGeocoderInterface actual public constructor( } internal fun KMReverseGeocoderInterface.asPlatform(): MapCoreSharedModule.MCReverseGeocoderInterface = nativeHandle as MapCoreSharedModule.MCReverseGeocoderInterface -internal fun MapCoreSharedModule.MCReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) +public fun MapCoreSharedModule.MCReverseGeocoderInterface.asKmp(): KMReverseGeocoderInterface = KMReverseGeocoderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt index 8ee0a3598..f45bf4a37 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneCallbackInterface.kt @@ -37,4 +37,4 @@ internal fun KMSceneCallbackInterface.asPlatform(): MapCoreSharedModule.MCSceneC is KMSceneCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMSceneCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCSceneCallbackInterfaceProtocol.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCSceneCallbackInterfaceProtocol.asKmp(): KMSceneCallbackInterface = KMSceneCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt index a5436ac9b..b3e581988 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSceneInterface.kt @@ -85,4 +85,4 @@ actual class KMSceneInterface actual public constructor( } internal fun KMSceneInterface.asPlatform(): MapCoreSharedModule.MCSceneInterface = nativeHandle as MapCoreSharedModule.MCSceneInterface -internal fun MapCoreSharedModule.MCSceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) +public fun MapCoreSharedModule.MCSceneInterface.asKmp(): KMSceneInterface = KMSceneInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt index 378a22f6b..c8f4d951e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerGraphicsTaskCallbacks.kt @@ -22,4 +22,4 @@ actual class KMSchedulerGraphicsTaskCallbacks actual public constructor( } internal fun KMSchedulerGraphicsTaskCallbacks.asPlatform(): MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks = nativeHandle as MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks -internal fun MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) +public fun MapCoreSharedModule.MCSchedulerGraphicsTaskCallbacks.asKmp(): KMSchedulerGraphicsTaskCallbacks = KMSchedulerGraphicsTaskCallbacks(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt index c9441f8d5..ee18093f6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSchedulerInterface.kt @@ -131,4 +131,4 @@ internal fun KMSchedulerInterface.asPlatform(): MapCoreSharedModule.MCSchedulerI is KMSchedulerInterfacePlatformWrapper -> this.nativeHandle else -> KMSchedulerInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCSchedulerInterfaceProtocol.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCSchedulerInterfaceProtocol.asKmp(): KMSchedulerInterface = KMSchedulerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt index 396eaf9b1..b4e65c323 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderFactoryInterface.kt @@ -351,4 +351,4 @@ internal fun KMShaderFactoryInterface.asPlatform(): MapCoreSharedModule.MCShader is KMShaderFactoryInterfacePlatformWrapper -> this.nativeHandle else -> KMShaderFactoryInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCShaderFactoryInterfaceProtocol.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCShaderFactoryInterfaceProtocol.asKmp(): KMShaderFactoryInterface = KMShaderFactoryInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt index 755f63d59..a5670f2c0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMShaderProgramInterface.kt @@ -40,4 +40,4 @@ actual class KMShaderProgramInterface actual public constructor( } internal fun KMShaderProgramInterface.asPlatform(): MapCoreSharedModule.MCShaderProgramInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCShaderProgramInterfaceProtocol -internal fun MapCoreSharedModule.MCShaderProgramInterfaceProtocol.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) +public fun MapCoreSharedModule.MCShaderProgramInterfaceProtocol.asKmp(): KMShaderProgramInterface = KMShaderProgramInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt index 0229d3c82..15ba5c24d 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSharedBytes.kt @@ -25,7 +25,7 @@ internal fun KMSharedBytes.asPlatform(): MapCoreSharedModule.MCSharedBytes = Map elementCount = elementCount, bytesPerElement = bytesPerElement, ) -internal fun MapCoreSharedModule.MCSharedBytes.asKmp(): KMSharedBytes = KMSharedBytes( +public fun MapCoreSharedModule.MCSharedBytes.asKmp(): KMSharedBytes = KMSharedBytes( address = this.address, elementCount = this.elementCount, bytesPerElement = this.bytesPerElement, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt index a414e21cf..c6a886dcc 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereLayerInterface.kt @@ -36,4 +36,4 @@ actual class KMSkySphereLayerInterface actual public constructor( } internal fun KMSkySphereLayerInterface.asPlatform(): MapCoreSharedModule.MCSkySphereLayerInterface = nativeHandle as MapCoreSharedModule.MCSkySphereLayerInterface -internal fun MapCoreSharedModule.MCSkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) +public fun MapCoreSharedModule.MCSkySphereLayerInterface.asKmp(): KMSkySphereLayerInterface = KMSkySphereLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt index 8f13101f4..ffa80ec94 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSkySphereShaderInterface.kt @@ -27,4 +27,4 @@ actual class KMSkySphereShaderInterface actual public constructor( } internal fun KMSkySphereShaderInterface.asPlatform(): MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) +public fun MapCoreSharedModule.MCSkySphereShaderInterfaceProtocol.asKmp(): KMSkySphereShaderInterface = KMSkySphereShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt index 547cbbae3..d9f548234 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectLayerInterface.kt @@ -32,4 +32,4 @@ actual class KMSphereEffectLayerInterface actual public constructor( } internal fun KMSphereEffectLayerInterface.asPlatform(): MapCoreSharedModule.MCSphereEffectLayerInterface = nativeHandle as MapCoreSharedModule.MCSphereEffectLayerInterface -internal fun MapCoreSharedModule.MCSphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) +public fun MapCoreSharedModule.MCSphereEffectLayerInterface.asKmp(): KMSphereEffectLayerInterface = KMSphereEffectLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt index 3887ab1ce..c2cf2049a 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMSphereEffectShaderInterface.kt @@ -27,4 +27,4 @@ actual class KMSphereEffectShaderInterface actual public constructor( } internal fun KMSphereEffectShaderInterface.asPlatform(): MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) +public fun MapCoreSharedModule.MCSphereEffectShaderInterfaceProtocol.asKmp(): KMSphereEffectShaderInterface = KMSphereEffectShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt index 48203ca40..95a076ceb 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchInstancedShaderInterface.kt @@ -23,4 +23,4 @@ actual class KMStretchInstancedShaderInterface actual public constructor( } internal fun KMStretchInstancedShaderInterface.asPlatform(): MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) +public fun MapCoreSharedModule.MCStretchInstancedShaderInterfaceProtocol.asKmp(): KMStretchInstancedShaderInterface = KMStretchInstancedShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt index 827a216b2..dd0a43d10 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInfo.kt @@ -49,7 +49,7 @@ internal fun KMStretchShaderInfo.asPlatform(): MapCoreSharedModule.MCStretchShad stretchY1End = stretchY1End, uv = uv.asPlatform(), ) -internal fun MapCoreSharedModule.MCStretchShaderInfo.asKmp(): KMStretchShaderInfo = KMStretchShaderInfo( +public fun MapCoreSharedModule.MCStretchShaderInfo.asKmp(): KMStretchShaderInfo = KMStretchShaderInfo( scaleX = this.scaleX, stretchX0Begin = this.stretchX0Begin, stretchX0End = this.stretchX0End, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt index b3ba4d404..2524e0522 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMStretchShaderInterface.kt @@ -31,4 +31,4 @@ actual class KMStretchShaderInterface actual public constructor( } internal fun KMStretchShaderInterface.asPlatform(): MapCoreSharedModule.MCStretchShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCStretchShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCStretchShaderInterfaceProtocol.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) +public fun MapCoreSharedModule.MCStretchShaderInterfaceProtocol.asKmp(): KMStretchShaderInterface = KMStretchShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt index 7bc6e8eeb..e39f896c4 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskConfig.kt @@ -28,7 +28,7 @@ internal fun KMTaskConfig.asPlatform(): MapCoreSharedModule.MCTaskConfig = MapCo priority = priority.asPlatform(), executionEnvironment = executionEnvironment.asPlatform(), ) -internal fun MapCoreSharedModule.MCTaskConfig.asKmp(): KMTaskConfig = KMTaskConfig( +public fun MapCoreSharedModule.MCTaskConfig.asKmp(): KMTaskConfig = KMTaskConfig( id = this.id, delay = this.delay, priority = KMTaskPriority.fromPlatform((this.priority as MapCoreSharedModule.MCTaskPriority)), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt index 350c44d98..3014ed324 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTaskInterface.kt @@ -49,4 +49,4 @@ internal fun KMTaskInterface.asPlatform(): MapCoreSharedModule.MCTaskInterfacePr is KMTaskInterfacePlatformWrapper -> this.nativeHandle else -> KMTaskInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTaskInterfaceProtocol.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTaskInterfaceProtocol.asKmp(): KMTaskInterface = KMTaskInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt index 202813acd..ff63080cd 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextDescription.kt @@ -19,6 +19,6 @@ actual class KMTextDescription actual public constructor( internal fun KMTextDescription.asPlatform(): MapCoreSharedModule.MCTextDescription = MapCoreSharedModule.MCTextDescription( glyphs = ArrayList(glyphs.map { it.asPlatform() }), ) -internal fun MapCoreSharedModule.MCTextDescription.asKmp(): KMTextDescription = KMTextDescription( +public fun MapCoreSharedModule.MCTextDescription.asKmp(): KMTextDescription = KMTextDescription( glyphs = ArrayList(((this.glyphs as? List<*>)?.map { (it as MapCoreSharedModule.MCGlyphDescription).asKmp() } ?: (0 until (this.glyphs as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.glyphs as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCGlyphDescription).asKmp() })), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt index 02d594c9f..2a5655e1e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextFactory.kt @@ -27,4 +27,4 @@ actual class KMTextFactory actual public constructor( } internal fun KMTextFactory.asPlatform(): MapCoreSharedModule.MCTextFactory = nativeHandle as MapCoreSharedModule.MCTextFactory -internal fun MapCoreSharedModule.MCTextFactory.asKmp(): KMTextFactory = KMTextFactory(this) +public fun MapCoreSharedModule.MCTextFactory.asKmp(): KMTextFactory = KMTextFactory(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt index fdcedf7eb..2374dfe79 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInfoInterface.kt @@ -111,4 +111,4 @@ internal fun KMTextInfoInterface.asPlatform(): MapCoreSharedModule.MCTextInfoInt is KMTextInfoInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInfoInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTextInfoInterfaceProtocol.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTextInfoInterfaceProtocol.asKmp(): KMTextInfoInterface = KMTextInfoInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt index abfe13236..6bbeee4a1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedInterface.kt @@ -159,4 +159,4 @@ internal fun KMTextInstancedInterface.asPlatform(): MapCoreSharedModule.MCTextIn is KMTextInstancedInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInstancedInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTextInstancedInterfaceProtocol.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTextInstancedInterfaceProtocol.asKmp(): KMTextInstancedInterface = KMTextInstancedInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt index 65fcc9abe..72201a647 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInstancedShaderInterface.kt @@ -23,4 +23,4 @@ actual class KMTextInstancedShaderInterface actual public constructor( } internal fun KMTextInstancedShaderInterface.asPlatform(): MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) +public fun MapCoreSharedModule.MCTextInstancedShaderInterfaceProtocol.asKmp(): KMTextInstancedShaderInterface = KMTextInstancedShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt index 11e4048dc..175cfe315 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextInterface.kt @@ -69,4 +69,4 @@ internal fun KMTextInterface.asPlatform(): MapCoreSharedModule.MCTextInterfacePr is KMTextInterfacePlatformWrapper -> this.nativeHandle else -> KMTextInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTextInterfaceProtocol.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTextInterfaceProtocol.asKmp(): KMTextInterface = KMTextInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt index c8e83cb28..0449d726f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextLayerInterface.kt @@ -40,4 +40,4 @@ actual class KMTextLayerInterface actual public constructor( } internal fun KMTextLayerInterface.asPlatform(): MapCoreSharedModule.MCTextLayerInterface = nativeHandle as MapCoreSharedModule.MCTextLayerInterface -internal fun MapCoreSharedModule.MCTextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) +public fun MapCoreSharedModule.MCTextLayerInterface.asKmp(): KMTextLayerInterface = KMTextLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt index 9c40d4e91..38badc89f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextShaderInterface.kt @@ -35,4 +35,4 @@ actual class KMTextShaderInterface actual public constructor( } internal fun KMTextShaderInterface.asPlatform(): MapCoreSharedModule.MCTextShaderInterfaceProtocol = nativeHandle as MapCoreSharedModule.MCTextShaderInterfaceProtocol -internal fun MapCoreSharedModule.MCTextShaderInterfaceProtocol.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) +public fun MapCoreSharedModule.MCTextShaderInterfaceProtocol.asKmp(): KMTextShaderInterface = KMTextShaderInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt index 20865e13d..274ed86b0 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureAtlas.kt @@ -22,7 +22,7 @@ internal fun KMTextureAtlas.asPlatform(): MapCoreSharedModule.MCTextureAtlas = M uvMap = HashMap(uvMap.map { it.key to it.value.asPlatform() }.toMap()), texture = texture?.let { it.asPlatform() }, ) -internal fun MapCoreSharedModule.MCTextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( +public fun MapCoreSharedModule.MCTextureAtlas.asKmp(): KMTextureAtlas = KMTextureAtlas( uvMap = HashMap(((this.uvMap as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.uvMap as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.uvMap as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), texture = this.texture?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt index bea947cba..cb4496c21 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureHolderInterface.kt @@ -97,4 +97,4 @@ internal fun KMTextureHolderInterface.asPlatform(): MapCoreSharedModule.MCTextur is KMTextureHolderInterfacePlatformWrapper -> this.nativeHandle else -> KMTextureHolderInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTextureHolderInterfaceProtocol.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTextureHolderInterfaceProtocol.asKmp(): KMTextureHolderInterface = KMTextureHolderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt index b0c17d2a0..80bcdd368 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTextureLoaderResult.kt @@ -28,7 +28,7 @@ internal fun KMTextureLoaderResult.asPlatform(): MapCoreSharedModule.MCTextureLo status = status.asPlatform(), errorCode = errorCode?.let { it }, ) -internal fun MapCoreSharedModule.MCTextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( +public fun MapCoreSharedModule.MCTextureLoaderResult.asKmp(): KMTextureLoaderResult = KMTextureLoaderResult( data = this.data?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, etag = this.etag?.let { (it as String) }, status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt index 5c695596d..61f20c8c2 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMThreadPoolScheduler.kt @@ -27,4 +27,4 @@ actual class KMThreadPoolScheduler actual public constructor( } internal fun KMThreadPoolScheduler.asPlatform(): MapCoreSharedModule.MCThreadPoolScheduler = nativeHandle as MapCoreSharedModule.MCThreadPoolScheduler -internal fun MapCoreSharedModule.MCThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) +public fun MapCoreSharedModule.MCThreadPoolScheduler.asKmp(): KMThreadPoolScheduler = KMThreadPoolScheduler(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt index bfc3170e1..c888314a9 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapLayerConfig.kt @@ -123,4 +123,4 @@ internal fun KMTiled2dMapLayerConfig.asPlatform(): MapCoreSharedModule.MCTiled2d is KMTiled2dMapLayerConfigPlatformWrapper -> this.nativeHandle else -> KMTiled2dMapLayerConfigPlatformProxy(this) } -internal fun MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) +public fun MapCoreSharedModule.MCTiled2dMapLayerConfigProtocol.asKmp(): KMTiled2dMapLayerConfig = KMTiled2dMapLayerConfigPlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt index 8a0069c8c..66ccda8e4 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerCallbackInterface.kt @@ -51,4 +51,4 @@ internal fun KMTiled2dMapRasterLayerCallbackInterface.asPlatform(): MapCoreShare is KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapRasterLayerCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTiled2dMapRasterLayerCallbackInterfaceProtocol.asKmp(): KMTiled2dMapRasterLayerCallbackInterface = KMTiled2dMapRasterLayerCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt index 149e1a30b..fc34613ef 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapRasterLayerInterface.kt @@ -116,4 +116,4 @@ actual class KMTiled2dMapRasterLayerInterface actual public constructor( } internal fun KMTiled2dMapRasterLayerInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapRasterLayerInterface = nativeHandle as MapCoreSharedModule.MCTiled2dMapRasterLayerInterface -internal fun MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) +public fun MapCoreSharedModule.MCTiled2dMapRasterLayerInterface.asKmp(): KMTiled2dMapRasterLayerInterface = KMTiled2dMapRasterLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt index 8a3a1f1d8..db4bbc06c 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapReadyStateListener.kt @@ -37,4 +37,4 @@ internal fun KMTiled2dMapReadyStateListener.asPlatform(): MapCoreSharedModule.MC is KMTiled2dMapReadyStateListenerPlatformWrapper -> this.nativeHandle else -> KMTiled2dMapReadyStateListenerPlatformProxy(this) } -internal fun MapCoreSharedModule.MCTiled2dMapReadyStateListenerProtocol.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) +public fun MapCoreSharedModule.MCTiled2dMapReadyStateListenerProtocol.asKmp(): KMTiled2dMapReadyStateListener = KMTiled2dMapReadyStateListenerPlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt index e49c9586b..8ef75181b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapSourceInterface.kt @@ -69,4 +69,4 @@ actual class KMTiled2dMapSourceInterface actual public constructor( } internal fun KMTiled2dMapSourceInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapSourceInterface = nativeHandle as MapCoreSharedModule.MCTiled2dMapSourceInterface -internal fun MapCoreSharedModule.MCTiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) +public fun MapCoreSharedModule.MCTiled2dMapSourceInterface.asKmp(): KMTiled2dMapSourceInterface = KMTiled2dMapSourceInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt index d25b657d6..b8e980920 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorAssetInfo.kt @@ -22,7 +22,7 @@ internal fun KMTiled2dMapVectorAssetInfo.asPlatform(): MapCoreSharedModule.MCTil featureIdentifiersUv = HashMap(featureIdentifiersUv.map { it.key to it.value.asPlatform() }.toMap()), texture = texture?.let { it.asPlatform() }, ) -internal fun MapCoreSharedModule.MCTiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( +public fun MapCoreSharedModule.MCTiled2dMapVectorAssetInfo.asKmp(): KMTiled2dMapVectorAssetInfo = KMTiled2dMapVectorAssetInfo( featureIdentifiersUv = HashMap(((this.featureIdentifiersUv as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCRectI).asKmp() }?.toMap() ?: run { val e = (this.featureIdentifiersUv as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.featureIdentifiersUv as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCRectI).asKmp() } })), texture = this.texture?.let { (it as MapCoreSharedModule.MCTextureHolderInterfaceProtocol).asKmp() }, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt index e4ebf82e8..28e33473a 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerInterface.kt @@ -93,4 +93,4 @@ actual class KMTiled2dMapVectorLayerInterface actual public constructor( } internal fun KMTiled2dMapVectorLayerInterface.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorLayerInterface = nativeHandle as MapCoreSharedModule.MCTiled2dMapVectorLayerInterface -internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) +public fun MapCoreSharedModule.MCTiled2dMapVectorLayerInterface.asKmp(): KMTiled2dMapVectorLayerInterface = KMTiled2dMapVectorLayerInterface(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt index 867886ac6..31a8f034f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerLocalDataProviderInterface.kt @@ -75,4 +75,4 @@ internal fun KMTiled2dMapVectorLayerLocalDataProviderInterface.asPlatform(): Map is KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTiled2dMapVectorLayerLocalDataProviderInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerLocalDataProviderInterface = KMTiled2dMapVectorLayerLocalDataProviderInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt index 975a12804..72d474a2a 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSelectionCallbackInterface.kt @@ -63,4 +63,4 @@ internal fun KMTiled2dMapVectorLayerSelectionCallbackInterface.asPlatform(): Map is KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTiled2dMapVectorLayerSelectionCallbackInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerSelectionCallbackInterface = KMTiled2dMapVectorLayerSelectionCallbackInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt index d40a01feb..bafe141f5 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorLayerSymbolDelegateInterface.kt @@ -39,4 +39,4 @@ internal fun KMTiled2dMapVectorLayerSymbolDelegateInterface.asPlatform(): MapCor is KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper -> this.nativeHandle else -> KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTiled2dMapVectorLayerSymbolDelegateInterfaceProtocol.asKmp(): KMTiled2dMapVectorLayerSymbolDelegateInterface = KMTiled2dMapVectorLayerSymbolDelegateInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt index bf717a024..d5b2630c2 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapVectorSettings.kt @@ -19,6 +19,6 @@ actual class KMTiled2dMapVectorSettings actual public constructor( internal fun KMTiled2dMapVectorSettings.asPlatform(): MapCoreSharedModule.MCTiled2dMapVectorSettings = MapCoreSharedModule.MCTiled2dMapVectorSettings( tileOrigin = tileOrigin.asPlatform(), ) -internal fun MapCoreSharedModule.MCTiled2dMapVectorSettings.asKmp(): KMTiled2dMapVectorSettings = KMTiled2dMapVectorSettings( +public fun MapCoreSharedModule.MCTiled2dMapVectorSettings.asKmp(): KMTiled2dMapVectorSettings = KMTiled2dMapVectorSettings( tileOrigin = KMTiled2dMapVectorTileOrigin.fromPlatform((this.tileOrigin as MapCoreSharedModule.MCTiled2dMapVectorTileOrigin)), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt index 238f32f46..ffdd13a08 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomInfo.kt @@ -37,7 +37,7 @@ internal fun KMTiled2dMapZoomInfo.asPlatform(): MapCoreSharedModule.MCTiled2dMap underzoom = underzoom, overzoom = overzoom, ) -internal fun MapCoreSharedModule.MCTiled2dMapZoomInfo.asKmp(): KMTiled2dMapZoomInfo = KMTiled2dMapZoomInfo( +public fun MapCoreSharedModule.MCTiled2dMapZoomInfo.asKmp(): KMTiled2dMapZoomInfo = KMTiled2dMapZoomInfo( zoomLevelScaleFactor = this.zoomLevelScaleFactor, numDrawPreviousLayers = this.numDrawPreviousLayers, numDrawPreviousOrLaterTLayers = this.numDrawPreviousOrLaterTLayers, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt index 392507a42..c8c675269 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiled2dMapZoomLevelInfo.kt @@ -37,7 +37,7 @@ internal fun KMTiled2dMapZoomLevelInfo.asPlatform(): MapCoreSharedModule.MCTiled zoomLevelIdentifier = zoomLevelIdentifier, bounds = bounds.asPlatform(), ) -internal fun MapCoreSharedModule.MCTiled2dMapZoomLevelInfo.asKmp(): KMTiled2dMapZoomLevelInfo = KMTiled2dMapZoomLevelInfo( +public fun MapCoreSharedModule.MCTiled2dMapZoomLevelInfo.asKmp(): KMTiled2dMapZoomLevelInfo = KMTiled2dMapZoomLevelInfo( zoom = this.zoom, tileWidthLayerSystemUnits = this.tileWidthLayerSystemUnits, numTilesX = this.numTilesX, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt index c4f40026e..15ea9cde1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTiledLayerError.kt @@ -34,7 +34,7 @@ internal fun KMTiledLayerError.asPlatform(): MapCoreSharedModule.MCTiledLayerErr isRecoverable = isRecoverable, bounds = bounds?.let { it.asPlatform() }, ) -internal fun MapCoreSharedModule.MCTiledLayerError.asKmp(): KMTiledLayerError = KMTiledLayerError( +public fun MapCoreSharedModule.MCTiledLayerError.asKmp(): KMTiledLayerError = KMTiledLayerError( status = KMLoaderStatus.fromPlatform((this.status as MapCoreSharedModule.MCLoaderStatus)), errorCode = this.errorCode?.let { (it as String) }, layerName = this.layerName, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt index bfb1ddb47..6ceac69c6 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchEvent.kt @@ -25,7 +25,7 @@ internal fun KMTouchEvent.asPlatform(): MapCoreSharedModule.MCTouchEvent = MapCo scrollDelta = scrollDelta, touchAction = touchAction.asPlatform(), ) -internal fun MapCoreSharedModule.MCTouchEvent.asKmp(): KMTouchEvent = KMTouchEvent( +public fun MapCoreSharedModule.MCTouchEvent.asKmp(): KMTouchEvent = KMTouchEvent( pointers = ArrayList(((this.pointers as? List<*>)?.map { (it as MapCoreSharedModule.MCVec2F).asKmp() } ?: (0 until (this.pointers as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.pointers as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCVec2F).asKmp() })), scrollDelta = this.scrollDelta, touchAction = KMTouchAction.fromPlatform((this.touchAction as MapCoreSharedModule.MCTouchAction)), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt index eaae3c5eb..11852de13 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchHandlerInterface.kt @@ -67,4 +67,4 @@ internal fun KMTouchHandlerInterface.asPlatform(): MapCoreSharedModule.MCTouchHa is KMTouchHandlerInterfacePlatformWrapper -> this.nativeHandle else -> KMTouchHandlerInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTouchHandlerInterfaceProtocol.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTouchHandlerInterfaceProtocol.asKmp(): KMTouchHandlerInterface = KMTouchHandlerInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt index 88aefd935..4e88ba464 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMTouchInterface.kt @@ -181,4 +181,4 @@ internal fun KMTouchInterface.asPlatform(): MapCoreSharedModule.MCTouchInterface is KMTouchInterfacePlatformWrapper -> this.nativeHandle else -> KMTouchInterfacePlatformProxy(this) } -internal fun MapCoreSharedModule.MCTouchInterfaceProtocol.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) +public fun MapCoreSharedModule.MCTouchInterfaceProtocol.asKmp(): KMTouchInterface = KMTouchInterfacePlatformWrapper(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt index d8128cafd..df617d417 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2D.kt @@ -22,7 +22,7 @@ internal fun KMVec2D.asPlatform(): MapCoreSharedModule.MCVec2D = MapCoreSharedMo x = x, y = y, ) -internal fun MapCoreSharedModule.MCVec2D.asKmp(): KMVec2D = KMVec2D( +public fun MapCoreSharedModule.MCVec2D.asKmp(): KMVec2D = KMVec2D( x = this.x, y = this.y, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt index c791645ec..1a6faea8b 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2F.kt @@ -22,7 +22,7 @@ internal fun KMVec2F.asPlatform(): MapCoreSharedModule.MCVec2F = MapCoreSharedMo x = x, y = y, ) -internal fun MapCoreSharedModule.MCVec2F.asKmp(): KMVec2F = KMVec2F( +public fun MapCoreSharedModule.MCVec2F.asKmp(): KMVec2F = KMVec2F( x = this.x, y = this.y, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt index 8c32e5168..8570a6cc8 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec2I.kt @@ -22,7 +22,7 @@ internal fun KMVec2I.asPlatform(): MapCoreSharedModule.MCVec2I = MapCoreSharedMo x = x, y = y, ) -internal fun MapCoreSharedModule.MCVec2I.asKmp(): KMVec2I = KMVec2I( +public fun MapCoreSharedModule.MCVec2I.asKmp(): KMVec2I = KMVec2I( x = this.x, y = this.y, ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt index 22c841918..8410b5366 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3D.kt @@ -25,7 +25,7 @@ internal fun KMVec3D.asPlatform(): MapCoreSharedModule.MCVec3D = MapCoreSharedMo y = y, z = z, ) -internal fun MapCoreSharedModule.MCVec3D.asKmp(): KMVec3D = KMVec3D( +public fun MapCoreSharedModule.MCVec3D.asKmp(): KMVec3D = KMVec3D( x = this.x, y = this.y, z = this.z, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt index 3377e9062..0ef481f99 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3F.kt @@ -25,7 +25,7 @@ internal fun KMVec3F.asPlatform(): MapCoreSharedModule.MCVec3F = MapCoreSharedMo y = y, z = z, ) -internal fun MapCoreSharedModule.MCVec3F.asKmp(): KMVec3F = KMVec3F( +public fun MapCoreSharedModule.MCVec3F.asKmp(): KMVec3F = KMVec3F( x = this.x, y = this.y, z = this.z, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt index 1e92541ca..23b6f140f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVec3I.kt @@ -25,7 +25,7 @@ internal fun KMVec3I.asPlatform(): MapCoreSharedModule.MCVec3I = MapCoreSharedMo y = y, z = z, ) -internal fun MapCoreSharedModule.MCVec3I.asKmp(): KMVec3I = KMVec3I( +public fun MapCoreSharedModule.MCVec3I.asKmp(): KMVec3I = KMVec3I( x = this.x, y = this.y, z = this.z, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt index 2f5c92d34..1d8cf73e8 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureCoordInfo.kt @@ -22,7 +22,7 @@ internal fun KMVectorLayerFeatureCoordInfo.asPlatform(): MapCoreSharedModule.MCV featureInfo = featureInfo.asPlatform(), coordinates = coordinates.asPlatform(), ) -internal fun MapCoreSharedModule.MCVectorLayerFeatureCoordInfo.asKmp(): KMVectorLayerFeatureCoordInfo = KMVectorLayerFeatureCoordInfo( +public fun MapCoreSharedModule.MCVectorLayerFeatureCoordInfo.asKmp(): KMVectorLayerFeatureCoordInfo = KMVectorLayerFeatureCoordInfo( featureInfo = (this.featureInfo as MapCoreSharedModule.MCVectorLayerFeatureInfo).asKmp(), coordinates = (this.coordinates as MapCoreSharedModule.MCCoord).asKmp(), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt index 7cadc3dfb..00b77ebeb 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfo.kt @@ -22,7 +22,7 @@ internal fun KMVectorLayerFeatureInfo.asPlatform(): MapCoreSharedModule.MCVector identifier = identifier, properties = HashMap(properties.map { it.key to it.value.asPlatform() }.toMap()), ) -internal fun MapCoreSharedModule.MCVectorLayerFeatureInfo.asKmp(): KMVectorLayerFeatureInfo = KMVectorLayerFeatureInfo( +public fun MapCoreSharedModule.MCVectorLayerFeatureInfo.asKmp(): KMVectorLayerFeatureInfo = KMVectorLayerFeatureInfo( identifier = this.identifier, properties = HashMap(((this.properties as? Map<*, *>)?.map { (it.key as String) to (it.value as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() }?.toMap() ?: run { val e = (this.properties as platform.Foundation.NSDictionary).keyEnumerator(); generateSequence { e.nextObject() }.associate { key -> (key as String) to ((this.properties as platform.Foundation.NSDictionary).objectForKey(key) as MapCoreSharedModule.MCVectorLayerFeatureInfoValue).asKmp() } })), ) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt index e8db43b3f..27b121103 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMVectorLayerFeatureInfoValue.kt @@ -37,7 +37,7 @@ internal fun KMVectorLayerFeatureInfoValue.asPlatform(): MapCoreSharedModule.MCV listFloatVal = listFloatVal?.let { ArrayList(it.map { platform.Foundation.NSNumber(float = it) }) }, listStringVal = listStringVal?.let { ArrayList(it.map { it }) }, ) -internal fun MapCoreSharedModule.MCVectorLayerFeatureInfoValue.asKmp(): KMVectorLayerFeatureInfoValue = KMVectorLayerFeatureInfoValue( +public fun MapCoreSharedModule.MCVectorLayerFeatureInfoValue.asKmp(): KMVectorLayerFeatureInfoValue = KMVectorLayerFeatureInfoValue( stringVal = this.stringVal?.let { (it as String) }, doubleVal = this.doubleVal?.let { (it as platform.Foundation.NSNumber).doubleValue }, intVal = this.intVal?.let { (it as platform.Foundation.NSNumber).longLongValue }, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt index 7701c3fad..4cd42334f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsCapabilitiesResource.kt @@ -72,4 +72,4 @@ actual class KMWmtsCapabilitiesResource actual public constructor( } internal fun KMWmtsCapabilitiesResource.asPlatform(): MapCoreSharedModule.MCWmtsCapabilitiesResource = nativeHandle as MapCoreSharedModule.MCWmtsCapabilitiesResource -internal fun MapCoreSharedModule.MCWmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) +public fun MapCoreSharedModule.MCWmtsCapabilitiesResource.asKmp(): KMWmtsCapabilitiesResource = KMWmtsCapabilitiesResource(this) diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt index 1ce150327..d9788720e 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDescription.kt @@ -40,7 +40,7 @@ internal fun KMWmtsLayerDescription.asPlatform(): MapCoreSharedModule.MCWmtsLaye resourceTemplate = resourceTemplate, resourceFormat = resourceFormat, ) -internal fun MapCoreSharedModule.MCWmtsLayerDescription.asKmp(): KMWmtsLayerDescription = KMWmtsLayerDescription( +public fun MapCoreSharedModule.MCWmtsLayerDescription.asKmp(): KMWmtsLayerDescription = KMWmtsLayerDescription( identifier = this.identifier, title = this.title?.let { (it as String) }, abstractText = this.abstractText?.let { (it as String) }, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt index 9c37cc830..083ca28f1 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsLayerDimension.kt @@ -25,7 +25,7 @@ internal fun KMWmtsLayerDimension.asPlatform(): MapCoreSharedModule.MCWmtsLayerD defaultValue = defaultValue, values = ArrayList(values.map { it }), ) -internal fun MapCoreSharedModule.MCWmtsLayerDimension.asKmp(): KMWmtsLayerDimension = KMWmtsLayerDimension( +public fun MapCoreSharedModule.MCWmtsLayerDimension.asKmp(): KMWmtsLayerDimension = KMWmtsLayerDimension( identifier = this.identifier, defaultValue = this.defaultValue, values = ArrayList(((this.values as? List<*>)?.map { (it as String) } ?: (0 until (this.values as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.values as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as String) })), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt index b7b4a040c..1052333ae 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrix.kt @@ -40,7 +40,7 @@ internal fun KMWmtsTileMatrix.asPlatform(): MapCoreSharedModule.MCWmtsTileMatrix matrixWidth = matrixWidth, matrixHeight = matrixHeight, ) -internal fun MapCoreSharedModule.MCWmtsTileMatrix.asKmp(): KMWmtsTileMatrix = KMWmtsTileMatrix( +public fun MapCoreSharedModule.MCWmtsTileMatrix.asKmp(): KMWmtsTileMatrix = KMWmtsTileMatrix( identifier = this.identifier, scaleDenominator = this.scaleDenominator, topLeftCornerX = this.topLeftCornerX, diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt index 98391bb06..ce2cbca34 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTileMatrixSet.kt @@ -25,7 +25,7 @@ internal fun KMWmtsTileMatrixSet.asPlatform(): MapCoreSharedModule.MCWmtsTileMat coordinateSystemIdentifier = coordinateSystemIdentifier, matrices = ArrayList(matrices.map { it.asPlatform() }), ) -internal fun MapCoreSharedModule.MCWmtsTileMatrixSet.asKmp(): KMWmtsTileMatrixSet = KMWmtsTileMatrixSet( +public fun MapCoreSharedModule.MCWmtsTileMatrixSet.asKmp(): KMWmtsTileMatrixSet = KMWmtsTileMatrixSet( identifier = this.identifier, coordinateSystemIdentifier = this.coordinateSystemIdentifier, matrices = ArrayList(((this.matrices as? List<*>)?.map { (it as MapCoreSharedModule.MCWmtsTileMatrix).asKmp() } ?: (0 until (this.matrices as platform.Foundation.NSArray).count.toInt()).map { idx -> ((this.matrices as platform.Foundation.NSArray).objectAtIndex(idx.toULong()) as MapCoreSharedModule.MCWmtsTileMatrix).asKmp() })), diff --git a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt index dc809094b..616563e7f 100644 --- a/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt +++ b/bridging/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMWmtsTiled2dMapLayerConfigFactory.kt @@ -27,4 +27,4 @@ actual class KMWmtsTiled2dMapLayerConfigFactory actual public constructor( } internal fun KMWmtsTiled2dMapLayerConfigFactory.asPlatform(): MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory = nativeHandle as MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory -internal fun MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) +public fun MapCoreSharedModule.MCWmtsTiled2dMapLayerConfigFactory.asKmp(): KMWmtsTiled2dMapLayerConfigFactory = KMWmtsTiled2dMapLayerConfigFactory(this) diff --git a/external/djinni b/external/djinni index 33e7f6496..647df54f7 160000 --- a/external/djinni +++ b/external/djinni @@ -1 +1 @@ -Subproject commit 33e7f6496194cd727a268eecc9d0904459635ec4 +Subproject commit 647df54f737088b8cf1ccd29b13a45d6766dd7ce diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index 270e3bc44..ad5b1e5bd 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -1,5 +1,7 @@ package io.openmobilemaps.mapscore.kmp +import com.snapchat.djinni.Promise + actual class KMFuture { internal val native: com.snapchat.djinni.Future<*>? @@ -12,6 +14,16 @@ actual class KMFuture { } } +actual class KMPromise { + private val promise: Promise = Promise() + + actual fun setValue(value: T) { + promise.setValue(value) + } + + actual fun future(): KMFuture = promise.future.asKmp() +} + @Suppress("UNCHECKED_CAST") internal fun KMFuture.asPlatform(): com.snapchat.djinni.Future = requireNotNull(native) as com.snapchat.djinni.Future diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt new file mode 100644 index 000000000..3d08130b0 --- /dev/null +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/MapCoreKmpInterop.kt @@ -0,0 +1,55 @@ +package io.openmobilemaps.mapscore.kmp + +import android.graphics.Bitmap +import android.graphics.BitmapFactory +import android.graphics.ImageDecoder +import android.opengl.GLES20 +import android.os.Build +import android.util.Log +import io.openmobilemaps.mapscore.graphics.BitmapTextureHolder +import io.openmobilemaps.mapscore.graphics.CanvasEdgeFillMode +import java.io.IOException +import java.nio.ByteBuffer + +fun createTextureHolder( + data: KMDataRef, + minFilter: Int = GLES20.GL_LINEAR, + magFilter: Int = GLES20.GL_LINEAR, + edgeFillMode: CanvasEdgeFillMode = CanvasEdgeFillMode.Mirorred, +): KMTextureHolderInterface? { + val bytes = data.toByteArray() + + val bitmap = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + try { + ImageDecoder.decodeBitmap(ImageDecoder.createSource(bytes)) { decoder, info, source -> + decoder.apply { + allocator = ImageDecoder.ALLOCATOR_SOFTWARE + isMutableRequired = true + } + } + } catch (e: IOException) { + Log.e(KMTextureHolderInterface::class.java.canonicalName, "Failed to decode image $data", e) + null + } + } else { + BitmapFactory.decodeByteArray(bytes, 0, bytes.size) + } + + return bitmap?.let { BitmapTextureHolder(it, minFilter, magFilter, edgeFillMode) }?.asKmp() +} + +fun createTextureHolder( + bitmap: Bitmap, + minFilter: Int = GLES20.GL_LINEAR, + magFilter: Int = GLES20.GL_LINEAR, + edgeFillMode: CanvasEdgeFillMode = CanvasEdgeFillMode.Mirorred, +): KMTextureHolderInterface = BitmapTextureHolder(bitmap, minFilter, magFilter, edgeFillMode).asKmp() + + +private fun ByteBuffer.toByteArray(): ByteArray { + val duplicate = duplicate() + duplicate.rewind() + val bytes = ByteArray(duplicate.remaining()) + duplicate.get(bytes) + return bytes +} diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index 6e1c9d951..55347f3d5 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -1,3 +1,8 @@ package io.openmobilemaps.mapscore.kmp expect class KMFuture + +expect class KMPromise() { + fun setValue(value: T) + fun future(): KMFuture +} diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index cbb94e9c4..1178e4d33 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -12,10 +12,10 @@ actual class KMFuture { } } -class KMPromise { +actual class KMPromise { private val promise = MapCoreSharedModule.DJPromise() - fun setValue(value: T) { + actual fun setValue(value: T) { promise.setValue(value) } @@ -27,7 +27,7 @@ class KMPromise { promise.setValue(value.asPlatform()) } - fun future(): KMFuture = promise.getFuture().asKmp() + actual fun future(): KMFuture = promise.getFuture().asKmp() } internal fun KMFuture.asPlatform(): MapCoreSharedModule.DJFuture = From 9a5690a99b1db228602fc73fbadc8aaaa2751123 Mon Sep 17 00:00:00 2001 From: Christoph Maurhofer Date: Tue, 10 Feb 2026 17:45:45 +0100 Subject: [PATCH 62/63] Fix conflicting overloads in KMFuture --- .../kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt | 10 ++++++++++ .../kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt | 2 ++ .../kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index ad5b1e5bd..f9abb7a45 100644 --- a/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/androidMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -21,6 +21,16 @@ actual class KMPromise { promise.setValue(value) } + @Suppress("UNCHECKED_CAST") + actual fun setDataLoaderResult(value: KMDataLoaderResult) { + promise.setValue(value.asPlatform() as T) + } + + @Suppress("UNCHECKED_CAST") + actual fun setTextureLoaderResult(value: KMTextureLoaderResult) { + promise.setValue(value.asPlatform() as T) + } + actual fun future(): KMFuture = promise.future.asKmp() } diff --git a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index 55347f3d5..ea22bf7d0 100644 --- a/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/commonMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -4,5 +4,7 @@ expect class KMFuture expect class KMPromise() { fun setValue(value: T) + fun setDataLoaderResult(value: KMDataLoaderResult) + fun setTextureLoaderResult(value: KMTextureLoaderResult) fun future(): KMFuture } diff --git a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt index 1178e4d33..4761b92bc 100644 --- a/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt +++ b/kmp/iosMain/kotlin/io/openmobilemaps/mapscore/kmp/KMFuture.kt @@ -27,6 +27,14 @@ actual class KMPromise { promise.setValue(value.asPlatform()) } + actual fun setDataLoaderResult(value: KMDataLoaderResult) { + setValue(value) + } + + actual fun setTextureLoaderResult(value: KMTextureLoaderResult) { + setValue(value) + } + actual fun future(): KMFuture = promise.getFuture().asKmp() } From 11a884c2495f794e22a967242ecf6363b8b6525f Mon Sep 17 00:00:00 2001 From: Christoph Maurhofer Date: Wed, 11 Feb 2026 12:03:16 +0100 Subject: [PATCH 63/63] Adjust build options for release builds --- android/build.gradle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 5a7e932df..689efc7dc 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -62,7 +62,7 @@ android { externalNativeBuild { cmake { arguments "-DANDROID_STL=c++_shared", "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" - cppFlags "-std=c++17 -frtti -fexceptions -O2" + cppFlags "-std=c++17 -frtti -fexceptions" } } } @@ -102,14 +102,16 @@ android { debug { externalNativeBuild { cmake { - cppFlags "-DDEBUG" + arguments "-DCMAKE_BUILD_TYPE=Debug" + cppFlags "-DDEBUG -O0 -g" } } } release { externalNativeBuild { cmake { - cppFlags "-DNDEBUG" + arguments "-DCMAKE_BUILD_TYPE=Release" + cppFlags "-DNDEBUG -O2 -g0" } } ndk {