1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --   Copyright (C) 1998-2004 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. --  This package is obsolete and replaced by Glib.Values. 
  27. --  Future versions of GtkAda will no longer provide this package. 
  28. -- 
  29. --  This package provides a convenient interface to C, providing easy 
  30. --  conversion from a C's (void*) pointer to any Ada type used in 
  31. --  GtkAda.  Although this package has been designed to be easily 
  32. --  reusable by being as general as possible, these functions are mainly 
  33. --  used when writing callbacks and/or marshallers (see Gtk.Marshallers 
  34. --  and Gtk.Handlers). 
  35. -- 
  36. --  Therefore, the main type in this package is Gtk_Args, which is the 
  37. --  equivalent of the C's (GtkArg*) array, i.e an array of unions.  This 
  38. --  package provides functions to extract the values from this type. 
  39. --  </description> 
  40. --  <c_version>2.8.17</c_version> 
  41. --  <group>Signal handling</group> 
  42.  
  43. with Glib.Values; 
  44. with Gdk.Event; 
  45. with Gtk.Object; 
  46. with Gtk.Widget; 
  47.  
  48. package Gtk.Arguments is 
  49.  
  50.    --  <doc_ignore>Do not create automatic documentation for this package 
  51.  
  52.    subtype Gtk_Args is Glib.Values.GValues; 
  53.    --  This type represents a table of arguments. Each argument of the 
  54.    --  table can be of any type. You can access them through one of the 
  55.    --  To_* functions found below. The index of the first element is 
  56.    --  always 1. 
  57.  
  58.    function Make_Args (Nb : Guint; Args : System.Address) return Gtk_Args 
  59.      renames Glib.Values.Make_Values; 
  60.    --  Build a Gtk_Args structure from the given C array. Nb should be the 
  61.    --  number of elements in the Args array. 
  62.  
  63.    --------------------------------------------------- 
  64.    -- Conversion functions, interfacing to Gtk_Args -- 
  65.    --------------------------------------------------- 
  66.  
  67.    function To_Gint    (Args : Gtk_Args; Num : Positive) return Gint; 
  68.    function To_Guint   (Args : Gtk_Args; Num : Positive) return Guint; 
  69.    function To_Boolean (Args : Gtk_Args; Num : Positive) return Boolean; 
  70.    function To_Event   (Args : Gtk_Args; Num : Positive) 
  71.      return Gdk.Event.Gdk_Event; 
  72.    function To_String  (Args : Gtk_Args; Num : Positive) return UTF8_String; 
  73.    function To_Notebook_Page 
  74.      (Args : Gtk_Args; Num : Positive) return Gtk_Notebook_Page; 
  75.    function To_Address (Args : Gtk_Args; Num : Positive) return System.Address; 
  76.    function To_C_Proxy (Args : Gtk_Args; Num : Positive) return Gdk.C_Proxy; 
  77.    function To_Object 
  78.      (Args : Gtk_Args; Num : Positive) return Gtk.Object.Gtk_Object; 
  79.    --  This function can return null, if the C object was not created. 
  80.    function To_Requisition (Args : Gtk_Args; Num : Positive) 
  81.       return Gtk.Widget.Gtk_Requisition_Access; 
  82.    function To_Allocation 
  83.      (Args : Gtk_Args; Num : Positive) return Gtk.Widget.Gtk_Allocation_Access; 
  84.  
  85. private 
  86.    pragma Inline (To_Gint); 
  87.    pragma Inline (To_Guint); 
  88.    pragma Inline (To_Boolean); 
  89.    pragma Inline (To_Object); 
  90.    pragma Inline (To_Event); 
  91.    pragma Inline (To_String); 
  92.  
  93.    --  </doc_ignore> 
  94. end Gtk.Arguments;