Implement Gesture API

This is by no means complete, but it's a start.
Nit: I'd align the rest of the parameters to the first one here.