ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.79k stars 65 forks source link

add haptics support :) #93

Closed arilotter closed 11 months ago

arilotter commented 12 months ago

adds the ability to mess with a Macbook touchpad using NSHapticFeedbackManager.

ryanmcgrath commented 11 months ago

This is cool and I'm down to merge it as-is - the iOS tests that are failing are due to something else as far as I know, and I need to fix them before 0.4 gets released... so we can ignore it for now.

If you hit that linebreak that I mentioned I'll hit that merge button, lol

arilotter commented 11 months ago

comments addressed - also check this out, there's internal APIs that make it vibrate harder https://gist.github.com/arilotter/9e273bed948c6609fe17e429a54c3e8d

ryanmcgrath commented 11 months ago

comments addressed - also check this out, there's internal APIs that make it vibrate harder https://gist.github.com/arilotter/9e273bed948c6609fe17e429a54c3e8d

Yup, those APIs often feel like they go unnoticed but they're pretty cool.

There's actually a world where this might be better off as an external library, but I'm fine with it in cacao for now since these things are generally so tied to UI to begin with.

Thanks for the contribution!