mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 06:26:15 +01:00
feat(springboard): get device orientation (#65)
This commit is contained in:
@@ -45,6 +45,10 @@ pub fn register() -> JkCommand {
|
||||
.with_argument(JkArgument::new().required(true)),
|
||||
),
|
||||
)
|
||||
.with_subcommand(
|
||||
"get_interface_orientation",
|
||||
JkCommand::new().help("Gets the device's current screen orientation"),
|
||||
)
|
||||
.subcommand_required(true)
|
||||
}
|
||||
|
||||
@@ -102,6 +106,13 @@ pub async fn main(arguments: &CollectedArguments, provider: Box<dyn IdeviceProvi
|
||||
.await
|
||||
.expect("Failed to save wallpaper");
|
||||
}
|
||||
"get_interface_orientation" => {
|
||||
let orientation = sbc
|
||||
.get_interface_orientation()
|
||||
.await
|
||||
.expect("Failed to get interface orientation");
|
||||
println!("{:?}", orientation);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user