Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the pointer event overhaul #3876

Merged
merged 1 commit into from
Oct 8, 2024

Commits on Oct 8, 2024

  1. api: overhaul pointer API

    - Rename `CursorMoved` to `PointerMoved`.
    - Rename `CursorEntered` to `PointerEntered`.
    - Rename `CursorLeft` to `PointerLeft`.
    - Rename `MouseInput` to `PointerButton`.
    - Add `position` to every `PointerEvent`.
    - Remove `Touch`, which is folded into the `Pointer*` events.
    - New `PointerType` added to `PointerEntered` and `PointerLeft`,
      signifying which pointer type is the source of this event.
    - New `PointerSource` added to `PointerMoved`, similar to `PointerType`
      but holding additional data.
    - New `ButtonSource` added to `PointerButton`, similar to `PointerType`
      but holding pointer type specific buttons. Use
      `ButtonSource::mouse_button()` to easily normalize any pointer button
      type to a generic mouse button.
    - In the same spirit rename `DeviceEvent::MouseMotion` to `PointerMotion`.
    - Remove `Force::Calibrated::altitude_angle`.
    
    Fixes rust-windowing#3833.
    Fixes rust-windowing#883.
    Fixes rust-windowing#336.
    
    Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
    daxpedda and kchibisov committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    b2a61a6 View commit details
    Browse the repository at this point in the history