ALLEGRO_HAPTIC_CONSTANTS(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… ALLEGRO_HAPTIC_CONSTANTS(3) β€” Library Functions Manual

🌸 NAME

ALLEGRO_HAPTIC_CONSTANTS β€” Allegro 5 API. That’s the name line, bestie, and it’s serving exactly what it says.

✨ SYNOPSIS

#include <allegro5/allegro.h>

enum ALLEGRO_HAPTIC_CONSTANTS

πŸŽ€ DESCRIPTION

Okay so this enum is literally the flag stash for defining haptic effects and capabilities. If a flag is set in the return value of al_get_haptic_capabilities(3), it means the device supports the given effect. The value of these flags should be set into a ALLEGRO_HAPTIC_EFFECT(3) struct to determine what kind of haptic effect should be played.

Here are the flags, in the exact order the page gives them:

  • ALLEGRO_HAPTIC_RUMBLE β€” simple vibration effects. Basic buzz energy, no cap.
  • 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. Periodt. πŸ’…

[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

Go peek at al_get_haptic_capabilities(3) and ALLEGRO_HAPTIC_EFFECT(3) next, bestie. Those are the SEE ALSO besties, and they are lowkey important.


πŸ’– Signed off from the Allegro reference manual β€” footer says ALLEGRO_HAPTIC_CONSTANTS(3), and there’s no date line on the footer, so that’s the whole cute receipt. 🫢✨

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms