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. --  You may wish to begin by reading the <link linkend="TextWidget">text 
  26. --  widget conceptual overview</link> which gives an overview of all the 
  27. --  objects and data types related to the text widget and how they work 
  28. --  together. 
  29. -- 
  30. --  </description> 
  31. pragma Ada_2005; 
  32.  
  33. pragma Warnings (Off, "*is already use-visible*"); 
  34. with Gdk.Pixbuf;              use Gdk.Pixbuf; 
  35. with Glib;                    use Glib; 
  36. with Glib.Generic_Properties; use Glib.Generic_Properties; 
  37. with Glib.Object;             use Glib.Object; 
  38. with Glib.Values;             use Glib.Values; 
  39. with Gtk.Text_Attributes;     use Gtk.Text_Attributes; 
  40. with Gtk.Text_Tag;            use Gtk.Text_Tag; 
  41. with Interfaces.C.Strings;    use Interfaces.C.Strings; 
  42. with Pango.Language;          use Pango.Language; 
  43.  
  44. package Gtk.Text_Iter is 
  45.  
  46.    type Gtk_Text_Search_Flags is mod 2 ** Integer'Size; 
  47.    pragma Convention (C, Gtk_Text_Search_Flags); 
  48.  
  49.  
  50.    Visible_Only : constant Gtk_Text_Search_Flags := 1; 
  51.    Text_Only : constant Gtk_Text_Search_Flags := 2; 
  52.    Case_Insensitive : constant Gtk_Text_Search_Flags := 4; 
  53.  
  54.    type Gtk_Text_Iter is private; 
  55.    function From_Object_Free (B : access Gtk_Text_Iter) return Gtk_Text_Iter; 
  56.    pragma Inline (From_Object_Free); 
  57.    --  You may wish to begin by reading the <link linkend="TextWidget">text 
  58.    --  widget conceptual overview</link> which gives an overview of all the 
  59.    --  objects and data types related to the text widget and how they work 
  60.    --  together. 
  61.  
  62.    Null_Text_Iter : constant Gtk_Text_Iter; 
  63.  
  64.    ---------------------------- 
  65.    -- Enumeration Properties -- 
  66.    ---------------------------- 
  67.  
  68.    package Gtk_Text_Search_Flags_Properties is 
  69.       new Generic_Internal_Discrete_Property (Gtk_Text_Search_Flags); 
  70.    type Property_Gtk_Text_Search_Flags is new Gtk_Text_Search_Flags_Properties.Property; 
  71.  
  72.    ------------------ 
  73.    -- Constructors -- 
  74.    ------------------ 
  75.  
  76.    function Get_Type return Glib.GType; 
  77.    pragma Import (C, Get_Type, "gtk_text_iter_get_type"); 
  78.  
  79.    ------------- 
  80.    -- Methods -- 
  81.    ------------- 
  82.  
  83.    procedure Assign (Iter : Gtk_Text_Iter; Other : Gtk_Text_Iter); 
  84.    pragma Import (C, Assign, "gtk_text_iter_assign"); 
  85.    --  Assigns the value of Other to Iter. This function is not useful in 
  86.    --  applications, because iterators can be assigned with 'GtkTextIter i = 
  87.    --  j;'. The function is used by language bindings. 
  88.    --  Since: gtk+ 3.2 
  89.    --  "other": another Gtk.Text_Iter.Gtk_Text_Iter 
  90.  
  91.    procedure Backward_Char 
  92.       (Iter   : in out Gtk_Text_Iter; 
  93.        Result : out Boolean); 
  94.    --  Moves backward by one character offset. Returns True if movement was 
  95.    --  possible; if Iter was the first in the buffer (character offset 0), 
  96.    --  gtk_text_iter_backward_char () returns False for convenience when 
  97.    --  writing loops. 
  98.  
  99.    procedure Backward_Chars 
  100.       (Iter   : in out Gtk_Text_Iter; 
  101.        Count  : Gint; 
  102.        Result : out Boolean); 
  103.    --  Moves Count characters backward, if possible (if Count would move past 
  104.    --  the start or end of the buffer, moves to the start or end of the 
  105.    --  buffer). The return value indicates whether the iterator moved onto a 
  106.    --  dereferenceable position; if the iterator didn't move, or moved onto the 
  107.    --  end iterator, then False is returned. If Count is 0, the function does 
  108.    --  nothing and returns False. 
  109.    --  "count": number of characters to move 
  110.  
  111.    procedure Backward_Cursor_Position 
  112.       (Iter   : in out Gtk_Text_Iter; 
  113.        Result : out Boolean); 
  114.    --  Like Gtk.Text_Iter.Forward_Cursor_Position, but moves backward. 
  115.  
  116.    procedure Backward_Cursor_Positions 
  117.       (Iter   : in out Gtk_Text_Iter; 
  118.        Count  : Gint; 
  119.        Result : out Boolean); 
  120.    --  Moves up to Count cursor positions. See 
  121.    --  Gtk.Text_Iter.Forward_Cursor_Position for details. 
  122.    --  "count": number of positions to move 
  123.  
  124.    procedure Backward_Line 
  125.       (Iter   : in out Gtk_Text_Iter; 
  126.        Result : out Boolean); 
  127.    --  Moves Iter to the start of the previous line. Returns True if Iter 
  128.    --  could be moved; i.e. if Iter was at character offset 0, this function 
  129.    --  returns False. Therefore if Iter was already on line 0, but not at the 
  130.    --  start of the line, Iter is snapped to the start of the line and the 
  131.    --  function returns True. (Note that this implies that in a loop calling 
  132.    --  this function, the line number may not change on every iteration, if 
  133.    --  your first iteration is on line 0.) 
  134.  
  135.    procedure Backward_Lines 
  136.       (Iter   : in out Gtk_Text_Iter; 
  137.        Count  : Gint; 
  138.        Result : out Boolean); 
  139.    --  Moves Count lines backward, if possible (if Count would move past the 
  140.    --  start or end of the buffer, moves to the start or end of the buffer). 
  141.    --  The return value indicates whether the iterator moved onto a 
  142.    --  dereferenceable position; if the iterator didn't move, or moved onto the 
  143.    --  end iterator, then False is returned. If Count is 0, the function does 
  144.    --  nothing and returns False. If Count is negative, moves forward by 0 - 
  145.    --  Count lines. 
  146.    --  "count": number of lines to move backward 
  147.  
  148.    procedure Backward_Search 
  149.       (Iter        : in out Gtk_Text_Iter; 
  150.        Str         : UTF8_String; 
  151.        Flags       : Gtk_Text_Search_Flags; 
  152.        Match_Start : out Gtk_Text_Iter; 
  153.        Match_End   : out Gtk_Text_Iter; 
  154.        Limit       : Gtk_Text_Iter := Null_Text_Iter; 
  155.        Result      : out Boolean); 
  156.    --  Same as Gtk.Text_Iter.Forward_Search, but moves backward. 
  157.    --  "str": search string 
  158.    --  "flags": bitmask of flags affecting the search 
  159.    --  "match_start": return location for start of match, or null 
  160.    --  "match_end": return location for end of match, or null 
  161.    --  "limit": location of last possible Match_Start, or null for start of 
  162.    --  buffer 
  163.  
  164.    procedure Backward_Sentence_Start 
  165.       (Iter   : in out Gtk_Text_Iter; 
  166.        Result : out Boolean); 
  167.    --  Moves backward to the previous sentence start; if Iter is already at 
  168.    --  the start of a sentence, moves backward to the next one. Sentence 
  169.    --  boundaries are determined by Pango and should be correct for nearly any 
  170.    --  language (if not, the correct fix would be to the Pango text boundary 
  171.    --  algorithms). 
  172.  
  173.    procedure Backward_Sentence_Starts 
  174.       (Iter   : in out Gtk_Text_Iter; 
  175.        Count  : Gint; 
  176.        Result : out Boolean); 
  177.    --  Calls Gtk.Text_Iter.Backward_Sentence_Start up to Count times, or until 
  178.    --  it returns False. If Count is negative, moves forward instead of 
  179.    --  backward. 
  180.    --  "count": number of sentences to move 
  181.  
  182.    procedure Backward_To_Tag_Toggle 
  183.       (Iter   : in out Gtk_Text_Iter; 
  184.        Tag    : Gtk.Text_Tag.Gtk_Text_Tag := null; 
  185.        Result : out Boolean); 
  186.    --  Moves backward to the next toggle (on or off) of the 
  187.    --  Gtk.Text_Tag.Gtk_Text_Tag Tag, or to the next toggle of any tag if Tag 
  188.    --  is null. If no matching tag toggles are found, returns False, otherwise 
  189.    --  True. Does not return toggles located at Iter, only toggles before Iter. 
  190.    --  Sets Iter to the location of the toggle, or the start of the buffer if 
  191.    --  no toggle is found. 
  192.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag, or null 
  193.  
  194.    procedure Backward_Visible_Cursor_Position 
  195.       (Iter   : in out Gtk_Text_Iter; 
  196.        Result : out Boolean); 
  197.    --  Moves Iter forward to the previous visible cursor position. See 
  198.    --  Gtk.Text_Iter.Backward_Cursor_Position for details. 
  199.    --  Since: gtk+ 2.4 
  200.  
  201.    procedure Backward_Visible_Cursor_Positions 
  202.       (Iter   : in out Gtk_Text_Iter; 
  203.        Count  : Gint; 
  204.        Result : out Boolean); 
  205.    --  Moves up to Count visible cursor positions. See 
  206.    --  Gtk.Text_Iter.Backward_Cursor_Position for details. 
  207.    --  Since: gtk+ 2.4 
  208.    --  "count": number of positions to move 
  209.  
  210.    procedure Backward_Visible_Line 
  211.       (Iter   : in out Gtk_Text_Iter; 
  212.        Result : out Boolean); 
  213.    --  Moves Iter to the start of the previous visible line. Returns True if 
  214.    --  Iter could be moved; i.e. if Iter was at character offset 0, this 
  215.    --  function returns False. Therefore if Iter was already on line 0, but not 
  216.    --  at the start of the line, Iter is snapped to the start of the line and 
  217.    --  the function returns True. (Note that this implies that in a loop 
  218.    --  calling this function, the line number may not change on every 
  219.    --  iteration, if your first iteration is on line 0.) 
  220.    --  Since: gtk+ 2.8 
  221.  
  222.    procedure Backward_Visible_Lines 
  223.       (Iter   : in out Gtk_Text_Iter; 
  224.        Count  : Gint; 
  225.        Result : out Boolean); 
  226.    --  Moves Count visible lines backward, if possible (if Count would move 
  227.    --  past the start or end of the buffer, moves to the start or end of the 
  228.    --  buffer). The return value indicates whether the iterator moved onto a 
  229.    --  dereferenceable position; if the iterator didn't move, or moved onto the 
  230.    --  end iterator, then False is returned. If Count is 0, the function does 
  231.    --  nothing and returns False. If Count is negative, moves forward by 0 - 
  232.    --  Count lines. 
  233.    --  Since: gtk+ 2.8 
  234.    --  "count": number of lines to move backward 
  235.  
  236.    procedure Backward_Visible_Word_Start 
  237.       (Iter   : in out Gtk_Text_Iter; 
  238.        Result : out Boolean); 
  239.    --  Moves backward to the previous visible word start. (If Iter is 
  240.    --  currently on a word start, moves backward to the next one after that.) 
  241.    --  Word breaks are determined by Pango and should be correct for nearly any 
  242.    --  language (if not, the correct fix would be to the Pango word break 
  243.    --  algorithms). 
  244.    --  Since: gtk+ 2.4 
  245.  
  246.    procedure Backward_Visible_Word_Starts 
  247.       (Iter   : in out Gtk_Text_Iter; 
  248.        Count  : Gint; 
  249.        Result : out Boolean); 
  250.    --  Calls Gtk.Text_Iter.Backward_Visible_Word_Start up to Count times. 
  251.    --  Since: gtk+ 2.4 
  252.    --  "count": number of times to move 
  253.  
  254.    procedure Backward_Word_Start 
  255.       (Iter   : in out Gtk_Text_Iter; 
  256.        Result : out Boolean); 
  257.    --  Moves backward to the previous word start. (If Iter is currently on a 
  258.    --  word start, moves backward to the next one after that.) Word breaks are 
  259.    --  determined by Pango and should be correct for nearly any language (if 
  260.    --  not, the correct fix would be to the Pango word break algorithms). 
  261.  
  262.    procedure Backward_Word_Starts 
  263.       (Iter   : in out Gtk_Text_Iter; 
  264.        Count  : Gint; 
  265.        Result : out Boolean); 
  266.    --  Calls Gtk.Text_Iter.Backward_Word_Start up to Count times. 
  267.    --  "count": number of times to move 
  268.  
  269.    function Begins_Tag 
  270.       (Iter : Gtk_Text_Iter; 
  271.        Tag  : access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class) return Boolean; 
  272.    --  Returns True if Tag is toggled on at exactly this point. If Tag is 
  273.    --  null, returns True if any tag is toggled on at this point. Note that the 
  274.    --  gtk_text_iter_begins_tag () returns True if Iter is the *start* of the 
  275.    --  tagged range; gtk_text_iter_has_tag () tells you whether an iterator is 
  276.    --  *within* a tagged range. 
  277.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag, or null 
  278.  
  279.    function Can_Insert 
  280.       (Iter                : Gtk_Text_Iter; 
  281.        Default_Editability : Boolean) return Boolean; 
  282.    --  Considering the default editability of the buffer, and tags that affect 
  283.    --  editability, determines whether text inserted at Iter would be editable. 
  284.    --  If text inserted at Iter would be editable then the user should be 
  285.    --  allowed to insert text at Iter. Gtk.Text_Buffer.Insert_Interactive uses 
  286.    --  this function to decide whether insertions are allowed at a given 
  287.    --  position. 
  288.    --  "default_editability": True if text is editable by default 
  289.  
  290.    function Compare (Iter : Gtk_Text_Iter; Rhs : Gtk_Text_Iter) return Gint; 
  291.    pragma Import (C, Compare, "gtk_text_iter_compare"); 
  292.    --  A qsort-style function that returns negative if Lhs is less than Rhs, 
  293.    --  positive if Lhs is greater than Rhs, and 0 if they're equal. Ordering is 
  294.    --  in character offset order, i.e. the first character in the buffer is 
  295.    --  less than the second character in the buffer. 
  296.    --  "rhs": another Gtk.Text_Iter.Gtk_Text_Iter 
  297.  
  298.    function Editable 
  299.       (Iter            : Gtk_Text_Iter; 
  300.        Default_Setting : Boolean) return Boolean; 
  301.    --  Returns whether the character at Iter is within an editable region of 
  302.    --  text. Non-editable text is "locked" and can't be changed by the user via 
  303.    --  Gtk.Text_View.Gtk_Text_View. This function is simply a convenience 
  304.    --  wrapper around gtk_text_iter_get_attributes (). If no tags applied to 
  305.    --  this text affect editability, Default_Setting will be returned. 
  306.    --  You don't want to use this function to decide whether text can be 
  307.    --  inserted at Iter, because for insertion you don't want to know whether 
  308.    --  the char at Iter is inside an editable range, you want to know whether a 
  309.    --  new character inserted at Iter would be inside an editable range. Use 
  310.    --  Gtk.Text_Iter.Can_Insert to handle this case. 
  311.    --  "default_setting": True if text is editable by default 
  312.  
  313.    function Ends_Line (Iter : Gtk_Text_Iter) return Boolean; 
  314.    --  Returns True if Iter points to the start of the paragraph delimiter 
  315.    --  characters for a line (delimiters will be either a newline, a carriage 
  316.    --  return, a carriage return followed by a newline, or a Unicode paragraph 
  317.    --  separator character). Note that an iterator pointing to the \n of a \r\n 
  318.    --  pair will not be counted as the end of a line, the line ends before the 
  319.    --  \r. The end iterator is considered to be at the end of a line, even 
  320.    --  though there are no paragraph delimiter chars there. 
  321.  
  322.    function Ends_Sentence (Iter : Gtk_Text_Iter) return Boolean; 
  323.    --  Determines whether Iter ends a sentence. Sentence boundaries are 
  324.    --  determined by Pango and should be correct for nearly any language (if 
  325.    --  not, the correct fix would be to the Pango text boundary algorithms). 
  326.  
  327.    function Ends_Tag 
  328.       (Iter : Gtk_Text_Iter; 
  329.        Tag  : access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class) return Boolean; 
  330.    --  Returns True if Tag is toggled off at exactly this point. If Tag is 
  331.    --  null, returns True if any tag is toggled off at this point. Note that 
  332.    --  the gtk_text_iter_ends_tag () returns True if Iter is the *end* of the 
  333.    --  tagged range; gtk_text_iter_has_tag () tells you whether an iterator is 
  334.    --  *within* a tagged range. 
  335.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag, or null 
  336.  
  337.    function Ends_Word (Iter : Gtk_Text_Iter) return Boolean; 
  338.    --  Determines whether Iter ends a natural-language word. Word breaks are 
  339.    --  determined by Pango and should be correct for nearly any language (if 
  340.    --  not, the correct fix would be to the Pango word break algorithms). 
  341.  
  342.    function Equal (Iter : Gtk_Text_Iter; Rhs : Gtk_Text_Iter) return Boolean; 
  343.    --  Tests whether two iterators are equal, using the fastest possible 
  344.    --  mechanism. This function is very fast; you can expect it to perform 
  345.    --  better than e.g. getting the character offset for each iterator and 
  346.    --  comparing the offsets yourself. Also, it's a bit faster than 
  347.    --  Gtk.Text_Iter.Compare. 
  348.    --  "rhs": another Gtk.Text_Iter.Gtk_Text_Iter 
  349.  
  350.    procedure Forward_Char 
  351.       (Iter   : in out Gtk_Text_Iter; 
  352.        Result : out Boolean); 
  353.    --  Moves Iter forward by one character offset. Note that images embedded 
  354.    --  in the buffer occupy 1 character slot, so gtk_text_iter_forward_char () 
  355.    --  may actually move onto an image instead of a character, if you have 
  356.    --  images in your buffer. If Iter is the end iterator or one character 
  357.    --  before it, Iter will now point at the end iterator, and 
  358.    --  gtk_text_iter_forward_char () returns False for convenience when writing 
  359.    --  loops. 
  360.  
  361.    procedure Forward_Chars 
  362.       (Iter   : in out Gtk_Text_Iter; 
  363.        Count  : Gint; 
  364.        Result : out Boolean); 
  365.    --  Moves Count characters if possible (if Count would move past the start 
  366.    --  or end of the buffer, moves to the start or end of the buffer). The 
  367.    --  return value indicates whether the new position of Iter is different 
  368.    --  from its original position, and dereferenceable (the last iterator in 
  369.    --  the buffer is not dereferenceable). If Count is 0, the function does 
  370.    --  nothing and returns False. 
  371.    --  "count": number of characters to move, may be negative 
  372.  
  373.    procedure Forward_Cursor_Position 
  374.       (Iter   : in out Gtk_Text_Iter; 
  375.        Result : out Boolean); 
  376.    --  Moves Iter forward by a single cursor position. Cursor positions are 
  377.    --  (unsurprisingly) positions where the cursor can appear. Perhaps 
  378.    --  surprisingly, there may not be a cursor position between all characters. 
  379.    --  The most common example for European languages would be a carriage 
  380.    --  return/newline sequence. For some Unicode characters, the equivalent of 
  381.    --  say the letter "a" with an accent mark will be represented as two 
  382.    --  characters, first the letter then a "combining mark" that causes the 
  383.    --  accent to be rendered; so the cursor can't go between those two 
  384.    --  characters. See also the Pango_Log_Attr structure and pango_break 
  385.    --  function. 
  386.  
  387.    procedure Forward_Cursor_Positions 
  388.       (Iter   : in out Gtk_Text_Iter; 
  389.        Count  : Gint; 
  390.        Result : out Boolean); 
  391.    --  Moves up to Count cursor positions. See 
  392.    --  Gtk.Text_Iter.Forward_Cursor_Position for details. 
  393.    --  "count": number of positions to move 
  394.  
  395.    procedure Forward_Line 
  396.       (Iter   : in out Gtk_Text_Iter; 
  397.        Result : out Boolean); 
  398.    --  Moves Iter to the start of the next line. If the iter is already on the 
  399.    --  last line of the buffer, moves the iter to the end of the current line. 
  400.    --  If after the operation, the iter is at the end of the buffer and not 
  401.    --  dereferencable, returns False. Otherwise, returns True. 
  402.  
  403.    procedure Forward_Lines 
  404.       (Iter   : in out Gtk_Text_Iter; 
  405.        Count  : Gint; 
  406.        Result : out Boolean); 
  407.    --  Moves Count lines forward, if possible (if Count would move past the 
  408.    --  start or end of the buffer, moves to the start or end of the buffer). 
  409.    --  The return value indicates whether the iterator moved onto a 
  410.    --  dereferenceable position; if the iterator didn't move, or moved onto the 
  411.    --  end iterator, then False is returned. If Count is 0, the function does 
  412.    --  nothing and returns False. If Count is negative, moves backward by 0 - 
  413.    --  Count lines. 
  414.    --  "count": number of lines to move forward 
  415.  
  416.    procedure Forward_Search 
  417.       (Iter        : in out Gtk_Text_Iter; 
  418.        Str         : UTF8_String; 
  419.        Flags       : Gtk_Text_Search_Flags; 
  420.        Match_Start : out Gtk_Text_Iter; 
  421.        Match_End   : out Gtk_Text_Iter; 
  422.        Limit       : Gtk_Text_Iter := Null_Text_Iter; 
  423.        Result      : out Boolean); 
  424.    --  Searches forward for Str. Any match is returned by setting Match_Start 
  425.    --  to the first character of the match and Match_End to the first character 
  426.    --  after the match. The search will not continue past Limit. Note that a 
  427.    --  search is a linear or O(n) operation, so you may wish to use Limit to 
  428.    --  avoid locking up your UI on large buffers. 
  429.    --  If the GTK_TEXT_SEARCH_VISIBLE_ONLY flag is present, the match may have 
  430.    --  invisible text interspersed in Str. i.e. Str will be a 
  431.    --  possibly-noncontiguous subsequence of the matched range. similarly, if 
  432.    --  you specify GTK_TEXT_SEARCH_TEXT_ONLY, the match may have pixbufs or 
  433.    --  child widgets mixed inside the matched range. If these flags are not 
  434.    --  given, the match must be exact; the special 0xFFFC character in Str will 
  435.    --  match embedded pixbufs or child widgets. If you specify the 
  436.    --  GTK_TEXT_SEARCH_CASE_INSENSITIVE flag, the text will be matched 
  437.    --  regardless of what case it is in. 
  438.    --  "str": a search string 
  439.    --  "flags": flags affecting how the search is done 
  440.    --  "match_start": return location for start of match, or null 
  441.    --  "match_end": return location for end of match, or null 
  442.    --  "limit": bound for the search, or null for the end of the buffer 
  443.  
  444.    procedure Forward_Sentence_End 
  445.       (Iter   : in out Gtk_Text_Iter; 
  446.        Result : out Boolean); 
  447.    --  Moves forward to the next sentence end. (If Iter is at the end of a 
  448.    --  sentence, moves to the next end of sentence.) Sentence boundaries are 
  449.    --  determined by Pango and should be correct for nearly any language (if 
  450.    --  not, the correct fix would be to the Pango text boundary algorithms). 
  451.  
  452.    procedure Forward_Sentence_Ends 
  453.       (Iter   : in out Gtk_Text_Iter; 
  454.        Count  : Gint; 
  455.        Result : out Boolean); 
  456.    --  Calls Gtk.Text_Iter.Forward_Sentence_End Count times (or until 
  457.    --  Gtk.Text_Iter.Forward_Sentence_End returns False). If Count is negative, 
  458.    --  moves backward instead of forward. 
  459.    --  "count": number of sentences to move 
  460.  
  461.    procedure Forward_To_End (Iter : in out Gtk_Text_Iter); 
  462.    pragma Import (C, Forward_To_End, "gtk_text_iter_forward_to_end"); 
  463.    --  Moves Iter forward to the "end iterator," which points one past the 
  464.    --  last valid character in the buffer. Gtk.Text_Iter.Get_Char called on the 
  465.    --  end iterator returns 0, which is convenient for writing loops. 
  466.  
  467.    procedure Forward_To_Line_End 
  468.       (Iter   : in out Gtk_Text_Iter; 
  469.        Result : out Boolean); 
  470.    --  Moves the iterator to point to the paragraph delimiter characters, 
  471.    --  which will be either a newline, a carriage return, a carriage 
  472.    --  return/newline in sequence, or the Unicode paragraph separator 
  473.    --  character. If the iterator is already at the paragraph delimiter 
  474.    --  characters, moves to the paragraph delimiter characters for the next 
  475.    --  line. If Iter is on the last line in the buffer, which does not end in 
  476.    --  paragraph delimiters, moves to the end iterator (end of the last line), 
  477.    --  and returns False. 
  478.  
  479.    procedure Forward_To_Tag_Toggle 
  480.       (Iter   : in out Gtk_Text_Iter; 
  481.        Tag    : Gtk.Text_Tag.Gtk_Text_Tag := null; 
  482.        Result : out Boolean); 
  483.    --  Moves forward to the next toggle (on or off) of the 
  484.    --  Gtk.Text_Tag.Gtk_Text_Tag Tag, or to the next toggle of any tag if Tag 
  485.    --  is null. If no matching tag toggles are found, returns False, otherwise 
  486.    --  True. Does not return toggles located at Iter, only toggles after Iter. 
  487.    --  Sets Iter to the location of the toggle, or to the end of the buffer if 
  488.    --  no toggle is found. 
  489.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag, or null 
  490.  
  491.    procedure Forward_Visible_Cursor_Position 
  492.       (Iter   : in out Gtk_Text_Iter; 
  493.        Result : out Boolean); 
  494.    --  Moves Iter forward to the next visible cursor position. See 
  495.    --  Gtk.Text_Iter.Forward_Cursor_Position for details. 
  496.    --  Since: gtk+ 2.4 
  497.  
  498.    procedure Forward_Visible_Cursor_Positions 
  499.       (Iter   : in out Gtk_Text_Iter; 
  500.        Count  : Gint; 
  501.        Result : out Boolean); 
  502.    --  Moves up to Count visible cursor positions. See 
  503.    --  Gtk.Text_Iter.Forward_Cursor_Position for details. 
  504.    --  Since: gtk+ 2.4 
  505.    --  "count": number of positions to move 
  506.  
  507.    procedure Forward_Visible_Line 
  508.       (Iter   : in out Gtk_Text_Iter; 
  509.        Result : out Boolean); 
  510.    --  Moves Iter to the start of the next visible line. Returns True if there 
  511.    --  was a next line to move to, and False if Iter was simply moved to the 
  512.    --  end of the buffer and is now not dereferenceable, or if Iter was already 
  513.    --  at the end of the buffer. 
  514.    --  Since: gtk+ 2.8 
  515.  
  516.    procedure Forward_Visible_Lines 
  517.       (Iter   : in out Gtk_Text_Iter; 
  518.        Count  : Gint; 
  519.        Result : out Boolean); 
  520.    --  Moves Count visible lines forward, if possible (if Count would move 
  521.    --  past the start or end of the buffer, moves to the start or end of the 
  522.    --  buffer). The return value indicates whether the iterator moved onto a 
  523.    --  dereferenceable position; if the iterator didn't move, or moved onto the 
  524.    --  end iterator, then False is returned. If Count is 0, the function does 
  525.    --  nothing and returns False. If Count is negative, moves backward by 0 - 
  526.    --  Count lines. 
  527.    --  Since: gtk+ 2.8 
  528.    --  "count": number of lines to move forward 
  529.  
  530.    procedure Forward_Visible_Word_End 
  531.       (Iter   : in out Gtk_Text_Iter; 
  532.        Result : out Boolean); 
  533.    --  Moves forward to the next visible word end. (If Iter is currently on a 
  534.    --  word end, moves forward to the next one after that.) Word breaks are 
  535.    --  determined by Pango and should be correct for nearly any language (if 
  536.    --  not, the correct fix would be to the Pango word break algorithms). 
  537.    --  Since: gtk+ 2.4 
  538.  
  539.    procedure Forward_Visible_Word_Ends 
  540.       (Iter   : in out Gtk_Text_Iter; 
  541.        Count  : Gint; 
  542.        Result : out Boolean); 
  543.    --  Calls Gtk.Text_Iter.Forward_Visible_Word_End up to Count times. 
  544.    --  Since: gtk+ 2.4 
  545.    --  "count": number of times to move 
  546.  
  547.    procedure Forward_Word_End 
  548.       (Iter   : in out Gtk_Text_Iter; 
  549.        Result : out Boolean); 
  550.    --  Moves forward to the next word end. (If Iter is currently on a word 
  551.    --  end, moves forward to the next one after that.) Word breaks are 
  552.    --  determined by Pango and should be correct for nearly any language (if 
  553.    --  not, the correct fix would be to the Pango word break algorithms). 
  554.  
  555.    procedure Forward_Word_Ends 
  556.       (Iter   : in out Gtk_Text_Iter; 
  557.        Count  : Gint; 
  558.        Result : out Boolean); 
  559.    --  Calls Gtk.Text_Iter.Forward_Word_End up to Count times. 
  560.    --  "count": number of times to move 
  561.  
  562.    procedure Free (Iter : Gtk_Text_Iter); 
  563.    pragma Import (C, Free, "gtk_text_iter_free"); 
  564.    --  Free an iterator allocated on the heap. This function is intended for 
  565.    --  use in language bindings, and is not especially useful for applications, 
  566.    --  because iterators can simply be allocated on the stack. 
  567.  
  568.    function Get_Attributes 
  569.       (Iter   : Gtk_Text_Iter; 
  570.        Values : access Gtk.Text_Attributes.Gtk_Text_Attributes) 
  571.        return Boolean; 
  572.    --  Computes the effect of any tags applied to this spot in the text. The 
  573.    --  Values parameter should be initialized to the default settings you wish 
  574.    --  to use if no tags are in effect. You'd typically obtain the defaults 
  575.    --  from Gtk.Text_View.Get_Default_Attributes. 
  576.    --  gtk_text_iter_get_attributes () will modify Values, applying the 
  577.    --  effects of any tags present at Iter. If any tags affected Values, the 
  578.    --  function returns True. 
  579.    --  "values": a Gtk.Text_Attributes.Gtk_Text_Attributes to be filled in 
  580.  
  581.    function Get_Bytes_In_Line (Iter : Gtk_Text_Iter) return Gint; 
  582.    pragma Import (C, Get_Bytes_In_Line, "gtk_text_iter_get_bytes_in_line"); 
  583.    --  Returns the number of bytes in the line containing Iter, including the 
  584.    --  paragraph delimiters. 
  585.  
  586.    function Get_Char (Iter : Gtk_Text_Iter) return Gunichar; 
  587.    pragma Import (C, Get_Char, "gtk_text_iter_get_char"); 
  588.    --  Returns the Unicode character at this iterator. (Equivalent to 
  589.    --  operator* on a C++ iterator.) If the element at this iterator is a 
  590.    --  non-character element, such as an image embedded in the buffer, the 
  591.    --  Unicode "unknown" character 0xFFFC is returned. If invoked on the end 
  592.    --  iterator, zero is returned; zero is not a valid Unicode character. So 
  593.    --  you can write a loop which ends when gtk_text_iter_get_char () returns 
  594.    --  0. 
  595.  
  596.    function Get_Chars_In_Line (Iter : Gtk_Text_Iter) return Gint; 
  597.    pragma Import (C, Get_Chars_In_Line, "gtk_text_iter_get_chars_in_line"); 
  598.    --  Returns the number of characters in the line containing Iter, including 
  599.    --  the paragraph delimiters. 
  600.  
  601.    function Get_Language 
  602.       (Iter : Gtk_Text_Iter) return Pango.Language.Pango_Language; 
  603.    --  A convenience wrapper around gtk_text_iter_get_attributes (), which 
  604.    --  returns the language in effect at Iter. If no tags affecting language 
  605.    --  apply to Iter, the return value is identical to that of 
  606.    --  gtk_get_default_language (). 
  607.  
  608.    function Get_Line (Iter : Gtk_Text_Iter) return Gint; 
  609.    pragma Import (C, Get_Line, "gtk_text_iter_get_line"); 
  610.    --  Returns the line number containing the iterator. Lines in a 
  611.    --  Gtk.Text_Buffer.Gtk_Text_Buffer are numbered beginning with 0 for the 
  612.    --  first line in the buffer. 
  613.  
  614.    procedure Set_Line (Iter : in out Gtk_Text_Iter; Line_Number : Gint); 
  615.    pragma Import (C, Set_Line, "gtk_text_iter_set_line"); 
  616.    --  Moves iterator Iter to the start of the line Line_Number. If 
  617.    --  Line_Number is negative or larger than the number of lines in the 
  618.    --  buffer, moves Iter to the start of the last line in the buffer. 
  619.    --  "line_number": line number (counted from 0) 
  620.  
  621.    function Get_Line_Index (Iter : Gtk_Text_Iter) return Gint; 
  622.    pragma Import (C, Get_Line_Index, "gtk_text_iter_get_line_index"); 
  623.    --  Returns the byte index of the iterator, counting from the start of a 
  624.    --  newline-terminated line. Remember that Gtk.Text_Buffer.Gtk_Text_Buffer 
  625.    --  encodes text in UTF-8, and that characters can require a variable number 
  626.    --  of bytes to represent. 
  627.  
  628.    procedure Set_Line_Index 
  629.       (Iter         : in out Gtk_Text_Iter; 
  630.        Byte_On_Line : Gint); 
  631.    pragma Import (C, Set_Line_Index, "gtk_text_iter_set_line_index"); 
  632.    --  Same as Gtk.Text_Iter.Set_Line_Offset, but works with a *byte* index. 
  633.    --  The given byte index must be at the start of a character, it can't be in 
  634.    --  the middle of a UTF-8 encoded character. 
  635.    --  "byte_on_line": a byte index relative to the start of Iter's current 
  636.    --  line 
  637.  
  638.    function Get_Line_Offset (Iter : Gtk_Text_Iter) return Gint; 
  639.    pragma Import (C, Get_Line_Offset, "gtk_text_iter_get_line_offset"); 
  640.    --  Returns the character offset of the iterator, counting from the start 
  641.    --  of a newline-terminated line. The first character on the line has offset 
  642.    --  0. 
  643.  
  644.    procedure Set_Line_Offset 
  645.       (Iter         : in out Gtk_Text_Iter; 
  646.        Char_On_Line : Gint); 
  647.    pragma Import (C, Set_Line_Offset, "gtk_text_iter_set_line_offset"); 
  648.    --  Moves Iter within a line, to a new *character* (not byte) offset. The 
  649.    --  given character offset must be less than or equal to the number of 
  650.    --  characters in the line; if equal, Iter moves to the start of the next 
  651.    --  line. See Gtk.Text_Iter.Set_Line_Index if you have a byte index rather 
  652.    --  than a character offset. 
  653.    --  "char_on_line": a character offset relative to the start of Iter's 
  654.    --  current line 
  655.  
  656.    function Get_Marks 
  657.       (Iter : Gtk_Text_Iter) return Glib.Object.Object_List.GSlist; 
  658.    --  Returns a list of all Gtk.Text_Mark.Gtk_Text_Mark at this location. 
  659.    --  Because marks are not iterable (they don't take up any "space" in the 
  660.    --  buffer, they are just marks in between iterable locations), multiple 
  661.    --  marks can exist in the same place. The returned list is not in any 
  662.    --  meaningful order. 
  663.  
  664.    function Get_Offset (Iter : Gtk_Text_Iter) return Gint; 
  665.    pragma Import (C, Get_Offset, "gtk_text_iter_get_offset"); 
  666.    --  Returns the character offset of an iterator. Each character in a 
  667.    --  Gtk.Text_Buffer.Gtk_Text_Buffer has an offset, starting with 0 for the 
  668.    --  first character in the buffer. Use gtk_text_buffer_get_iter_at_offset () 
  669.    --  to convert an offset back into an iterator. 
  670.  
  671.    procedure Set_Offset (Iter : in out Gtk_Text_Iter; Char_Offset : Gint); 
  672.    pragma Import (C, Set_Offset, "gtk_text_iter_set_offset"); 
  673.    --  Sets Iter to point to Char_Offset. Char_Offset counts from the start of 
  674.    --  the entire text buffer, starting with 0. 
  675.    --  "char_offset": a character number 
  676.  
  677.    function Get_Pixbuf (Iter : Gtk_Text_Iter) return Gdk.Pixbuf.Gdk_Pixbuf; 
  678.    --  If the element at Iter is a pixbuf, the pixbuf is returned (with no new 
  679.    --  reference count added). Otherwise, null is returned. 
  680.  
  681.    function Get_Slice 
  682.       (Iter    : Gtk_Text_Iter; 
  683.        The_End : Gtk_Text_Iter) return UTF8_String; 
  684.    --  Returns the text in the given range. A "slice" is an array of 
  685.    --  characters encoded in UTF-8 format, including the Unicode "unknown" 
  686.    --  character 0xFFFC for iterable non-character elements in the buffer, such 
  687.    --  as images. Because images are encoded in the slice, byte and character 
  688.    --  offsets in the returned array will correspond to byte offsets in the 
  689.    --  text buffer. Note that 0xFFFC can occur in normal text as well, so it is 
  690.    --  not a reliable indicator that a pixbuf or widget is in the buffer. 
  691.    --  "end": iterator at end of a range 
  692.  
  693.    function Get_Tags 
  694.       (Iter : Gtk_Text_Iter) return Gtk.Text_Tag.Text_Tag_List.GSlist; 
  695.    --  Returns a list of tags that apply to Iter, in ascending order of 
  696.    --  priority (highest-priority tags are last). The Gtk.Text_Tag.Gtk_Text_Tag 
  697.    --  in the list don't have a reference added, but you have to free the list 
  698.    --  itself. 
  699.  
  700.    function Get_Text 
  701.       (Iter    : Gtk_Text_Iter; 
  702.        The_End : Gtk_Text_Iter) return UTF8_String; 
  703.    --  Returns *text* in the given range. If the range contains non-text 
  704.    --  elements such as images, the character and byte offsets in the returned 
  705.    --  string will not correspond to character and byte offsets in the buffer. 
  706.    --  If you want offsets to correspond, see gtk_text_iter_get_slice (). 
  707.    --  "end": iterator at end of a range 
  708.  
  709.    function Get_Toggled_Tags 
  710.       (Iter       : Gtk_Text_Iter; 
  711.        Toggled_On : Boolean) return Gtk.Text_Tag.Text_Tag_List.GSlist; 
  712.    --  Returns a list of Gtk.Text_Tag.Gtk_Text_Tag that are toggled on or off 
  713.    --  at this point. (If Toggled_On is True, the list contains tags that are 
  714.    --  toggled on.) If a tag is toggled on at Iter, then some non-empty range 
  715.    --  of characters following Iter has that tag applied to it. If a tag is 
  716.    --  toggled off, then some non-empty range following Iter does *not* have 
  717.    --  the tag applied to it. 
  718.    --  "toggled_on": True to get toggled-on tags 
  719.  
  720.    function Get_Visible_Line_Index (Iter : Gtk_Text_Iter) return Gint; 
  721.    pragma Import (C, Get_Visible_Line_Index, "gtk_text_iter_get_visible_line_index"); 
  722.    --  Returns the number of bytes from the start of the line to the given 
  723.    --  Iter, not counting bytes that are invisible due to tags with the 
  724.    --  "invisible" flag toggled on. 
  725.  
  726.    procedure Set_Visible_Line_Index 
  727.       (Iter         : in out Gtk_Text_Iter; 
  728.        Byte_On_Line : Gint); 
  729.    pragma Import (C, Set_Visible_Line_Index, "gtk_text_iter_set_visible_line_index"); 
  730.    --  Like Gtk.Text_Iter.Set_Line_Index, but the index is in visible bytes, 
  731.    --  i.e. text with a tag making it invisible is not counted in the index. 
  732.    --  "byte_on_line": a byte index 
  733.  
  734.    function Get_Visible_Line_Offset (Iter : Gtk_Text_Iter) return Gint; 
  735.    pragma Import (C, Get_Visible_Line_Offset, "gtk_text_iter_get_visible_line_offset"); 
  736.    --  Returns the offset in characters from the start of the line to the 
  737.    --  given Iter, not counting characters that are invisible due to tags with 
  738.    --  the "invisible" flag toggled on. 
  739.  
  740.    procedure Set_Visible_Line_Offset 
  741.       (Iter         : in out Gtk_Text_Iter; 
  742.        Char_On_Line : Gint); 
  743.    pragma Import (C, Set_Visible_Line_Offset, "gtk_text_iter_set_visible_line_offset"); 
  744.    --  Like Gtk.Text_Iter.Set_Line_Offset, but the offset is in visible 
  745.    --  characters, i.e. text with a tag making it invisible is not counted in 
  746.    --  the offset. 
  747.    --  "char_on_line": a character offset 
  748.  
  749.    function Get_Visible_Slice 
  750.       (Iter    : Gtk_Text_Iter; 
  751.        The_End : Gtk_Text_Iter) return UTF8_String; 
  752.    --  Like gtk_text_iter_get_slice (), but invisible text is not included. 
  753.    --  Invisible text is usually invisible because a Gtk.Text_Tag.Gtk_Text_Tag 
  754.    --  with the "invisible" attribute turned on has been applied to it. 
  755.    --  "end": iterator at end of range 
  756.  
  757.    function Get_Visible_Text 
  758.       (Iter    : Gtk_Text_Iter; 
  759.        The_End : Gtk_Text_Iter) return UTF8_String; 
  760.    --  Like gtk_text_iter_get_text (), but invisible text is not included. 
  761.    --  Invisible text is usually invisible because a Gtk.Text_Tag.Gtk_Text_Tag 
  762.    --  with the "invisible" attribute turned on has been applied to it. 
  763.    --  "end": iterator at end of range 
  764.  
  765.    function Has_Tag 
  766.       (Iter : Gtk_Text_Iter; 
  767.        Tag  : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class) 
  768.        return Boolean; 
  769.    --  Returns True if Iter is within a range tagged with Tag. 
  770.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag 
  771.  
  772.    function In_Range 
  773.       (Iter    : Gtk_Text_Iter; 
  774.        Start   : Gtk_Text_Iter; 
  775.        The_End : Gtk_Text_Iter) return Boolean; 
  776.    --  Checks whether Iter falls in the range [Start, End). Start and End must 
  777.    --  be in ascending order. 
  778.    --  "start": start of range 
  779.    --  "end": end of range 
  780.  
  781.    function Inside_Sentence (Iter : Gtk_Text_Iter) return Boolean; 
  782.    --  Determines whether Iter is inside a sentence (as opposed to in between 
  783.    --  two sentences, e.g. after a period and before the first letter of the 
  784.    --  next sentence). Sentence boundaries are determined by Pango and should 
  785.    --  be correct for nearly any language (if not, the correct fix would be to 
  786.    --  the Pango text boundary algorithms). 
  787.  
  788.    function Inside_Word (Iter : Gtk_Text_Iter) return Boolean; 
  789.    --  Determines whether Iter is inside a natural-language word (as opposed 
  790.    --  to say inside some whitespace). Word breaks are determined by Pango and 
  791.    --  should be correct for nearly any language (if not, the correct fix would 
  792.    --  be to the Pango word break algorithms). 
  793.  
  794.    function Is_Cursor_Position (Iter : Gtk_Text_Iter) return Boolean; 
  795.    --  See Gtk.Text_Iter.Forward_Cursor_Position or Pango_Log_Attr or 
  796.    --  pango_break for details on what a cursor position is. 
  797.  
  798.    function Is_End (Iter : Gtk_Text_Iter) return Boolean; 
  799.    --  Returns True if Iter is the end iterator, i.e. one past the last 
  800.    --  dereferenceable iterator in the buffer. gtk_text_iter_is_end () is the 
  801.    --  most efficient way to check whether an iterator is the end iterator. 
  802.  
  803.    function Is_Start (Iter : Gtk_Text_Iter) return Boolean; 
  804.    --  Returns True if Iter is the first iterator in the buffer, that is if 
  805.    --  Iter has a character offset of 0. 
  806.  
  807.    procedure Order (Iter : Gtk_Text_Iter; Second : Gtk_Text_Iter); 
  808.    pragma Import (C, Order, "gtk_text_iter_order"); 
  809.    --  Swaps the value of First and Second if Second comes before First in the 
  810.    --  buffer. That is, ensures that First and Second are in sequence. Most 
  811.    --  text buffer functions that take a range call this automatically on your 
  812.    --  behalf, so there's no real reason to call it yourself in those cases. 
  813.    --  There are some exceptions, such as Gtk.Text_Iter.In_Range, that expect a 
  814.    --  pre-sorted range. 
  815.    --  "second": another Gtk.Text_Iter.Gtk_Text_Iter 
  816.  
  817.    function Starts_Line (Iter : Gtk_Text_Iter) return Boolean; 
  818.    --  Returns True if Iter begins a paragraph, i.e. if 
  819.    --  gtk_text_iter_get_line_offset () would return 0. However this function 
  820.    --  is potentially more efficient than gtk_text_iter_get_line_offset () 
  821.    --  because it doesn't have to compute the offset, it just has to see 
  822.    --  whether it's 0. 
  823.  
  824.    function Starts_Sentence (Iter : Gtk_Text_Iter) return Boolean; 
  825.    --  Determines whether Iter begins a sentence. Sentence boundaries are 
  826.    --  determined by Pango and should be correct for nearly any language (if 
  827.    --  not, the correct fix would be to the Pango text boundary algorithms). 
  828.  
  829.    function Starts_Word (Iter : Gtk_Text_Iter) return Boolean; 
  830.    --  Determines whether Iter begins a natural-language word. Word breaks are 
  831.    --  determined by Pango and should be correct for nearly any language (if 
  832.    --  not, the correct fix would be to the Pango word break algorithms). 
  833.  
  834.    function Toggles_Tag 
  835.       (Iter : Gtk_Text_Iter; 
  836.        Tag  : access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class) return Boolean; 
  837.    --  This is equivalent to (gtk_text_iter_begins_tag () || 
  838.    --  gtk_text_iter_ends_tag ()), i.e. it tells you whether a range with Tag 
  839.    --  applied to it begins *or* ends at Iter. 
  840.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag, or null 
  841.  
  842.    ---------------------- 
  843.    -- GtkAda additions -- 
  844.    ---------------------- 
  845.  
  846.    procedure Copy (Source : Gtk_Text_Iter; Dest : out Gtk_Text_Iter); 
  847.    pragma Inline (Copy); 
  848.    --  Create a copy of Source. 
  849.  
  850.    function Get_Char (Iter : Gtk_Text_Iter) return Character; 
  851.    --  Return the character immediately following Iter. If Iter is at the 
  852.    --  end of the buffer, then return ASCII.NUL. 
  853.    --  Note that this function assumes that the text is encoded in ASCII 
  854.    --  format. If this is not the case, use the Get_Char function that 
  855.    --  returns a Gunichar instead. 
  856.  
  857.    function Iter_Or_Null (Iter : System.Address) return System.Address; 
  858.    --  Internal function for GtkAda 
  859.  
  860.    ------------------------------- 
  861.    -- Converting to/from GValue -- 
  862.    ------------------------------- 
  863.  
  864.    procedure Set_Text_Iter 
  865.      (Val  : in out Glib.Values.GValue; 
  866.       Iter : Gtk_Text_Iter); 
  867.    pragma Import (C, Set_Text_Iter, "g_value_set_pointer"); 
  868.    --  Set the value of the given GValue to Iter. 
  869.    --  Note that Iter is stored by reference, which means no copy of Iter 
  870.    --  is made. Iter should remain allocated as long as Val is being used. 
  871.  
  872.    procedure Get_Text_Iter 
  873.      (Val  : Glib.Values.GValue; 
  874.       Iter : out Gtk_Text_Iter); 
  875.    --  Extract the iterator from the given GValue. 
  876.    --  Note that the iterator returned is a copy of the iterator referenced 
  877.    --  by the give GValue. Modifying the iterator returned does not modify 
  878.    --  the iterator referenced by the GValue. 
  879.  
  880.    function Get_Slice 
  881.      (Start   : Gtk_Text_Iter; 
  882.       The_End : Gtk_Text_Iter) return Interfaces.C.Strings.chars_ptr; 
  883.    --  Same as Get_Slice above, but returns the raw C string. 
  884.    --  The caller is responsible for freeing the string returned. 
  885.  
  886. private 
  887. type Gtk_Text_Iter is record 
  888.    Dummy1 : System.Address; 
  889.    Dummy2 : System.Address; 
  890.    Dummy3 : Gint; 
  891.    Dummy4 : Gint; 
  892.    Dummy5 : Gint; 
  893.    Dummy6 : Gint; 
  894.    Dummy7 : Gint; 
  895.    Dummy8 : Gint; 
  896.    Dummy9 : System.Address; 
  897.    Dummy10 : System.Address; 
  898.    Dummy11 : Gint; 
  899.    Dummy12 : Gint; 
  900.    Dummy13 : Gint; 
  901.    Dummy14 : System.Address; 
  902. end record; 
  903. pragma Convention (C, Gtk_Text_Iter); 
  904.  
  905.  
  906.    Null_Text_Iter : constant Gtk_Text_Iter := 
  907.      (System.Null_Address, System.Null_Address, 0, 0, 0, 0, 0, 0, 
  908.       System.Null_Address, System.Null_Address, 0, 0, 0, 
  909.       System.Null_Address); 
  910.          
  911. end Gtk.Text_Iter;