Struct rich_sdl2_rust::haptic::MouseHaptic
source · pub struct MouseHaptic { /* private fields */ }
Expand description
A haptic device got from the mouse.
Implementations§
Methods from Deref<Target = Haptic>§
sourcepub fn is_effect_supported(&self, effect: &HapticEffect) -> bool
pub fn is_effect_supported(&self, effect: &HapticEffect) -> bool
Returns whether the effect is supported on the haptic device.
sourcepub fn new_effect(&self, effect: &HapticEffect) -> Result<PendingEffect<'_>>
pub fn new_effect(&self, effect: &HapticEffect) -> Result<PendingEffect<'_>>
Constructs the PendingEffect
from the effect specification.
Errors
Returns Err
if this feature is unsupported, or failed to create a new haptic effect on the device.
sourcepub fn effects_creation_capacity(&self) -> usize
pub fn effects_creation_capacity(&self) -> usize
Returns the capacity of the effects on the haptic device.
sourcepub fn effects_playing_capacity(&self) -> usize
pub fn effects_playing_capacity(&self) -> usize
Returns the maximum numbers of playing the effects at same time on the haptic device.
sourcepub fn stop_all_effect(&self)
pub fn stop_all_effect(&self)
Stops all the playing effect.
sourcepub fn set_auto_center(&self, auto_center: u32)
pub fn set_auto_center(&self, auto_center: u32)
Sets auto-center. If not supported, this has no effects.
sourcepub fn property(&self) -> HapticProperty
pub fn property(&self) -> HapticProperty
Queries a property on the haptic device.