mirror of
https://github.com/bitsycore/compose-desktop-native.git
synced 2026-10-06 19:27:26 +00:00
162 declarations leave the published API. They were public only because nothing
had ever audited the surface - none is Compose Multiplatform API, and none was
a deliberate native extra.
Removed by package:
com.compose.sdl.graphics 45 canvas/painter/gradient/path plumbing
com.compose.sdl.renderer.skia 23 SkiaBridge + SkiaSurfaceBridge
com.compose.sdl.platform 21 DefaultViewConfiguration
com.compose.sdl.res 17 ResourcePainter, vector->SVG, resource kinds
com.compose.sdl.window 11 popup host internals
com.compose.sdl.icons 7 IconDefaults
Method: inventory each module's public declarations from its klib dump by
DECLARATION OWNER (not by grepping names, which the earlier pass got wrong),
keep those referenced from another module, mark the rest internal, then let the
COMPILER adjudicate. That last step matters - it rejected three candidates that
look module-local but are real API, and I would have got at least one of them
wrong by reasoning alone:
EncodedImageDecoder exposed by a public property - it is an install seam
RawSdlHandles the return type of rawSdlHandles()
ApplicationScope the receiver of nativeComposeApp { Window(...) }
All three stay public.
Compose Multiplatform surface untouched: every removed line is owned by a
com.compose.sdl.* package, zero androidx.compose.* or org.jetbrains.compose.*.
Verified at runtime, since internalising the resource and renderer plumbing is
exactly the kind of change that compiles and then fails to draw: nav3test,
backtest and multiwintest PASS; the Images screen (which drives ResourcePainter,
the vector->SVG path and the image cache) renders 2112 distinct colours; the CPU
raster path still renders.
NOTE what this does NOT do. Kotlin `internal` is per-module and this repo spans
~20 Gradle modules, so anything crossing a module boundary must stay public -
SDL3Backend, ComposeRootHost, AppEvent and the rest of the cross-module plumbing
are still exposed. Narrowing those needs a @RequiresOptIn marker (upstream's
@InternalComposeUiApi pattern); none exists in this project yet.