22// SwiftCallbackSink.swift
33// ComposeUI
44//
5- // The entire Kotlin→Swift bridge surface. The JNI symbol for each method
6- // derives from THIS signature — the Kotlin `external` declarations in
7- // SwiftCallbackSink.kt must stay exactly in sync, and this class must never
8- // grow per-view methods.
5+ // The one remaining hand-matched Kotlin→Swift external: a lazy-row query
6+ // returning a materialized `ViewNode` subtree. It can't move to the generated
7+ // `BridgeExport` bindings because an exported Swift function can't return a
8+ // JavaKit-wrapped type. The JNI symbol derives from THIS signature, so the
9+ // Kotlin `external fun itemNode` in SwiftCallbackSink.kt must stay in sync.
10+ // The five scalar event callbacks now cross through `BridgeExport`.
911//
1012
1113import SwiftJava
@@ -17,31 +19,6 @@ open class SwiftCallbackSink: JavaObject {
1719@JavaImplementation ( " com.pureswift.swiftui.SwiftCallbackSink " )
1820extension SwiftCallbackSink {
1921
20- @JavaMethod
21- func invokeVoid( _ id: Int64 ) {
22- BridgeRuntime . current? . invokeVoid ( id)
23- }
24-
25- @JavaMethod
26- func invokeBool( _ id: Int64 , _ value: Bool ) {
27- BridgeRuntime . current? . invokeBool ( id, value)
28- }
29-
30- @JavaMethod
31- func invokeDouble( _ id: Int64 , _ value: Double ) {
32- BridgeRuntime . current? . invokeDouble ( id, value)
33- }
34-
35- @JavaMethod
36- func invokeInt( _ id: Int64 , _ value: Int32 ) {
37- BridgeRuntime . current? . invokeInt ( id, Int ( value) )
38- }
39-
40- @JavaMethod
41- func invokeString( _ id: Int64 , _ value: String ) {
42- BridgeRuntime . current? . invokeString ( id, value)
43- }
44-
4522 @JavaMethod
4623 func itemNode( _ id: Int64 , _ index: Int32 ) -> ViewNodeObject ? {
4724 BridgeRuntime . current? . itemNode ( id, Int ( index) )
0 commit comments