1. ----------------------------------------------------------------------- 
  2. --              GtkAda - Ada95 binding for Gtk+/Gnome                -- 
  3. --                                                                   -- 
  4. --                Copyright (C) 2006-2013, AdaCore                   -- 
  5. --                                                                   -- 
  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.  -- 
  10. --                                                                   -- 
  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.                          -- 
  15. --                                                                   -- 
  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.                                       -- 
  20. --                                                                   -- 
  21. -- As a special exception, if other files instantiate generics from  -- 
  22. -- this unit, or you link this unit with other files to produce an   -- 
  23. -- executable, this  unit  does not  by itself cause  the resulting  -- 
  24. -- executable to be covered by the GNU General Public License. This  -- 
  25. -- exception does not however invalidate any other reasons why the   -- 
  26. -- executable file  might be covered by the  GNU Public License.     -- 
  27. ----------------------------------------------------------------------- 
  28.  
  29. --  <description> 
  30. --  Gtk_File_Chooser_Widget is a widget suitable for selecting files. It is the 
  31. --  main building block of a Gtk_File_Chooser_Dialog. Most applications will 
  32. --  only need to use the latter; you can use Gtk_File_Chooser_Widget as part of 
  33. --  a larger window if you have special needs. 
  34. --  </description> 
  35. --  <c_version>2.8.17</c_version> 
  36. --  <group>Selectors</group> 
  37.  
  38. with Glib.Types; 
  39. with Gtk.Box; 
  40. with Gtk.File_Chooser; 
  41.  
  42. package Gtk.File_Chooser_Widget is 
  43.  
  44.    type Gtk_File_Chooser_Widget_Record is 
  45.      new Gtk.Box.Gtk_Vbox_Record with null record; 
  46.    type Gtk_File_Chooser_Widget is 
  47.      access all Gtk_File_Chooser_Widget_Record'Class; 
  48.  
  49.    function Get_Type return GType; 
  50.    --  Return the internal value associated with a Gtk_File_Chooser_Widget 
  51.  
  52.    procedure Gtk_New 
  53.      (Widget : out Gtk_File_Chooser_Widget; 
  54.       Action : Gtk.File_Chooser.File_Chooser_Action); 
  55.    procedure Initialize 
  56.      (Widget : access Gtk_File_Chooser_Widget_Record'Class; 
  57.       Action : Gtk.File_Chooser.File_Chooser_Action); 
  58.    --  Creates a new file chooser.  This is a file chooser widget that can 
  59.    --  be embedded in custom windows, and it is the same widget that is used by 
  60.    --  Gtk_File_Chooser_Dialog. 
  61.  
  62.    procedure Gtk_New_With_Backend 
  63.      (Widget  : out Gtk_File_Chooser_Widget; 
  64.       Action  : Gtk.File_Chooser.File_Chooser_Action; 
  65.       Backend : String); 
  66.    pragma Obsolescent (Gtk_New_With_Backend); 
  67.    procedure Initialize_With_Backend 
  68.      (Widget  : access Gtk_File_Chooser_Widget_Record'Class; 
  69.       Action  : Gtk.File_Chooser.File_Chooser_Action; 
  70.       Backend : String); 
  71.    pragma Obsolescent (Initialize_With_Backend); 
  72.    --  Creates a new file chooser with a specified backend.  This is 
  73.    --  especially useful if you use Gtk.File_Chooser.Set_Local_Only to allow 
  74.    --  non-local files.  This is a file chooser widget that can be embedded in 
  75.    --  custom windows and it is the same widget that is used by 
  76.    --  Gtk_File_Chooser_Dialog. 
  77.  
  78.    ---------------- 
  79.    -- Interfaces -- 
  80.    ---------------- 
  81.    --  This class implements several interfaces. See Glib.Types 
  82.    -- 
  83.    --  - "Gtk_File_Chooser" 
  84.  
  85.    package Implements_File_Chooser is new Glib.Types.Implements 
  86.      (Gtk.File_Chooser.Gtk_File_Chooser, 
  87.       Gtk_File_Chooser_Widget_Record, Gtk_File_Chooser_Widget); 
  88.    function "+" 
  89.      (Widget : access Gtk_File_Chooser_Widget_Record'Class) 
  90.       return Gtk.File_Chooser.Gtk_File_Chooser 
  91.       renames Implements_File_Chooser.To_Interface; 
  92.    function "-" 
  93.      (File : Gtk.File_Chooser.Gtk_File_Chooser) 
  94.       return Gtk_File_Chooser_Widget 
  95.       renames Implements_File_Chooser.To_Object; 
  96.    --  Converts to and from the Gtk_File_Chooser interface 
  97.  
  98. private 
  99.    pragma Import (C, Get_Type, "gtk_file_chooser_widget_get_type"); 
  100.  
  101. end Gtk.File_Chooser_Widget;