---
name: "ALLEGRO_EVENT_SOURCE"
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_EVENT_SOURCE/3alleg5"
---

# ALLEGRO\_EVENT\_SOURCE(3alleg5)

Allegro 5 API

## NAME

ALLEGRO\_EVENT\_SOURCE - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  typedef struct ALLEGRO_EVENT_SOURCE ALLEGRO_EVENT_SOURCE;
  ```

## DESCRIPTION

An event source is any object which can generate events. For example, an ALLEGRO\_DISPLAY can generate events, and you can get the ALLEGRO\_EVENT\_SOURCE pointer from an ALLEGRO\_DISPLAY with al\_get\_display\_event\_source(3alleg5).

You may create your own “user” event sources that emit custom events.

## SEE ALSO

ALLEGRO\_EVENT(3alleg5), al\_init\_user\_event\_source(3alleg5), al\_emit\_user\_event(3alleg5)
