fayez-nazzal / mouse_position

Rust crate to get mouse position on Linux, MacOS, and Windows.
https://crates.io/crates/mouse_position
MIT License
7 stars 6 forks source link

NetBSD support #3

Open woelper opened 8 months ago

woelper commented 8 months ago

Hi, and thank you for this great library!

I am starting to use it in my image viewer to implement a borderless mode and allow dragging - having an absolute mouse position is super handy for that.

I am running tests on several platforms and noticed that NetBSD failed - I suspect that platform is not supported yet?

  error[E0599]: no variant or associated item named `get_mouse_position` found for enum `mouse_position::mouse_position::Mouse` in the current scope
      --> src/ui.rs:2027:39
       |
  2027 |                 let position = Mouse::get_mouse_position();
       |                                       ^^^^^^^^^^^^^^^^^^ variant or associated item not found in `Mouse`

Would you consider adding that feature? If it helps, I can help adding a github actions CI to test - I have one here: https://github.com/woelper/oculante/blob/master/.github/workflows/check_netbsd_minimal.yml

yurivict commented 4 months ago

These patches make mouse_position build on FreeBSD.