mouse_position 0.1.1

Get the mouse position on Linux, Windows and MacOS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Mouse Position


A simple crate to get the mouse position in a cross platform way.
It uses the winapi crate to get the mouse position on windows, x11-dl to get the mouse position on linux, and core-graphics to get the mouse position on macos.

## Example Usage:


```rust
use mouse_position::mouse_position::{Mouse, Position};

fn main() {
    let position = Mouse::get_mouse_position();
    match position {
        Mouse::Position { x, y } => println!("x: {}, y: {}", x, y),
        Mouse::Error => println!("Error getting mouse position"),
   }
}
```