1
-----------------------------------------------------------------------
2
-- GtkAda - Ada95 binding for Gtk+/Gnome --
4
-- Copyright (C) 2006-2008, AdaCore --
6
-- This library is free software; you can redistribute it and/or --
7
-- modify it under the terms of the GNU General Public --
8
-- License as published by the Free Software Foundation; either --
9
-- version 2 of the License, or (at your option) any later version. --
11
-- This library is distributed in the hope that it will be useful, --
12
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
13
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
14
-- General Public License for more details. --
16
-- You should have received a copy of the GNU General Public --
17
-- License along with this library; if not, write to the --
18
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
19
-- Boston, MA 02111-1307, USA. --
21
-----------------------------------------------------------------------
23
with Gtk.File_Chooser; use Gtk.File_Chooser;
24
with Gtk.Window; use Gtk.Window;
26
with Glib.Type_Conversion_Hooks;
28
package body Gtk.File_Chooser_Dialog is
30
package Type_Conversion is new Glib.Type_Conversion_Hooks.Hook_Registrator
31
(Get_Type'Access, Gtk_File_Chooser_Dialog_Record);
32
pragma Warnings (Off, Type_Conversion);
39
(Dialog : out Gtk_File_Chooser_Dialog;
41
Parent : access Gtk.Window.Gtk_Window_Record'Class;
42
Action : Gtk.File_Chooser.File_Chooser_Action)
45
Dialog := new Gtk_File_Chooser_Dialog_Record;
46
Initialize (Dialog, Title, Parent, Action);
54
(Dialog : access Gtk_File_Chooser_Dialog_Record'Class;
56
Parent : access Gtk.Window.Gtk_Window_Record'Class;
57
Action : Gtk.File_Chooser.File_Chooser_Action)
61
Parent : System.Address;
62
Action : File_Chooser_Action)
63
return System.Address;
64
pragma Import (C, Internal, "ada_gtk_file_chooser_dialog_new");
68
Internal (Title & ASCII.NUL, Get_Object (Parent), Action));
71
--------------------------
72
-- Gtk_New_With_Backend --
73
--------------------------
75
procedure Gtk_New_With_Backend
76
(Dialog : out Gtk_File_Chooser_Dialog;
78
Parent : access Gtk.Window.Gtk_Window_Record'Class;
79
Action : Gtk.File_Chooser.File_Chooser_Action;
83
Dialog := new Gtk_File_Chooser_Dialog_Record;
84
Initialize_With_Backend (Dialog, Title, Parent, Action, Backend);
85
end Gtk_New_With_Backend;
87
-----------------------------
88
-- Initialize_With_Backend --
89
-----------------------------
91
procedure Initialize_With_Backend
92
(Dialog : access Gtk_File_Chooser_Dialog_Record'Class;
94
Parent : access Gtk.Window.Gtk_Window_Record'Class;
95
Action : Gtk.File_Chooser.File_Chooser_Action;
100
Parent : System.Address;
101
Action : File_Chooser_Action;
103
return System.Address;
105
(C, Internal, "ada_gtk_file_chooser_dialog_new_with_backend");
109
Internal (Title & ASCII.NUL, Get_Object (Parent), Action,
110
Backend & ASCII.NUL));
111
end Initialize_With_Backend;
113
end Gtk.File_Chooser_Dialog;