1. ----------------------------------------------------------------------- 
  2. --          GtkAda - Ada95 binding for the Gimp Toolkit              -- 
  3. --                                                                   -- 
  4. --                     Copyright (C) 1998-1999                       -- 
  5. --        Emmanuel Briot, Joel Brobecker and Arnaud Charlet          -- 
  6. --                     Copyright 2000-2007 AdaCore                   -- 
  7. --                                                                   -- 
  8. -- This library is free software; you can redistribute it and/or     -- 
  9. -- modify it under the terms of the GNU General Public               -- 
  10. -- License as published by the Free Software Foundation; either      -- 
  11. -- version 2 of the License, or (at your option) any later version.  -- 
  12. --                                                                   -- 
  13. -- This library is distributed in the hope that it will be useful,   -- 
  14. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  15. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  16. -- General Public License for more details.                          -- 
  17. --                                                                   -- 
  18. -- You should have received a copy of the GNU General Public         -- 
  19. -- License along with this library; if not, write to the             -- 
  20. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  21. -- Boston, MA 02111-1307, USA.                                       -- 
  22. --                                                                   -- 
  23. -- As a special exception, if other files instantiate generics from  -- 
  24. -- this unit, or you link this unit with other files to produce an   -- 
  25. -- executable, this  unit  does not  by itself cause  the resulting  -- 
  26. -- executable to be covered by the GNU General Public License. This  -- 
  27. -- exception does not however invalidate any other reasons why the   -- 
  28. -- executable file  might be covered by the  GNU Public License.     -- 
  29. ----------------------------------------------------------------------- 
  30.  
  31. --  <c_version>2.8.17</c_version> 
  32. --  <doc_ignore> 
  33. --  <group>Obsolescent widgets</group> 
  34. --  <testgtk>create_list.adb</testgtk> 
  35.  
  36. with Gtk.Container; 
  37. with Gtk.Enums;  use Gtk.Enums; 
  38. with Gtk.Widget; use Gtk.Widget; 
  39.  
  40. package Gtk.List is 
  41.    pragma Obsolescent;  --  Gtk.List 
  42.  
  43.    type Gtk_List_Record is new Gtk.Container.Gtk_Container_Record with private; 
  44.    type Gtk_List is access all Gtk_List_Record'Class; 
  45.  
  46.    function Get_Type return Gtk.Gtk_Type; 
  47.    --  Return the internal value associated with a Gtk_List. 
  48.  
  49.    procedure Append_Items 
  50.      (List  : access Gtk_List_Record; 
  51.       Items : in Widget_List.Glist); 
  52.  
  53.    function Child_Position 
  54.      (List   : access Gtk_List_Record; 
  55.       Child  : in Gtk.Widget.Gtk_Widget) return Gint; 
  56.  
  57.    procedure Clear_Items 
  58.      (List    : access Gtk_List_Record; 
  59.       Start   : in Gint; 
  60.       The_End : in Gint); 
  61.    --  Remove some items from the list. 
  62.    --  if The_End is negative, it is assigned the position of the last item 
  63.    --  in the list. 
  64.    --  The first item in the list has an index of 0. 
  65.  
  66.    function Get_Children 
  67.      (Widget : access Gtk.List.Gtk_List_Record) return Widget_List.Glist; 
  68.    --  The returned list mustn't be freed by the caller, it references internal 
  69.    --  data of gtk+ 
  70.  
  71.    function Get_Selection 
  72.      (Widget : access Gtk.List.Gtk_List_Record) return Widget_List.Glist; 
  73.  
  74.    procedure Gtk_New (Widget : out Gtk_List); 
  75.  
  76.    procedure Initialize (Widget : access Gtk_List_Record'Class); 
  77.  
  78.    procedure Insert_Items 
  79.      (List     : access Gtk_List_Record; 
  80.       Items    : in Widget_List.Glist; 
  81.       Position : in Gint); 
  82.  
  83.    procedure Prepend_Items 
  84.      (List  : access Gtk_List_Record; 
  85.       Items : in Widget_List.Glist); 
  86.  
  87.    procedure Remove_Items 
  88.      (List  : access Gtk_List_Record; 
  89.       Items : in Widget_List.Glist); 
  90.  
  91.    procedure Remove_Items_No_Unref 
  92.      (List  : access Gtk_List_Record; 
  93.       Items : in Widget_List.Glist); 
  94.  
  95.    procedure Select_Child 
  96.      (List  : access Gtk_List_Record; 
  97.       Child : in Gtk.Widget.Gtk_Widget); 
  98.  
  99.    procedure Select_Item 
  100.      (List : access Gtk_List_Record; 
  101.       Item : in Gint); 
  102.  
  103.    procedure Set_Selection_Mode 
  104.      (List : access Gtk_List_Record; 
  105.       Mode : in Gtk_Selection_Mode); 
  106.  
  107.    procedure Unselect_Child 
  108.      (List  : access Gtk_List_Record; 
  109.       Child : in Gtk.Widget.Gtk_Widget); 
  110.  
  111.    procedure Unselect_Item 
  112.      (List : access Gtk_List_Record; 
  113.       Item : in Gint); 
  114.  
  115.    ---------------- 
  116.    -- Properties -- 
  117.    ---------------- 
  118.  
  119.    --  <properties> 
  120.    --  The following properties are defined for this widget. See 
  121.    --  Glib.Properties for more information on properties. 
  122.    -- 
  123.    --  </properties> 
  124.  
  125.    ------------- 
  126.    -- Signals -- 
  127.    ------------- 
  128.  
  129.    --  <signals> 
  130.    --  The following new signals are defined for this widget: 
  131.    -- 
  132.    --  - "select_child" 
  133.    --  - "selection_changed" 
  134.    --  - "unselect_child" 
  135.    -- 
  136.    --  </signals> 
  137.  
  138.    Signal_Select_Child      : constant Glib.Signal_Name := "select_child"; 
  139.    Signal_Selection_Changed : constant Glib.Signal_Name := "selection_changed"; 
  140.    Signal_Unselect_Child    : constant Glib.Signal_Name := "unselect_child"; 
  141.  
  142. private 
  143.    type Gtk_List_Record is new Gtk.Container.Gtk_Container_Record 
  144.      with null record; 
  145.  
  146.    pragma Import (C, Get_Type, "gtk_list_get_type"); 
  147. end Gtk.List; 
  148.  
  149. --  </doc_ignore> 
  150.  
  151. --  These subprograms have never been bound, and the whole package is now 
  152. --  obsolescent anyway 
  153. --  No binding: gtk_list_end_drag_selection 
  154. --  No binding: gtk_list_end_selection 
  155. --  No binding: gtk_list_extend_selection 
  156. --  No binding: gtk_list_scroll_horizontal 
  157. --  No binding: gtk_list_scroll_vertical 
  158. --  No binding: gtk_list_select_all 
  159. --  No binding: gtk_list_start_selection 
  160. --  No binding: gtk_list_toggle_add_mode 
  161. --  No binding: gtk_list_toggle_focus_row 
  162. --  No binding: gtk_list_toggle_row 
  163. --  No binding: gtk_list_undo_selection 
  164. --  No binding: gtk_list_unselect_all