Index

Package: Joystick

Description

package Allegro.Joystick is
Allegro 5.0.9 - Joystick routines

Types

Allegro_Joystick

type Allegro_Joystick is limited private;

A_Allegro_Joystick

type A_Allegro_Joystick is access all Allegro_Joystick;

Joystick_Flags

subtype Joystick_Flags is Unsigned_32;

Axis_Array

type Axis_Array is array(0..2) of Float;

Joystick_Stick

type Joystick_Stick is
        record
            axis : Axis_Array;        -- -1.0 to 1.0
        end record;

Stick_Array

type Stick_Array is array(0..7) of Joystick_Stick;

Button_Array

type Button_Array is array(0..31) of Integer;

Joystick_State

type Joystick_State is
        record
            stick  : Stick_Array;
            button : Button_Array;    -- 0 to 32767
        end record;

A_Joystick_State

type A_Joystick_State is access all Joystick_State;

Constants & Global variables

JOYFLAG_DIGITAL (Joystick_Flags)

JOYFLAG_DIGITAL  : constant Joystick_Flags := 16#01#;

JOYFLAG_ANALOGUE (Joystick_Flags)

JOYFLAG_ANALOGUE : constant Joystick_Flags := 16#02#;

Subprograms & Entries

Al_Install_Joystick

function Al_Install_Joystick return Boolean;

Al_Uninstall_Joystick

procedure Al_Uninstall_Joystick;

Al_Is_Joystick_Installed

function Al_Is_Joystick_Installed return Boolean;

Al_Reconfigure_Joysticks

function Al_Reconfigure_Joysticks return Boolean;

Al_Get_Num_Joysticks

function Al_Get_Num_Joysticks return Integer;

Al_Get_Joystick

function Al_Get_Joystick
( num: Integer ) return A_Allegro_Joystick;

Al_Release_Joystick

procedure Al_Release_Joystick
( joy: A_Allegro_Joystick );

Al_Get_Joystick_Active

function Al_Get_Joystick_Active
( joy: A_Allegro_Joystick ) return Boolean;

Al_Get_Joystick_Name

function Al_Get_Joystick_Name
( joy: A_Allegro_Joystick ) return String;

Al_Get_Joystick_Num_Sticks

function Al_Get_Joystick_Num_Sticks
( joy: A_Allegro_Joystick ) return Integer;

Al_Get_Joystick_Stick_Flags

function Al_Get_Joystick_Stick_Flags
( joy: A_Allegro_Joystick;
stick: Integer ) return Joystick_Flags;

Al_Get_Joystick_Stick_Name

function Al_Get_Joystick_Stick_Name
( joy: A_Allegro_Joystick;
stick: Integer ) return String;

Al_Get_Joystick_Num_Axes

function Al_Get_Joystick_Num_Axes
( joy: A_Allegro_Joystick;
stick: Integer ) return Integer;

Al_Get_Joystick_Axis_Name

function Al_Get_Joystick_Axis_Name
( joy: A_Allegro_Joystick;
stick: Integer;
axis: Integer ) return String;

Al_Get_Joystick_Num_Buttons

function Al_Get_Joystick_Num_Buttons
( joy: A_Allegro_Joystick ) return Integer;

Al_Get_Joystick_Button_Name

function Al_Get_Joystick_Button_Name
( joy: A_Allegro_Joystick;
button: Integer ) return String;

Al_Get_Joystick_State

procedure Al_Get_Joystick_State
( joy: A_Allegro_Joystick;
ret_state: A_Joystick_State );

Al_Get_Joystick_Event_Source

function Al_Get_Joystick_Event_Source return A_Allegro_Event_Source;