1. ------------------------------------------------------------------------------ 
  2. --                  GtkAda - Ada95 binding for Gtk+/Gnome                   -- 
  3. --                                                                          -- 
  4. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  5. --                     Copyright (C) 1998-2014, AdaCore                     -- 
  6. --                                                                          -- 
  7. -- This library is free software;  you can redistribute it and/or modify it -- 
  8. -- under terms of the  GNU General Public License  as published by the Free -- 
  9. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  10. -- version. This library is distributed in the hope that it will be useful, -- 
  11. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  12. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  13. --                                                                          -- 
  14. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  15. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  16. -- version 3.1, as published by the Free Software Foundation.               -- 
  17. --                                                                          -- 
  18. -- You should have received a copy of the GNU General Public License and    -- 
  19. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  20. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  21. -- <http://www.gnu.org/licenses/>.                                          -- 
  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.  
  36. pragma Warnings (Off); 
  37. with Glib.Object; use Glib.Object; 
  38. with System; 
  39. pragma Warnings (On); 
  40.  
  41. package Gtk is 
  42.  
  43.    function Major_Version return Guint; 
  44.    --  Return the major version number for Gtk+ that was linked. 
  45.    --  Note that this is not necessarily the same as for GtkAda. It could also 
  46.    --  be different when your application is running, if the dynamic linker 
  47.    --  find some other GtkAda library. Use Gtk.Main.Check_Version to ensure 
  48.    --  that the two versions are compatible 
  49.    --  If the version is 1.2.6, returns 1. 
  50.  
  51.    function Minor_Version return Guint; 
  52.    --  Return the minor version number for Gtk+. 
  53.    --  Note that this is not necessarily the same as for GtkAda. 
  54.    --  If the version is 1.2.6, returns 2. 
  55.  
  56.    function Micro_Version return Guint; 
  57.    --  Return the micro version number for Gtk+. 
  58.    --  Note that this is not necessarily the same as for GtkAda. 
  59.    --  If the version is 1.2.6, returns 6. 
  60.  
  61.    subtype Gtk_Type is Glib.GType; 
  62.    --  Renaming used for compatiblity. 
  63.    --  Note: Gtk_Type_* constants have been replaced by GType_* constants 
  64.    --  in Glib. 
  65.  
  66.    type Gtk_Notebook_Page is new Glib.C_Proxy; 
  67.    --  A page of the notebook. 
  68.    --  It can contain a single child, and is also associated with a tab 
  69.    --  label used to select that page in the notebook. 
  70.  
  71. private 
  72.  
  73.    pragma Import (C, Major_Version, "ada_gtk_major_version"); 
  74.    pragma Import (C, Minor_Version, "ada_gtk_minor_version"); 
  75.    pragma Import (C, Micro_Version, "ada_gtk_micro_version"); 
  76.  
  77. end Gtk;