with Allegro.Displays; use Allegro.Displays;
with Allegro.Events; use Allegro.Events;
with Interfaces; use Interfaces;
package Allegro.Native_Dialogs is
function Al_Init_Native_Dialog_Addon return Boolean;
procedure Al_Shutdown_Native_Dialog_Addon;
pragma Import( C, Al_Shutdown_Native_Dialog_Addon, "al_shutdown_native_dialog_addon" );
function Al_Get_Allegro_Native_Dialog_Version return Unsigned_32;
pragma Import( C, Al_Get_Allegro_Native_Dialog_Version, "al_get_allegro_native_dialog_version" );
type Allegro_Filechooser is limited private;
type A_Allegro_Filechooser is access all Allegro_Filechooser;
type Filechooser_Flags is new Unsigned_32;
ALLEGRO_FILECHOOSER_NONE : constant Filechooser_Flags := 0;
ALLEGRO_FILECHOOSER_FILE_MUST_EXIST : constant Filechooser_Flags := 1;
ALLEGRO_FILECHOOSER_SAVE : constant Filechooser_Flags := 2;
ALLEGRO_FILECHOOSER_FOLDER : constant Filechooser_Flags := 4;
ALLEGRO_FILECHOOSER_PICTURES : constant Filechooser_Flags := 8;
ALLEGRO_FILECHOOSER_SHOW_HIDDEN : constant Filechooser_Flags := 16;
ALLEGRO_FILECHOOSER_MULTIPLE : constant Filechooser_Flags := 32;
function Al_Create_Native_File_Dialog( initial_path : String;
title : String;
patterns : String;
mode : Filechooser_Flags
) return A_Allegro_Filechooser;
function Al_Show_Native_File_Dialog( display : A_Allegro_Display;
dialog : A_Allegro_Filechooser ) return Boolean;
function Al_Get_Native_File_Dialog_Count( dialog : A_Allegro_Filechooser ) return Integer;
pragma Import( C, Al_Get_Native_File_Dialog_Count, "al_get_native_file_dialog_count" );
function Al_Get_Native_File_Dialog_Path( dialog : A_Allegro_Filechooser;
index : Natural ) return String;
procedure Al_Destroy_Native_File_Dialog( dialog : in out A_Allegro_Filechooser );
type Messagebox_Flags is new Unsigned_32;
ALLEGRO_MESSAGEBOX_WARN : constant Messagebox_Flags := 1;
ALLEGRO_MESSAGEBOX_ERROR : constant Messagebox_Flags := 2;
ALLEGRO_MESSAGEBOX_OK_CANCEL : constant Messagebox_Flags := 4;
ALLEGRO_MESSAGEBOX_YES_NO : constant Messagebox_Flags := 8;
ALLEGRO_MESSAGEBOX_QUESTION : constant Messagebox_Flags := 16;
function Al_Show_Native_Message_Box( display : A_Allegro_Display;
title : String;
heading : String;
text : String;
buttons : String;
flags : Messagebox_Flags ) return Integer;
type Allegro_Textlog is limited private;
type A_Allegro_Textlog is access all Allegro_Textlog;
type Textlog_Flags is new Unsigned_32;
ALLEGRO_TEXTLOG_NO_CLOSE : constant Textlog_Flags := 1;
ALLEGRO_TEXTLOG_MONOSPACE : constant Textlog_Flags := 2;
function Al_Open_Native_Text_Log( title : String; flags : Textlog_Flags ) return A_Allegro_Textlog;
procedure Al_Close_Native_Text_Log( textlog : in out A_Allegro_Textlog );
procedure Al_Append_Native_Text_Log( textlog : A_Allegro_Textlog; str : String );
function Al_Get_Native_Text_Log_Event_Source( textlog : A_Allegro_Textlog ) return A_Allegro_Event_Source;
pragma Import( C, Al_Get_Native_Text_Log_Event_Source, "al_get_native_text_log_event_source" );
ALLEGRO_EVENT_NATIVE_DIALOG_CLOSE : constant Allegro_Event_Type := 600;
private
type Allegro_Filechooser is limited null record;
pragma Convention( C, Allegro_Filechooser );
type Allegro_Textlog is limited null record;
pragma Convention( C, Allegro_Textlog );
end Allegro.Native_Dialogs;