(pointer_id: i32)
| 53 | } |
| 54 | |
| 55 | pub(crate) fn pointer_position(pointer_id: i32) -> Option<ClientPoint> { |
| 56 | POINTERS |
| 57 | .read() |
| 58 | .iter() |
| 59 | .find(|pointer| pointer.id == pointer_id) |
| 60 | .map(|pointer| pointer.position) |
| 61 | } |
| 62 | |
| 63 | fn add_pointer(pointer_id: i32, position: ClientPoint) { |
| 64 | let mut pointers = POINTERS.write(); |