Capital-Foreign + stale-identifier comment refs: library (Foreign Java types→Runtime, foreign-class→runtime-class, foreign_class_map→runtime_class_map); docs/debugger (foreign call→extern call); docs/fork-c ledger (foreign_class_map, protocol/foreign→ runtime-class); docs/inline-asm-design Deviation-6 obsolete #foreign-vs-extern design RESOLVED to the landed extern/export reality; example comments (parseForeignClassDecl→ parseRuntimeClassDecl, checkForeignRefs→checkExternRefs, Foreign decls→Extern). Docs/ comments only — no build impact.
32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
// Declarative JNI class bindings for the standard Android system-bar
|
|
// inset chain (`Activity.getWindow → Window.getDecorView → View
|
|
// .getRootWindowInsets → WindowInsets.getSystemWindowInset{Top,Left,
|
|
// Bottom,Right}`). Intended to be imported under a named namespace
|
|
// (e.g. `Jni :: #import "library/modules/platform/android_jni.sx"`) so
|
|
// the bare class names don't pollute the top-level namespace —
|
|
// `View` in particular collides with `modules/ui/view.sx`'s protocol.
|
|
// Inside the namespace these are referenced as `Jni.Activity`,
|
|
// `Jni.Window`, etc. The compiler registers the decls both qualified
|
|
// and bare in `runtime_class_map`, so cross-class refs in method
|
|
// signatures (`getWindow :: (self: *Self) -> *Window`) still resolve
|
|
// against the bare name within the namespace.
|
|
|
|
WindowInsets :: #jni_class("android/view/WindowInsets") extern {
|
|
getSystemWindowInsetTop :: (self: *Self) -> i32;
|
|
getSystemWindowInsetLeft :: (self: *Self) -> i32;
|
|
getSystemWindowInsetBottom :: (self: *Self) -> i32;
|
|
getSystemWindowInsetRight :: (self: *Self) -> i32;
|
|
}
|
|
|
|
View :: #jni_class("android/view/View") extern {
|
|
getRootWindowInsets :: (self: *Self) -> *WindowInsets;
|
|
}
|
|
|
|
Window :: #jni_class("android/view/Window") extern {
|
|
getDecorView :: (self: *Self) -> *View;
|
|
}
|
|
|
|
Activity :: #jni_class("android/app/Activity") extern {
|
|
getWindow :: (self: *Self) -> *Window;
|
|
}
|