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