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-2006 AdaCore                    -- 
  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. --  <description> 
  26. -- 
  27. --  This package provides some basic Gtk+ functionalities such as getting the 
  28. --  version number.  For general GtkAda initializations, 
  29. --  see Gtk.Main. 
  30. -- 
  31. --  </description> 
  32. --  <c_version>2.8.17</c_version> 
  33.  
  34. with Glib;        use Glib; 
  35. with Gdk;         use Gdk; 
  36.  
  37. pragma Warnings (Off); 
  38. with Glib.Object; use Glib.Object; 
  39. with System; 
  40. pragma Warnings (On); 
  41.  
  42. package Gtk is 
  43.  
  44.    function Major_Version return Guint; 
  45.    --  Return the major version number for Gtk+ that was linked. 
  46.    --  Note that this is not necessarily the same as for GtkAda. It could also 
  47.    --  be different when your application is running, if the dynamic linker 
  48.    --  find some other GtkAda library. Use Gtk.Main.Check_Version to ensure 
  49.    --  that the two versions are compatible 
  50.    --  If the version is 1.2.6, returns 1. 
  51.  
  52.    function Minor_Version return Guint; 
  53.    --  Return the minor version number for Gtk+. 
  54.    --  Note that this is not necessarily the same as for GtkAda. 
  55.    --  If the version is 1.2.6, returns 2. 
  56.  
  57.    function Micro_Version return Guint; 
  58.    --  Return the micro version number for Gtk+. 
  59.    --  Note that this is not necessarily the same as for GtkAda. 
  60.    --  If the version is 1.2.6, returns 6. 
  61.  
  62.    subtype Gtk_Type is Glib.GType; 
  63.    --  Renaming used for compatiblity. 
  64.    --  Note: Gtk_Type_* constants have been replaced by GType_* constants 
  65.    --  in Glib. 
  66.  
  67.    type Gtk_Notebook_Page is new Gdk.C_Proxy; 
  68.    --  A page of the notebook. 
  69.    --  It can contain a single child, and is also associated with a tab 
  70.    --  label used to select that page in the notebook. 
  71.  
  72. private 
  73.  
  74.    pragma Import (C, Major_Version, "ada_gtk_major_version"); 
  75.    pragma Import (C, Minor_Version, "ada_gtk_minor_version"); 
  76.    pragma Import (C, Micro_Version, "ada_gtk_micro_version"); 
  77.  
  78. end Gtk;