// 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 `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; }