Skip to main content

PlatformGestures

Trait PlatformGestures 

Source
pub trait PlatformGestures {
    // Provided methods
    fn tuning(&self) -> GestureTuning { ... }
    fn native_recognizers(&self) -> GestureKinds { ... }
}
Expand description

Gesture settings that a platform supplies to GPUI.

A platform returns an implementation from its Platform::gestures method. Implement it to change the touch feel of your platform. The window reads PlatformGestures::tuning when it opens. Nothing reads PlatformGestures::native_recognizers yet.

Provided Methods§

Source

fn tuning(&self) -> GestureTuning

Returns the timing and feel constants the portable recognizer uses on this platform. The default is GestureTuning::default.

Source

fn native_recognizers(&self) -> GestureKinds

Returns the gestures this platform recognizes natively. The default is GestureKinds::NONE, which means the portable recognizer handles everything.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§