---
name: "ALLEGRO_HAPTIC_CONSTANTS"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ALLEGRO_HAPTIC_CONSTANTS/3alleg5"
---

# ALLEGRO\_HAPTIC\_CONSTANTS(3alleg5)

Allegro 5 API

## NAME

ALLEGRO\_HAPTIC\_CONSTANTS - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  enum ALLEGRO_HAPTIC_CONSTANTS
  ```

## DESCRIPTION

This enum contains flags that are used to define haptic effects and capabilities. If the flag is set in the return value of al\_get\_haptic\_capabilities(3alleg5), it means the device supports the given effect. The value of these flags should be set into a ALLEGRO\_HAPTIC\_EFFECT(3alleg5) struct to determine what kind of haptic effect should be played.

- •

  ALLEGRO\_HAPTIC\_RUMBLE - simple vibration effects

- •

  ALLEGRO\_HAPTIC\_PERIODIC - periodic, wave-form effects

- •

  ALLEGRO\_HAPTIC\_CONSTANT - constant effects

- •

  ALLEGRO\_HAPTIC\_SPRING - spring effects

- •

  ALLEGRO\_HAPTIC\_FRICTION - friction effects

- •

  ALLEGRO\_HAPTIC\_DAMPER - damper effects

- •

  ALLEGRO\_HAPTIC\_INERTIA - inertia effects

- •

  ALLEGRO\_HAPTIC\_RAMP - ramp effects

- •

  ALLEGRO\_HAPTIC\_SQUARE - square wave periodic effect

- •

  ALLEGRO\_HAPTIC\_TRIANGLE - triangle wave periodic effect

- •

  ALLEGRO\_HAPTIC\_SINE - sine wave periodic effect

- •

  ALLEGRO\_HAPTIC\_SAW\_UP - upwards saw wave periodic effect

- •

  ALLEGRO\_HAPTIC\_SAW\_DOWN - downwards saw wave periodic effect

- •

  ALLEGRO\_HAPTIC\_CUSTOM - custom wave periodic effect

- •

  ALLEGRO\_HAPTIC\_GAIN - the haptic device supports gain setting

- •

  ALLEGRO\_HAPTIC\_ANGLE - the haptic device supports angle coordinates

- •

  ALLEGRO\_HAPTIC\_RADIUS - the haptic device supports radius coordinates

- •

  ALLEGRO\_HAPTIC\_AZIMUTH - the haptic device supports azimuth coordinates

- •

  ALLEGRO\_HAPTIC\_AUTOCENTER

## SINCE

5\.1.8

*\[Unstable API\]:* Perhaps could be simplified due to limited support for all the exposed features across all of the platforms. Awaiting feedback from users.

## SEE ALSO

al\_get\_haptic\_capabilities(3alleg5), ALLEGRO\_HAPTIC\_EFFECT(3alleg5)
