Rename app_init to android_init

This commit is contained in:
iris committed 2026-09-11 12:36:50 -04:00
1 parent c3122301b4
commit 40e7259d99
11 files changed
+15 -15

No files matched your search

+2 -2
View File
@@ -25,7 +25,7 @@ application-id = "com.example.myapp"
label = "My app"
```
`#[iris::app_init]` marks the initializer called when Android creates the Iris
`#[iris::android_init]` marks the initializer called when Android creates the Iris
view. The attribute supplies its own Android target gate and generates the JNI
loader glue. An application with no state beyond the UI state receives
`AndroidUiState` directly by mutable reference:
@@ -37,7 +37,7 @@ fn build<Rsc: UiRsc>(rsc: &mut Rsc, ui_state: &mut impl HasRoot<Rsc>) {
rect(PaintId::RED).set_root(rsc, ui_state);
}
#[iris::app_init]
#[iris::android_init]
fn create(
ui_state: &mut AndroidUiState,
rsc: &mut StdRsc<AndroidUiState>,