SDL_HapticEffectType

Struct SDL_HapticEffectType 

Source
#[repr(transparent)]
pub struct SDL_HapticEffectType(pub Uint16);
Expand description
  • Type of haptic effect.

§Known values (sdl3-sys)

Associated constantGlobal constantDescription
CONSTANTSDL_HAPTIC_CONSTANTConstant effect supported. Constant haptic effect. \since This macro is available since SDL 3.2.0. \sa SDL_HapticCondition
SINESDL_HAPTIC_SINESine wave effect supported. Periodic haptic effect that simulates sine waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic
SQUARESDL_HAPTIC_SQUARESquare wave effect supported. Periodic haptic effect that simulates square waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic
TRIANGLESDL_HAPTIC_TRIANGLETriangle wave effect supported. Periodic haptic effect that simulates triangular waves. \since This macro is available since SDL 3.2.0. \sa SDL_HapticPeriodic
SAWTOOTHUPSDL_HAPTIC_SAWTOOTHUPSawtoothup 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
SAWTOOTHDOWNSDL_HAPTIC_SAWTOOTHDOWNSawtoothdown 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
RAMPSDL_HAPTIC_RAMPRamp effect supported. Ramp haptic effect. \since This macro is available since SDL 3.2.0. \sa SDL_HapticRamp
SPRINGSDL_HAPTIC_SPRINGSpring 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
DAMPERSDL_HAPTIC_DAMPERDamper 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
INERTIASDL_HAPTIC_INERTIAInertia 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
FRICTIONSDL_HAPTIC_FRICTIONFriction 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
LEFTRIGHTSDL_HAPTIC_LEFTRIGHTLeft/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
RESERVED1SDL_HAPTIC_RESERVED1Reserved for future use. \since This macro is available since SDL 3.2.0.
RESERVED2SDL_HAPTIC_RESERVED2Reserved for future use. \since This macro is available since SDL 3.2.0.
RESERVED3SDL_HAPTIC_RESERVED3Reserved for future use. \since This macro is available since SDL 3.2.0.
CUSTOMSDL_HAPTIC_CUSTOMCustom effect is supported. User defined custom haptic effect. \since This macro is available since SDL 3.2.0.
GAINSDL_HAPTIC_GAINDevice can set global gain. Device supports setting the global gain. \since This macro is available since SDL 3.2.0. \sa SDL_SetHapticGain
AUTOCENTERSDL_HAPTIC_AUTOCENTERDevice can set autocenter. Device supports setting autocenter. \since This macro is available since SDL 3.2.0. \sa SDL_SetHapticAutocenter
STATUSSDL_HAPTIC_STATUSDevice can be queried for effect status. Device supports querying effect status. \since This macro is available since SDL 3.2.0. \sa SDL_GetHapticEffectStatus
PAUSESDL_HAPTIC_PAUSEDevice 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: Uint16

Implementations§

Source§

impl SDL_HapticEffectType

Source

pub const CONSTANT: Self

Constant effect supported.

Constant haptic effect.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const SINE: Self

Sine wave effect supported.

Periodic haptic effect that simulates sine waves.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const SQUARE: Self

Square wave effect supported.

Periodic haptic effect that simulates square waves.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const TRIANGLE: Self

Triangle wave effect supported.

Periodic haptic effect that simulates triangular waves.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const SAWTOOTHUP: Self

Sawtoothup wave effect supported.

Periodic haptic effect that simulates saw tooth up waves.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const SAWTOOTHDOWN: Self

Sawtoothdown wave effect supported.

Periodic haptic effect that simulates saw tooth down waves.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const RAMP: Self

Ramp effect supported.

Ramp haptic effect.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const SPRING: Self

Spring effect supported - uses axes position.

Condition haptic effect that simulates a spring. Effect is based on the axes position.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const DAMPER: Self

Damper effect supported - uses axes velocity.

Condition haptic effect that simulates dampening. Effect is based on the axes velocity.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const INERTIA: Self

Inertia effect supported - uses axes acceleration.

Condition haptic effect that simulates inertia. Effect is based on the axes acceleration.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const FRICTION: Self

Friction effect supported - uses axes movement.

Condition haptic effect that simulates friction. Effect is based on the axes movement.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const LEFTRIGHT: Self

Left/Right effect supported.

Haptic effect for direct control over high/low frequency motors.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const RESERVED1: Self

Reserved for future use.

§Availability

This macro is available since SDL 3.2.0.

Source

pub const RESERVED2: Self

Reserved for future use.

§Availability

This macro is available since SDL 3.2.0.

Source

pub const RESERVED3: Self

Reserved for future use.

§Availability

This macro is available since SDL 3.2.0.

Source

pub const CUSTOM: Self

Custom effect is supported.

User defined custom haptic effect.

§Availability

This macro is available since SDL 3.2.0.

Source

pub const GAIN: Self

Device can set global gain.

Device supports setting the global gain.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const AUTOCENTER: Self

Device can set autocenter.

Device supports setting autocenter.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const STATUS: Self

Device can be queried for effect status.

Device supports querying effect status.

§Availability

This macro is available since SDL 3.2.0.

§See also
Source

pub const PAUSE: Self

Device can be paused.

Devices supports being paused.

§Availability

This macro is available since SDL 3.2.0.

§See also

Trait Implementations§

Source§

impl BitAnd for SDL_HapticEffectType

Source§

type Output = SDL_HapticEffectType

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for SDL_HapticEffectType

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr for SDL_HapticEffectType

Source§

type Output = SDL_HapticEffectType

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for SDL_HapticEffectType

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor for SDL_HapticEffectType

Source§

type Output = SDL_HapticEffectType

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for SDL_HapticEffectType

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for SDL_HapticEffectType

Source§

fn clone(&self) -> SDL_HapticEffectType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SDL_HapticEffectType

Available on crate feature debug-impls only.
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SDL_HapticEffectType

Source§

fn default() -> SDL_HapticEffectType

Returns the “default value” for a type. Read more
Source§

impl From<SDL_HapticEffectType> for Uint16

Source§

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.
Source§

const GROUP_METADATA: &'static Group

Metadata for this group
Source§

impl Hash for SDL_HapticEffectType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Not for SDL_HapticEffectType

Source§

type Output = SDL_HapticEffectType

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl PartialEq<SDL_HapticEffectType> for Uint16

Source§

fn eq(&self, other: &SDL_HapticEffectType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u16> for SDL_HapticEffectType

Source§

fn eq(&self, other: &Uint16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for SDL_HapticEffectType

Source§

fn eq(&self, other: &SDL_HapticEffectType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SDL_HapticEffectType

Source§

impl Eq for SDL_HapticEffectType

Source§

impl StructuralPartialEq for SDL_HapticEffectType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.