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