1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   -- 
  5. --                Copyright (C) 2000-2002 ACT-Europe                 -- 
  6. --                                                                   -- 
  7. -- This library is free software; you can redistribute it and/or     -- 
  8. -- modify it under the terms of the GNU General Public               -- 
  9. -- License as published by the Free Software Foundation; either      -- 
  10. -- version 2 of the License, or (at your option) any later version.  -- 
  11. --                                                                   -- 
  12. -- This library is distributed in the hope that it will be useful,   -- 
  13. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  14. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  15. -- General Public License for more details.                          -- 
  16. --                                                                   -- 
  17. -- You should have received a copy of the GNU General Public         -- 
  18. -- License along with this library; if not, write to the             -- 
  19. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  20. -- Boston, MA 02111-1307, USA.                                       -- 
  21. --                                                                   -- 
  22. -- -- -- -- -- -- -- -- -- -- -- --
  23. ----------------------------------------------------------------------- 
  24.  
  25. --  <c_version>1.3.6</c_version> 
  26. --  <group>Gdk, the low-level API</group> 
  27.  
  28. with Glib; use Glib; 
  29. with Glib.Glist; 
  30. pragma Elaborate_All (Glib.Glist); 
  31.  
  32. with System; 
  33. with Unchecked_Conversion; 
  34.  
  35. package Gdk.Visual is 
  36.  
  37.    subtype Gdk_Visual is Gdk.Gdk_Visual; 
  38.    Null_Visual : constant Gdk_Visual; 
  39.    --  This type is not private because we need the full declaration 
  40.    --  to instanciate Glib.Glist.Generic_List with it. 
  41.  
  42.    type Gdk_Visual_Type is 
  43.      (Visual_Static_Gray, 
  44.       Visual_Grayscale, 
  45.       Visual_Static_Color, 
  46.       Visual_Pseudo_Color, 
  47.       Visual_True_Color, 
  48.       Visual_Direct_Color); 
  49.    pragma Convention (C, Gdk_Visual_Type); 
  50.  
  51.    type Gdk_Visual_Type_Array is array (Natural range <>) of Gdk_Visual_Type; 
  52.  
  53.    function Get_Type return Glib.GType; 
  54.    --  Return the internal value associated with Gdk_Visual. 
  55.  
  56.    function Get_Best_Depth return Gint; 
  57.  
  58.    function Get_Best_Type return Gdk_Visual_Type; 
  59.  
  60.    function Get_System return Gdk_Visual; 
  61.  
  62.    function Get_Best return Gdk_Visual; 
  63.  
  64.    procedure Get_Best (Visual : out Gdk_Visual); 
  65.  
  66.    function Get_Best (Depth  : Gint) return Gdk_Visual; 
  67.  
  68.    function Get_Best (Visual_Type : Gdk_Visual_Type) return Gdk_Visual; 
  69.  
  70.    function Get_Best 
  71.      (Depth       : Gint; 
  72.       Visual_Type : Gdk_Visual_Type) return Gdk_Visual; 
  73.  
  74.    function Query_Depths return Gint_Array; 
  75.  
  76.    function Query_Visual_Types return Gdk_Visual_Type_Array; 
  77.  
  78.    function Convert is new Unchecked_Conversion (Gdk_Visual, System.Address); 
  79.    function Convert is new Unchecked_Conversion (System.Address, Gdk_Visual); 
  80.  
  81.    package Gdk_Visual_List is new Glib.Glist.Generic_List (Gdk_Visual); 
  82.  
  83.    function List_Visuals return Gdk_Visual_List.Glist; 
  84.  
  85. private 
  86.    Null_Visual : constant Gdk_Visual := null; 
  87.    pragma Import (C, Get_Type, "gdk_visual_get_type"); 
  88.    pragma Import (C, Get_Best_Depth, "gdk_visual_get_best_depth"); 
  89.    pragma Import (C, Get_Best_Type, "gdk_visual_get_best_type"); 
  90.    pragma Import (C, Get_System, "gdk_visual_get_system"); 
  91.  
  92. end Gdk.Visual;