type Allegro_Any_Event is record typ : Allegro_Event_Type; source : A_Allegro_Event_Source; end record;
type Allegro_Display_Event is record typ : Allegro_Event_Type; source : A_Allegro_Display; timestamp : double; x, y : Integer; width, height : Integer; orientation : Allegro_Display_Orientation; end record;
type Allegro_Joystick_Event is record typ : Allegro_Event_Type; source : A_Allegro_Joystick; timestamp : double; id : A_Allegro_Joystick; stick : Integer; axis : Integer; pos : Float; button : Integer; end record;
type Allegro_Keyboard_Event is record typ : Allegro_Event_Type; source : A_Allegro_Keyboard; timestamp : double; display : A_Allegro_Display; keycode : Integer; unichar : Integer; modifiers : Unsigned_32; repeat : Bool; end record;
type Allegro_Mouse_Event is record typ : Allegro_Event_Type; source : A_Allegro_Mouse; timestamp : double; display : A_Allegro_Display; x, y, z, w : Integer; dx, dy, dz, dw : Integer; button : Unsigned_32; pressure : Float; end record;
type Allegro_Timer_Event is record typ : Allegro_Event_Type; source : A_Allegro_Timer; timestamp : double; count : Unsigned_64; error : double; end record;
type Allegro_User_Event is record typ : Allegro_Event_Type; source : A_Allegro_Event_Source; timestamp : double; internal_descr : Address; data1 : Address; data2 : Address; data3 : Address; data4 : Address; end record;
type A_Allegro_User_Event is access all Allegro_User_Event;
type Allegro_Event(t : Allegro_Event_Type := 0) is record case t is when 0 => any : Allegro_Any_Event; when 1..4 => joystick : Allegro_Joystick_Event; when 10..12 => keyboard : Allegro_Keyboard_Event; when 20..25 => mouse : Allegro_Mouse_Event; when 30 => timer : Allegro_Timer_Event; when 40..47 => display : Allegro_Display_Event; when others => user : Allegro_User_Event; end case; end record;
type A_Allegro_Event_Queue is access all Allegro_Event_Queue;
type A_User_Event_Destructor is access procedure( event : A_Allegro_User_Event );
ALLEGRO_EVENT_JOYSTICK_AXIS : constant Allegro_Event_Type := 1;
ALLEGRO_EVENT_JOYSTICK_BUTTON_DOWN : constant Allegro_Event_Type := 2;
ALLEGRO_EVENT_JOYSTICK_BUTTON_UP : constant Allegro_Event_Type := 3;
ALLEGRO_EVENT_JOYSTICK_CONFIGURATION : constant Allegro_Event_Type := 4;
ALLEGRO_EVENT_KEY_DOWN : constant Allegro_Event_Type := 10;
ALLEGRO_EVENT_KEY_CHAR : constant Allegro_Event_Type := 11;
ALLEGRO_EVENT_KEY_UP : constant Allegro_Event_Type := 12;
ALLEGRO_EVENT_MOUSE_AXES : constant Allegro_Event_Type := 20;
ALLEGRO_EVENT_MOUSE_BUTTON_DOWN : constant Allegro_Event_Type := 21;
ALLEGRO_EVENT_MOUSE_BUTTON_UP : constant Allegro_Event_Type := 22;
ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY : constant Allegro_Event_Type := 23;
ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY : constant Allegro_Event_Type := 24;
ALLEGRO_EVENT_MOUSE_WARPED : constant Allegro_Event_Type := 25;
ALLEGRO_EVENT_TIMER : constant Allegro_Event_Type := 30;
ALLEGRO_EVENT_DISPLAY_EXPOSE : constant Allegro_Event_Type := 40;
ALLEGRO_EVENT_DISPLAY_RESIZE : constant Allegro_Event_Type := 41;
ALLEGRO_EVENT_DISPLAY_CLOSE : constant Allegro_Event_Type := 42;
ALLEGRO_EVENT_DISPLAY_LOST : constant Allegro_Event_Type := 43;
ALLEGRO_EVENT_DISPLAY_FOUND : constant Allegro_Event_Type := 44;
ALLEGRO_EVENT_DISPLAY_SWITCH_IN : constant Allegro_Event_Type := 45;
ALLEGRO_EVENT_DISPLAY_SWITCH_OUT : constant Allegro_Event_Type := 46;
ALLEGRO_EVENT_DISPLAY_ORIENTATION : constant Allegro_Event_Type := 47;
function Allegro_Event_Type_Is_User
( | t | : Allegro_Event_Type ) return Boolean; |
function Allegro_Get_Event_Type
( | a, b, c, d | : Character ) return AL_ID renames Allegro_Ids.To_AL_ID; |
function Al_Create_Event_Queue return A_Allegro_Event_Queue;
procedure Al_Destroy_Event_Queue
( | queue | : in out A_Allegro_Event_Queue ); |
procedure Al_Register_Event_Source
( | queue | : A_Allegro_Event_Queue; |
source | : A_Allegro_Event_Source ); |
procedure Al_Unregister_Event_Source
( | queue | : A_Allegro_Event_Queue; |
source | : A_Allegro_Event_Source ); |
function Al_Is_Event_Queue_Empty
( | queue | : A_Allegro_Event_Queue ) return Boolean; |
function Al_Get_Next_Event
( | queue | : A_Allegro_Event_Queue; |
ret_event | : access Allegro_Event ) return Boolean; |
function Al_Peek_Next_Event
( | queue | : A_Allegro_Event_Queue; |
ret_event | : access Allegro_Event ) return Boolean; |
function Al_Drop_Next_Event
( | queue | : A_Allegro_Event_Queue ) return Boolean; |
procedure Al_Flush_Event_Queue
( | queue | : A_Allegro_Event_Queue ); |
procedure Al_Wait_For_Event
( | queue | : A_Allegro_Event_Queue; |
ret_event | : in out Allegro_Event ); |
function Al_Wait_For_Event_Timed
( | queue | : A_Allegro_Event_Queue; |
ret_event | : access Allegro_Event; | |
secs | : Float ) return Boolean; |
function Al_Wait_For_Event_Until
( | queue | : A_Allegro_Event_Queue; |
ret_event | : access Allegro_Event; | |
timeout | : Allegro_Timeout ) return Boolean; |
procedure Al_Init_User_Event_Source
( | src | : A_Allegro_Event_Source ); |
procedure Al_Destroy_User_Event_Source
( | source | : A_Allegro_Event_Source ); |
function Al_Emit_User_Event
( | src | : A_Allegro_Event_Source; |
event | : Allegro_Event; | |
destructor | : A_User_Event_Destructor ) return Boolean; |
procedure Al_Emit_User_Event
( | src | : A_Allegro_Event_Source; |
event | : Allegro_Event; | |
destructor | : A_User_Event_Destructor ); |
procedure Al_Unref_User_Event
( | event | : A_Allegro_User_Event ); |
procedure Al_Set_Event_Source_Data
( | source | : A_Allegro_Event_Source; |
data | : Address ); |
function Al_Get_Event_Source_Data
( | source | : A_Allegro_Event_Source ) return Address; |