---
name: "ALLEGRO_HAPTIC_CONSTANTS"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ALLEGRO_HAPTIC_CONSTANTS"
---

# ALLEGRO\_HAPTIC\_CONSTANTS(3)

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(3)](/al_get_haptic_capabilities/3.md), it means the device supports the given effect. The value of these flags should be set into a [ALLEGRO\_HAPTIC\_EFFECT(3)](/ALLEGRO_HAPTIC_EFFECT/3.md) 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(3)](/al_get_haptic_capabilities/3.md), [ALLEGRO\_HAPTIC\_EFFECT(3)](/ALLEGRO_HAPTIC_EFFECT/3.md)
