Record ALLEGRO_EVENT

Hierarchy
Methods
Properties

Unit

Declaration

type ALLEGRO_EVENT = record

Description

An ALLEGRO_EVENT is an union of all builtin event structures, i.e. it is an object large enough to hold the data of any event type. All events have the following fields in common:

  • ftype (ALLEGRO_EVENT_TYPE) Indicates the type of event.

  • any.source (ALLEGRO_EVENT_SOURCEptr) The event source which generated the event.

  • any.timestamp (DOUBLE) When the event was generated.

By examining the type field you can then access type-specific fields. The any.source field tells you which event source generated that particular event. The any.timestamp field tells you when the event was generated. The time is referenced to the same starting point as al_get_time.

Each event is of one of the following types, with the usable fields given.

Overview

Fields

ftype: ALLEGRO_EVENT_TYPE
any: ALLEGRO_ANY_EVENT
display: ALLEGRO_DISPLAY_EVENT
joystick: ALLEGRO_JOYSTICK_EVENT
keyboard: ALLEGRO_KEYBOARD_EVENT
mouse: ALLEGRO_MOUSE_EVENT
timer: ALLEGRO_TIMER_EVENT
touch: ALLEGRO_TOUCH_EVENT
user: ALLEGRO_USER_EVENT

Description

Fields

ftype: ALLEGRO_EVENT_TYPE

The event type.

any: ALLEGRO_ANY_EVENT

This is to allow the user to access the other fields which are common to all event types, without using some specific type structure.

display: ALLEGRO_DISPLAY_EVENT

Information of display events.

joystick: ALLEGRO_JOYSTICK_EVENT

Information of joysitck events.

keyboard: ALLEGRO_KEYBOARD_EVENT

Information of keyboard events.

mouse: ALLEGRO_MOUSE_EVENT

Information of mouse events.

timer: ALLEGRO_TIMER_EVENT

Information of timer events.

touch: ALLEGRO_TOUCH_EVENT

Information of touch events.

user: ALLEGRO_USER_EVENT

Information of user events.


Generated by PasDoc 0.15.0. Generated on 2024-11-10 15:15:06.