feat(springboard): get homescreen icon metrics (#67)

* feat(springboard): get homescreen icon metrics

* chore: clippy and fmt
This commit is contained in:
neo
2026-02-13 15:00:47 -05:00
committed by GitHub
parent a523f0cb9c
commit 54439b85dd
3 changed files with 77 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ pub fn register() -> JkCommand {
"get_interface_orientation",
JkCommand::new().help("Gets the device's current screen orientation"),
)
.with_subcommand(
"get_homescreen_icon_metrics",
JkCommand::new().help("Gets home screen icon layout metrics"),
)
.subcommand_required(true)
}
@@ -113,6 +117,14 @@ pub async fn main(arguments: &CollectedArguments, provider: Box<dyn IdeviceProvi
.expect("Failed to get interface orientation");
println!("{:?}", orientation);
}
"get_homescreen_icon_metrics" => {
let metrics = sbc
.get_homescreen_icon_metrics()
.await
.expect("Failed to get homescreen icon metrics");
let metrics_value = plist::Value::Dictionary(metrics);
println!("{}", pretty_print_plist(&metrics_value));
}
_ => unreachable!(),
}
}