// Declarative JNI class bindings used by the Android platform module's // safe-insets dispatch chain. Imported under a named namespace from // `modules/platform/android.sx` so the bare class names (`Activity`, // `Window`, `View`, `WindowInsets`) don't pollute the top-level // namespace when consumers flat-import the platform module — `View` // in particular collides with `modules/ui/view.sx`'s protocol. // // Inside the platform module these are referenced as `Jni.Activity`, // `Jni.Window`, etc. The compiler registers the decls both qualified // and bare in `foreign_class_map`, so cross-class refs in method // signatures (`getWindow :: (self: *Self) -> *Window`) still resolve // against the bare name within the namespace. WindowInsets :: #foreign #jni_class("android/view/WindowInsets") { getSystemWindowInsetTop :: (self: *Self) -> s32; getSystemWindowInsetLeft :: (self: *Self) -> s32; getSystemWindowInsetBottom :: (self: *Self) -> s32; getSystemWindowInsetRight :: (self: *Self) -> s32; } View :: #foreign #jni_class("android/view/View") { getRootWindowInsets :: (self: *Self) -> *WindowInsets; } Window :: #foreign #jni_class("android/view/Window") { getDecorView :: (self: *Self) -> *View; } Activity :: #foreign #jni_class("android/app/Activity") { getWindow :: (self: *Self) -> *Window; }