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

Method send_touch

packages/server/src/native/bridge.rs:651–661  ·  view source on GitHub ↗
(&self, udid: &str, x: f64, y: f64, phase: &str)

Source from the content-addressed store, hash-verified

649 }
650
651 pub fn send_touch(&self, udid: &str, x: f64, y: f64, phase: &str) -> Result<(), AppError> {
652 let udid = CString::new(udid).map_err(|e| AppError::bad_request(e.to_string()))?;
653 let phase = CString::new(phase).map_err(|e| AppError::bad_request(e.to_string()))?;
654 unsafe {
655 let mut error = ptr::null_mut();
656 bool_result(
657 ffi::xcw_native_send_touch(udid.as_ptr(), x, y, phase.as_ptr(), &mut error),
658 error,
659 )
660 }
661 }
662
663 pub fn send_key(&self, udid: &str, key_code: u16, modifiers: u32) -> Result<(), AppError> {
664 let udid = CString::new(udid).map_err(|e| AppError::bad_request(e.to_string()))?;

Callers 7

run_batch_stepFunction · 0.45
perform_tap_payloadFunction · 0.45
perform_scroll_inputFunction · 0.45
run_batch_stepFunction · 0.45
run_control_messageFunction · 0.45

Calls 4

bool_resultFunction · 0.85
xcw_native_send_touchFunction · 0.85

Tested by

no test coverage detected