#[repr(transparent)]pub struct SDL_HapticEffectType(pub Uint16);Expand description
- Type of haptic effect.
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
CONSTANT | SDL_HAPTIC_CONSTANT | Constant effect supported. Constant haptic effect. \since This macro is available since SDL 3.2.0. \sa SDL_HapticCondition |
SINE | SDL_HAPTIC_SINE | Sine wave effect supported. Periodic haptic effect that simulates sine waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic |
SQUARE | SDL_HAPTIC_SQUARE | Square wave effect supported. Periodic haptic effect that simulates square waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic |
TRIANGLE | SDL_HAPTIC_TRIANGLE | Triangle wave effect supported. Periodic haptic effect that simulates triangular waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic |
SAWTOOTHUP | SDL_HAPTIC_SAWTOOTHUP | Sawtoothup wave effect supported. Periodic haptic effect that simulates saw tooth up waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic |
SAWTOOTHDOWN | SDL_HAPTIC_SAWTOOTHDOWN | Sawtoothdown wave effect supported. Periodic haptic effect that simulates saw tooth down waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic |
RAMP | SDL_HAPTIC_RAMP | Ramp effect supported. Ramp haptic effect. \since This macro is available since SDL 3.2.0. \sa SDL_HapticRamp |
SPRING | SDL_HAPTIC_SPRING | Spring effect supported - uses axes position. Condition haptic effect that simulates a spring. Effect is based on the axes position. \since This macro is available since SDL 3.2.0. \sa SDL_HapticCondition |
DAMPER | SDL_HAPTIC_DAMPER | Damper effect supported - uses axes velocity. Condition haptic effect that simulates dampening. Effect is based on the axes velocity. \since This macro is available since SDL 3.2.0. \sa SDL_HapticCondition |
INERTIA | SDL_HAPTIC_INERTIA | Inertia effect supported - uses axes acceleration. Condition haptic effect that simulates inertia. Effect is based on the axes acceleration. \since This macro is available since SDL 3.2.0. \sa SDL_HapticCondition |
FRICTION | SDL_HAPTIC_FRICTION | Friction effect supported - uses axes movement. Condition haptic effect that simulates friction. Effect is based on the axes movement. \since This macro is available since SDL 3.2.0. \sa SDL_HapticCondition |
LEFTRIGHT | SDL_HAPTIC_LEFTRIGHT | Left/Right effect supported. Haptic effect for direct control over high/low frequency motors. \since This macro is available since SDL 3.2.0. \sa SDL_HapticLeftRight |
RESERVED1 | SDL_HAPTIC_RESERVED1 | Reserved for future use. \since This macro is available since SDL 3.2.0. |
RESERVED2 | SDL_HAPTIC_RESERVED2 | Reserved for future use. \since This macro is available since SDL 3.2.0. |
RESERVED3 | SDL_HAPTIC_RESERVED3 | Reserved for future use. \since This macro is available since SDL 3.2.0. |
CUSTOM | SDL_HAPTIC_CUSTOM | Custom effect is supported. User defined custom haptic effect. \since This macro is available since SDL 3.2.0. |
GAIN | SDL_HAPTIC_GAIN | Device can set global gain. Device supports setting the global gain. \since This macro is available since SDL 3.2.0. \sa SDL_SetHapticGain |
AUTOCENTER | SDL_HAPTIC_AUTOCENTER | Device can set autocenter. Device supports setting autocenter. \since This macro is available since SDL 3.2.0. \sa SDL_SetHapticAutocenter |
STATUS | SDL_HAPTIC_STATUS | Device can be queried for effect status. Device supports querying effect status. \since This macro is available since SDL 3.2.0. \sa SDL_GetHapticEffectStatus |
PAUSE | SDL_HAPTIC_PAUSE | Device can be paused. Devices supports being paused. \since This macro is available since SDL 3.2.0. \sa SDL_PauseHaptic \sa SDL_ResumeHaptic |
Tuple Fields§
§0: Uint16Implementations§
Source§impl SDL_HapticEffectType
impl SDL_HapticEffectType
Sourcepub const CONSTANT: Self
pub const CONSTANT: Self
Sourcepub const SINE: Self
pub const SINE: Self
Sourcepub const SQUARE: Self
pub const SQUARE: Self
Sourcepub const TRIANGLE: Self
pub const TRIANGLE: Self
Sourcepub const SAWTOOTHUP: Self
pub const SAWTOOTHUP: Self
Sourcepub const SAWTOOTHDOWN: Self
pub const SAWTOOTHDOWN: Self
Sourcepub const RAMP: Self
pub const RAMP: Self
Sourcepub const SPRING: Self
pub const SPRING: Self
Sourcepub const DAMPER: Self
pub const DAMPER: Self
Sourcepub const INERTIA: Self
pub const INERTIA: Self
Sourcepub const FRICTION: Self
pub const FRICTION: Self
Sourcepub const LEFTRIGHT: Self
pub const LEFTRIGHT: Self
Sourcepub const CUSTOM: Self
pub const CUSTOM: Self
Custom effect is supported.
User defined custom haptic effect.
§Availability
This macro is available since SDL 3.2.0.
Sourcepub const GAIN: Self
pub const GAIN: Self
Sourcepub const AUTOCENTER: Self
pub const AUTOCENTER: Self
Sourcepub const STATUS: Self
pub const STATUS: Self
Trait Implementations§
Source§impl BitAnd for SDL_HapticEffectType
impl BitAnd for SDL_HapticEffectType
Source§impl BitAndAssign for SDL_HapticEffectType
impl BitAndAssign for SDL_HapticEffectType
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOr for SDL_HapticEffectType
impl BitOr for SDL_HapticEffectType
Source§impl BitOrAssign for SDL_HapticEffectType
impl BitOrAssign for SDL_HapticEffectType
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXor for SDL_HapticEffectType
impl BitXor for SDL_HapticEffectType
Source§impl BitXorAssign for SDL_HapticEffectType
impl BitXorAssign for SDL_HapticEffectType
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl Clone for SDL_HapticEffectType
impl Clone for SDL_HapticEffectType
Source§fn clone(&self) -> SDL_HapticEffectType
fn clone(&self) -> SDL_HapticEffectType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_HapticEffectType
Available on crate feature debug-impls only.
impl Debug for SDL_HapticEffectType
Available on crate feature
debug-impls only.Source§impl Default for SDL_HapticEffectType
impl Default for SDL_HapticEffectType
Source§fn default() -> SDL_HapticEffectType
fn default() -> SDL_HapticEffectType
Returns the “default value” for a type. Read more
Source§impl From<SDL_HapticEffectType> for Uint16
impl From<SDL_HapticEffectType> for Uint16
Source§fn from(value: SDL_HapticEffectType) -> Self
fn from(value: SDL_HapticEffectType) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_HapticEffectType
Available on crate feature metadata only.
impl GroupMetadata for SDL_HapticEffectType
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_HapticEffectType
impl Hash for SDL_HapticEffectType
Source§impl Not for SDL_HapticEffectType
impl Not for SDL_HapticEffectType
Source§impl PartialEq<SDL_HapticEffectType> for Uint16
impl PartialEq<SDL_HapticEffectType> for Uint16
Source§impl PartialEq<u16> for SDL_HapticEffectType
impl PartialEq<u16> for SDL_HapticEffectType
Source§impl PartialEq for SDL_HapticEffectType
impl PartialEq for SDL_HapticEffectType
impl Copy for SDL_HapticEffectType
impl Eq for SDL_HapticEffectType
impl StructuralPartialEq for SDL_HapticEffectType
Auto Trait Implementations§
impl Freeze for SDL_HapticEffectType
impl RefUnwindSafe for SDL_HapticEffectType
impl Send for SDL_HapticEffectType
impl Sync for SDL_HapticEffectType
impl Unpin for SDL_HapticEffectType
impl UnwindSafe for SDL_HapticEffectType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more