MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / accessibility_root_size

Function accessibility_root_size

packages/server/src/main.rs:5806–5812  ·  view source on GitHub ↗
(bridge: &NativeBridge, udid: &str)

Source from the content-addressed store, hash-verified

5804}
5805
5806fn accessibility_root_size(bridge: &NativeBridge, udid: &str) -> Option<(f64, f64)> {
5807 let snapshot = bridge.accessibility_snapshot(udid, None).ok()?;
5808 let frame = snapshot.get("roots")?.as_array()?.first()?.get("frame")?;
5809 let width = frame.get("width")?.as_f64()?;
5810 let height = frame.get("height")?.as_f64()?;
5811 (width > 0.0 && height > 0.0).then_some((width, height))
5812}
5813
5814fn chrome_screen_size(bridge: &NativeBridge, udid: &str) -> Option<(f64, f64)> {
5815 let profile = bridge.chrome_profile(udid).ok()?;

Callers 3

resolve_touch_pointFunction · 0.85
gesture_coordinatesFunction · 0.85
gesture_surface_sizeFunction · 0.85

Calls 2

getMethod · 0.65

Tested by

no test coverage detected