(&self, x: i32, y: i32, coord_type: CoordType)
| 1407 | } |
| 1408 | |
| 1409 | pub fn offset_at_point(&self, x: i32, y: i32, coord_type: CoordType) -> Result<i32> { |
| 1410 | self.resolve_for_text_with_context(|node, _, context| { |
| 1411 | let window_bounds = context.read_root_window_bounds(); |
| 1412 | let point = window_bounds.atspi_point_to_accesskit_point( |
| 1413 | Point::new(x.into(), y.into()), |
| 1414 | Some(node), |
| 1415 | coord_type, |
| 1416 | ); |
| 1417 | let point = node.transform().inverse() * point; |
| 1418 | node.text_position_at_point(point) |
| 1419 | .to_global_usv_index() |
| 1420 | .try_into() |
| 1421 | .map_err(|_| Error::TooManyCharacters) |
| 1422 | }) |
| 1423 | } |
| 1424 | |
| 1425 | pub fn n_selections(&self) -> Result<i32> { |
| 1426 | self.resolve_for_text(|node| { |
no test coverage detected