1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  A Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor is a spot in the buffer 
  26. --  where child widgets can be "anchored" (inserted inline, as if they were 
  27. --  characters). The anchor can have multiple widgets anchored, to allow for 
  28. --  multiple views. 
  29. -- 
  30. --  </description> 
  31. pragma Ada_2005; 
  32.  
  33. pragma Warnings (Off, "*is already use-visible*"); 
  34. with Glib;        use Glib; 
  35. with Glib.Object; use Glib.Object; 
  36. with Gtk.Widget;  use Gtk.Widget; 
  37.  
  38. package Gtk.Text_Child_Anchor is 
  39.  
  40.    type Gtk_Text_Child_Anchor_Record is new GObject_Record with null record; 
  41.    type Gtk_Text_Child_Anchor is access all Gtk_Text_Child_Anchor_Record'Class; 
  42.  
  43.    ------------------ 
  44.    -- Constructors -- 
  45.    ------------------ 
  46.  
  47.    procedure Gtk_New (Anchor : out Gtk_Text_Child_Anchor); 
  48.    procedure Initialize 
  49.       (Anchor : not null access Gtk_Text_Child_Anchor_Record'Class); 
  50.    --  Creates a new Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor. Usually you 
  51.    --  would then insert it into a Gtk.Text_Buffer.Gtk_Text_Buffer with 
  52.    --  Gtk.Text_Buffer.Insert_Child_Anchor. To perform the creation and 
  53.    --  insertion in one step, use the convenience function 
  54.    --  Gtk.Text_Buffer.Create_Child_Anchor. 
  55.  
  56.    function Gtk_Text_Child_Anchor_New return Gtk_Text_Child_Anchor; 
  57.    --  Creates a new Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor. Usually you 
  58.    --  would then insert it into a Gtk.Text_Buffer.Gtk_Text_Buffer with 
  59.    --  Gtk.Text_Buffer.Insert_Child_Anchor. To perform the creation and 
  60.    --  insertion in one step, use the convenience function 
  61.    --  Gtk.Text_Buffer.Create_Child_Anchor. 
  62.  
  63.    function Get_Type return Glib.GType; 
  64.    pragma Import (C, Get_Type, "gtk_text_child_anchor_get_type"); 
  65.  
  66.    ------------- 
  67.    -- Methods -- 
  68.    ------------- 
  69.  
  70.    function Get_Deleted 
  71.       (Anchor : not null access Gtk_Text_Child_Anchor_Record) return Boolean; 
  72.    --  Determines whether a child anchor has been deleted from the buffer. 
  73.    --  Keep in mind that the child anchor will be unreferenced when removed 
  74.    --  from the buffer, so you need to hold your own reference (with 
  75.    --  g_object_ref) if you plan to use this function &mdash; otherwise all 
  76.    --  deleted child anchors will also be finalized. 
  77.  
  78.    function Get_Widgets 
  79.       (Anchor : not null access Gtk_Text_Child_Anchor_Record) 
  80.        return Gtk.Widget.Widget_SList.GSlist; 
  81.    --  Gets a list of all widgets anchored at this child anchor. The returned 
  82.    --  list should be freed with g_list_free. 
  83.  
  84. end Gtk.Text_Child_Anchor;