[gtksourceviewmm] Use iterator instead of Gtk::TextIter.



commit d196ab5927af3fc5e8b076690a60c18a1248566e
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 31 12:20:15 2017 +0200

    Use iterator instead of Gtk::TextIter.

 gtksourceview/src/buffer.ccg            |   12 ++++---
 gtksourceview/src/buffer.hg             |   57 ++++++++++++++++---------------
 gtksourceview/src/completion.hg         |    6 ++--
 gtksourceview/src/completioncontext.ccg |    4 +-
 gtksourceview/src/completioncontext.hg  |    6 ++--
 gtksourceview/src/completioninfo.hg     |    6 ++--
 gtksourceview/src/completionprovider.hg |   22 ++++++------
 gtksourceview/src/gutterrenderer.hg     |   34 +++++++++---------
 gtksourceview/src/view.hg               |   16 ++++----
 9 files changed, 83 insertions(+), 80 deletions(-)
---
diff --git a/gtksourceview/src/buffer.ccg b/gtksourceview/src/buffer.ccg
index afc82c6..bc1e5c9 100644
--- a/gtksourceview/src/buffer.ccg
+++ b/gtksourceview/src/buffer.ccg
@@ -24,6 +24,8 @@
 
 #include <glibmm/vectorutils.h>
 
+using iterator = Gsv::Buffer::iterator;
+
 namespace Gsv
 {
 
@@ -40,18 +42,18 @@ Buffer::Buffer (const Glib::RefPtr<Language> &language) :
 {
 }
 
-bool Buffer::backward_iter_to_source_mark(Gtk::TextIter& iter)
+bool Buffer::backward_iter_to_source_mark(iterator& iter)
 {
     return gtk_source_buffer_backward_iter_to_source_mark(gobj(), iter.gobj(), 0);
 }
 
-bool Buffer::forward_iter_to_source_mark(Gtk::TextIter& iter)
+bool Buffer::forward_iter_to_source_mark(iterator& iter)
 {
     return gtk_source_buffer_forward_iter_to_source_mark(gobj(), iter.gobj(), 0);
 }
 
 Glib::RefPtr<Gsv::Mark>
-Buffer::create_source_mark(const Glib::ustring& category, const Gtk::TextIter& where)
+Buffer::create_source_mark(const Glib::ustring& category, const iterator& where)
 {
   return Glib::wrap(gtk_source_buffer_create_source_mark(gobj(), 0, category.c_str(), where.gobj()));
 }
@@ -61,13 +63,13 @@ std::vector<Glib::RefPtr<Gsv::Mark> > Buffer::get_source_marks_at_line(int line)
     return Glib::SListHandler<Glib::RefPtr<Gsv::Mark> 
::slist_to_vector(gtk_source_buffer_get_source_marks_at_line(const_cast<GtkSourceBuffer*>(gobj()), line, 0), 
Glib::OWNERSHIP_SHALLOW);
 }
 
-std::vector<Glib::RefPtr<Gsv::Mark> > Buffer::get_source_marks_at_iter(Gtk::TextIter& iter) const
+std::vector<Glib::RefPtr<Gsv::Mark> > Buffer::get_source_marks_at_iter(iterator& iter) const
 {
     return Glib::SListHandler<Glib::RefPtr<Gsv::Mark> 
::slist_to_vector(gtk_source_buffer_get_source_marks_at_iter(const_cast<GtkSourceBuffer*>(gobj()), 
iter.gobj(), 0), Glib::OWNERSHIP_SHALLOW);
 }
 
 void
-Buffer::remove_source_marks(const Gtk::TextIter& start, const Gtk::TextIter& end)
+Buffer::remove_source_marks(const iterator& start, const iterator& end)
 {
   gtk_source_buffer_remove_source_marks(gobj(), start.gobj(), end.gobj(), 0);
 }
diff --git a/gtksourceview/src/buffer.hg b/gtksourceview/src/buffer.hg
index 821846c..c94c82f 100644
--- a/gtksourceview/src/buffer.hg
+++ b/gtksourceview/src/buffer.hg
@@ -76,6 +76,7 @@ protected:
   explicit Buffer (const Glib::RefPtr<Language> &language) ;
 
 public:
+  using iterator = TextBuffer::iterator;
 
   /** Create a new source buffer.
    *
@@ -189,7 +190,7 @@ public:
 
   _WRAP_METHOD(void end_not_undoable_action(), gtk_source_buffer_end_not_undoable_action)
 
-#m4 _CONVERSION(`Gtk::TextIter&',`GtkTextIter*',`($3).gobj()')
+#m4 _CONVERSION(`iterator&',`GtkTextIter*',`($3).gobj()')
   /** Moves iter to the position of the previous Mark of the given
    *  category.
    *
@@ -198,7 +199,7 @@ public:
    *
    * @return @c true if iter was moved.
    */
-  _WRAP_METHOD(bool backward_iter_to_source_mark(Gtk::TextIter& iter, const Glib::ustring& category), 
gtk_source_buffer_backward_iter_to_source_mark)
+  _WRAP_METHOD(bool backward_iter_to_source_mark(iterator& iter, const Glib::ustring& category), 
gtk_source_buffer_backward_iter_to_source_mark)
 
   /** Moves iter to the position of the previous Mark of any category.
    *
@@ -206,7 +207,7 @@ public:
    *
    * @return @c true if iter was moved.
    */
-  bool backward_iter_to_source_mark(Gtk::TextIter& iter);
+  bool backward_iter_to_source_mark(iterator& iter);
 
   /** Moves iter to the position of the next Mark of the given
    *  category.
@@ -216,7 +217,7 @@ public:
    *
    * @return @c true if iter was moved.
    */
-  _WRAP_METHOD(bool forward_iter_to_source_mark(Gtk::TextIter& iter, const Glib::ustring& category), 
gtk_source_buffer_forward_iter_to_source_mark)
+  _WRAP_METHOD(bool forward_iter_to_source_mark(iterator& iter, const Glib::ustring& category), 
gtk_source_buffer_forward_iter_to_source_mark)
 
   /** Moves iter to the position of the next Mark of the given
    *  category.
@@ -225,9 +226,9 @@ public:
    *
    * @return @c true if iter was moved.
    */
-  bool forward_iter_to_source_mark(Gtk::TextIter& iter);
+  bool forward_iter_to_source_mark(iterator& iter);
 
-#m4 _CONVERSION(`const Gtk::TextIter&',`const GtkTextIter*',`($3).gobj()')
+#m4 _CONVERSION(`const iterator&',`const GtkTextIter*',`($3).gobj()')
   /** Forces buffer to analyze and highlight the given area synchronously.
    *
    * @note This is a potentially slow operation and should be used only when you
@@ -237,7 +238,7 @@ public:
    * @param start Start of the area to highlight.
    * @param end End of the area to highlight.
    */
-  _WRAP_METHOD(void ensure_highlight(const Gtk::TextIter& start, const Gtk::TextIter& end), 
gtk_source_buffer_ensure_highlight)
+  _WRAP_METHOD(void ensure_highlight(const iterator& start, const iterator& end), 
gtk_source_buffer_ensure_highlight)
 
   /** Returns the StyleScheme currently used in buffer.
    *
@@ -285,7 +286,7 @@ public:
    *
    * @return A new Mark.
    */
-  _WRAP_METHOD(Glib::RefPtr<Gsv::Mark> create_source_mark(const Glib::ustring& name, const Glib::ustring& 
category, const Gtk::TextIter& where), gtk_source_buffer_create_source_mark, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<Gsv::Mark> create_source_mark(const Glib::ustring& name, const Glib::ustring& 
category, const iterator& where), gtk_source_buffer_create_source_mark, refreturn)
 
   /** Creates an anonymous source mark in the buffer of category category.
    *
@@ -308,7 +309,7 @@ public:
    *
    * @newin{2,10}
    */
-  Glib::RefPtr<Gsv::Mark> create_source_mark(const Glib::ustring& category, const Gtk::TextIter& where);
+  Glib::RefPtr<Gsv::Mark> create_source_mark(const Glib::ustring& category, const iterator& where);
 
 #m4 _CONVERSION(`GSList*',`std::vector<Glib::RefPtr<Gsv::Mark> >', 
`Glib::SListHandler<Glib::RefPtr<Gsv::Mark> >::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
 #m4 _CONVERSION(`GSList*',`std::vector<Glib::RefPtr<const Gsv::Mark> >', 
`Glib::SListHandler<Glib::RefPtr<const Gsv::Mark> >slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
@@ -338,7 +339,7 @@ public:
    *
    * @return A list of source marks.
    */
-  _WRAP_METHOD(std::vector<Glib::RefPtr<Gsv::Mark> > get_source_marks_at_iter(Gtk::TextIter& iter, const 
Glib::ustring& category) const, gtk_source_buffer_get_source_marks_at_iter)
+  _WRAP_METHOD(std::vector<Glib::RefPtr<Gsv::Mark> > get_source_marks_at_iter(iterator& iter, const 
Glib::ustring& category) const, gtk_source_buffer_get_source_marks_at_iter)
 
   /** Returns the list of marks of any category at @a iter.
    *
@@ -346,35 +347,35 @@ public:
    *
    * @return A list of source marks.
    */
-  std::vector<Glib::RefPtr<Gsv::Mark> > get_source_marks_at_iter(Gtk::TextIter& iter) const;
+  std::vector<Glib::RefPtr<Gsv::Mark> > get_source_marks_at_iter(iterator& iter) const;
 
   /** Remove all marks of @a category between start and end from the buffer.
    *
-   * @param start A Gtk::TextIter.
-   * @param end A Gtk::TextIter.
+   * @param start A iterator.
+   * @param end A iterator.
    * @param category Category to search for.
    */
-  _WRAP_METHOD(void remove_source_marks(const Gtk::TextIter& start, const Gtk::TextIter& end, const 
Glib::ustring& category), gtk_source_buffer_remove_source_marks)
+  _WRAP_METHOD(void remove_source_marks(const iterator& start, const iterator& end, const Glib::ustring& 
category), gtk_source_buffer_remove_source_marks)
 
   /** Remove all marks of any category between start and end from the buffer.
    *
-   * @param start A Gtk::TextIter.
-   * @param end A Gtk::TextIter.
+   * @param start A iterator.
+   * @param end A iterator.
    *
    * @newin{2,10}
    */
-  void remove_source_marks(const Gtk::TextIter& start, const Gtk::TextIter& end);
+  void remove_source_marks(const iterator& start, const iterator& end);
 
   /** Check if the class @a context_class is set on @c iter.
    *
-   * @param iter A Gtk::TextIter.
+   * @param iter A iterator.
    * @param context_class Class to search for.
    *
    * @return @c true if @a context_class is set on @c iter.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(bool iter_has_context_class(const Gtk::TextIter& iter, const Glib::ustring& context_class) 
const, gtk_source_buffer_iter_has_context_class)
+  _WRAP_METHOD(bool iter_has_context_class(const iterator& iter, const Glib::ustring& context_class) const, 
gtk_source_buffer_iter_has_context_class)
 
   /** Moves backward to the next toggle (on or off) of the context class.
    *
@@ -383,14 +384,14 @@ public:
    * @a iter. Sets @a iter to the location of the toggle, or to the end of the
    * buffer if no toggle is found.
    *
-   * @param iter A Gtk::TextIter.
+   * @param iter A iterator.
    * @param context_class The context class.
    *
    * @return Whether we found a context class toggle before @a iter.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(bool iter_backward_to_context_class_toggle(Gtk::TextIter& iter, const Glib::ustring& 
context_class) const, gtk_source_buffer_iter_backward_to_context_class_toggle)
+  _WRAP_METHOD(bool iter_backward_to_context_class_toggle(iterator& iter, const Glib::ustring& 
context_class) const, gtk_source_buffer_iter_backward_to_context_class_toggle)
 
   /** Moves forward to the next toggle (on or off) of the context class.
    *
@@ -399,26 +400,26 @@ public:
    * @a iter. Sets @a iter to the location of the toggle, or to the end of the
    * buffer if no toggle is found.
    *
-   * @param iter A Gtk::TextIter.
+   * @param iter A iterator.
    * @param context_class The context class.
    *
    * @return Whether we found a context class toggle after @a iter.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(bool iter_forward_to_context_class_toggle(Gtk::TextIter& iter, const Glib::ustring& 
context_class) const, gtk_source_buffer_iter_forward_to_context_class_toggle)
+  _WRAP_METHOD(bool iter_forward_to_context_class_toggle(iterator& iter, const Glib::ustring& context_class) 
const, gtk_source_buffer_iter_forward_to_context_class_toggle)
 
 #m4 
_CONVERSION(`gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, 
Glib::OWNERSHIP_DEEP)')
 
   /** Get all defined context classes at iter.
    *
-   * @param iter A Gtk::TextIter.
+   * @param iter A iterator.
    *
    * @return An array of context class names.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(std::vector<Glib::ustring> get_context_classes_at_iter(const Gtk::TextIter& iter) const, 
gtk_source_buffer_get_context_classes_at_iter)
+  _WRAP_METHOD(std::vector<Glib::ustring> get_context_classes_at_iter(const iterator& iter) const, 
gtk_source_buffer_get_context_classes_at_iter)
 
   /** Get the undo manager associated with the buffer.
    * @return A UndoManager.
@@ -457,7 +458,7 @@ public:
   _WRAP_PROPERTY("style-scheme", Glib::RefPtr<StyleScheme>)
   _WRAP_PROPERTY("undo-manager", Glib::RefPtr<UndoManager>)
 
-#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextIter&',`Glib::wrap_iter($3)')
+#m4 _CONVERSION(`GtkTextIter*',`iterator&',`Glib::wrap_iter($3)')
   /** Emitted whenever the syntax highlighting information has been updated,
    *  so that views can request a redraw if the region changed is visible.
    *
@@ -467,7 +468,7 @@ public:
    * start An iterator at the start of the updated region.
    * end An iterator at the end of the updated region.
    */
-  _WRAP_SIGNAL(void highlight_updated(Gtk::TextIter& start, Gtk::TextIter& end), "highlight-updated", 
no_default_handler)
+  _WRAP_SIGNAL(void highlight_updated(iterator& start, iterator& end), "highlight-updated", 
no_default_handler)
 
 #m4 _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<Gtk::TextMark>&',`Glib::wrap($3, true)')
   /** Emitted whenever a marker of sourcebuffer has changed and needs to be redisplayed by the view.
@@ -506,7 +507,7 @@ public:
    *
    * @newin{3,0}
    */
-  _WRAP_SIGNAL(void bracket_matched(Gtk::TextIter& iter, BracketMatchType state), "bracket-matched")
+  _WRAP_SIGNAL(void bracket_matched(iterator& iter, BracketMatchType state), "bracket-matched")
 
   /** Sets whether the buffer has an implicit trailing newline.
    *
diff --git a/gtksourceview/src/completion.hg b/gtksourceview/src/completion.hg
index 90b817d..49a092e 100644
--- a/gtksourceview/src/completion.hg
+++ b/gtksourceview/src/completion.hg
@@ -136,19 +136,19 @@ public:
   _WRAP_METHOD(const View* get_view() const, gtk_source_completion_get_view, constversion)
 
   // TODO: Does "The reference being returned is a 'floating' reference, so if you invoke 
gtk_source_completion_show with this context you don't need to unref it." something mean for us? krnowak
-#m4 _CONVERSION(`const Gtk::TextIter&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
+#m4 _CONVERSION(`const Gtk::TextBuffer::iterator&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
   /** Create a new CompletionContext for completion.
    *
    * The position at which the completion using the new context will consider
    * completion can be provided by @a position.
    *
-   * @param position A Gtk::TextIter.
+   * @param position A Gtk::TextBuffer::iterator.
    *
    * @return A new CompletionContext.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(Glib::RefPtr<CompletionContext> create_context(const Gtk::TextIter& position), 
gtk_source_completion_create_context)
+  _WRAP_METHOD(Glib::RefPtr<CompletionContext> create_context(const Gtk::TextBuffer::iterator& position), 
gtk_source_completion_create_context)
 
   // TODO: better wording could be used here - it is too convoluted. krnowak
   /** Create a new CompletionContext for completion.
diff --git a/gtksourceview/src/completioncontext.ccg b/gtksourceview/src/completioncontext.ccg
index 20af3de..2bf5bd7 100644
--- a/gtksourceview/src/completioncontext.ccg
+++ b/gtksourceview/src/completioncontext.ccg
@@ -24,9 +24,9 @@
 namespace Gsv
 {
 
-Gtk::TextIter CompletionContext::get_iter() const
+Gtk::TextBuffer::iterator CompletionContext::get_iter() const
 {
-  Gtk::TextIter iter;
+  Gtk::TextBuffer::iterator iter;
   gtk_source_completion_context_get_iter(const_cast<GtkSourceCompletionContext*>(gobj()), iter.gobj());
   return iter;
 }
diff --git a/gtksourceview/src/completioncontext.hg b/gtksourceview/src/completioncontext.hg
index 3a54299..7a5fad0 100644
--- a/gtksourceview/src/completioncontext.hg
+++ b/gtksourceview/src/completioncontext.hg
@@ -72,11 +72,11 @@ public:
    *
    * Providers can use this to determine how and if to match proposals.
    *
-   * @return A Gtk::TextIter.
+   * @return A Gtk::TextBuffer::iterator.
    *
    * @newin{2,10}
    */
-  Gtk::TextIter get_iter() const;
+  Gtk::TextBuffer::iterator get_iter() const;
 
   /** Get the context activation
    *
@@ -88,7 +88,7 @@ public:
 
   _WRAP_PROPERTY("activation", CompletionActivation)
   _WRAP_PROPERTY("completion", Glib::RefPtr<Completion>)
-  _WRAP_PROPERTY("iter", Gtk::TextIter)
+  _WRAP_PROPERTY("iter", Gtk::TextBuffer::iterator)
 
   /** Emitted when the current population of proposals has been cancelled.
    *
diff --git a/gtksourceview/src/completioninfo.hg b/gtksourceview/src/completioninfo.hg
index 8ff58ec..b3f173d 100644
--- a/gtksourceview/src/completioninfo.hg
+++ b/gtksourceview/src/completioninfo.hg
@@ -49,17 +49,17 @@ public:
   CompletionInfo();
 
 #m4 _CONVERSION(`const Gtk::TextView&',`GtkTextView*',`const_cast<GtkTextView*>(($3).gobj())')
-#m4 _CONVERSION(`const Gtk::TextIter&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
+#m4 _CONVERSION(`const Gtk::TextBuffer::iterator&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
   /** Moves the CompletionInfo to @a iter. Moving will respect the
    * Gdk::Gravity setting of the info window and will ensure the line at @a iter
    * is not occluded by the window.
    *
    * @param view A Gtk::TextView on which the info window should be positioned.
-   * @param iter A Gtk::TextIter.
+   * @param iter A Gtk::TextBuffer::iterator.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(void move_to_iter(const Gtk::TextView& view, const Gtk::TextIter& iter), 
gtk_source_completion_info_move_to_iter)
+  _WRAP_METHOD(void move_to_iter(const Gtk::TextView& view, const Gtk::TextBuffer::iterator& iter), 
gtk_source_completion_info_move_to_iter)
 
   /** Moves the Gtk::CompletionInfo to the cursor position. Moving will
    * respect the Gdk::Gravity setting of the info window and will ensure the
diff --git a/gtksourceview/src/completionprovider.hg b/gtksourceview/src/completionprovider.hg
index 4d82a3d..6a5348c 100644
--- a/gtksourceview/src/completionprovider.hg
+++ b/gtksourceview/src/completionprovider.hg
@@ -130,8 +130,8 @@ public:
    */
   _WRAP_METHOD(void update_info(const Glib::RefPtr<const CompletionProposal>& proposal, const 
CompletionInfo& info), gtk_source_completion_provider_update_info)
 
-#m4 _CONVERSION(`Gtk::TextIter&',`GtkTextIter*',`($3).gobj()')
-  /** Get the Gtk::TextIter at which the completion for @a proposal starts.
+#m4 _CONVERSION(`Gtk::TextBuffer::iterator&',`GtkTextIter*',`($3).gobj()')
+  /** Get the Gtk::TextBuffer::iterator at which the completion for @a proposal starts.
    *
    * When implemented, the completion can use this information to position the
    * completion window accordingly when a proposal is selected in the completion
@@ -139,15 +139,15 @@ public:
    *
    * @param proposal A CompletionProposal.
    * @param context A CompletionContext.
-   * @param iter A Gtk::TextIter.
+   * @param iter A Gtk::TextBuffer::iterator.
    *
    * @return @c true if @a iter was set for @a proposal, @c false otherwise.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(bool get_start_iter(const Glib::RefPtr<const CompletionContext>& context, const 
Glib::RefPtr<const CompletionProposal>& proposal, Gtk::TextIter& iter), 
gtk_source_completion_provider_get_start_iter)
+  _WRAP_METHOD(bool get_start_iter(const Glib::RefPtr<const CompletionContext>& context, const 
Glib::RefPtr<const CompletionProposal>& proposal, Gtk::TextBuffer::iterator& iter), 
gtk_source_completion_provider_get_start_iter)
 
-#m4 _CONVERSION(`const Gtk::TextIter&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
+#m4 _CONVERSION(`const Gtk::TextBuffer::iterator&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
   /** Activate @a proposal at @a iter.
    *
    * When this functions returns <tt>false</tt>, the default activation of
@@ -155,14 +155,14 @@ public:
    * label of @a proposal.
    *
    * @param proposal A CompletionProposal.
-   * @param iter A Gtk::TextIter.
+   * @param iter A Gtk::TextBuffer::iterator.
    *
    * @return @c true to indicate that the proposal activation has been handled,
    * @c false otherwise.
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(bool activate_proposal(const Glib::RefPtr<CompletionProposal>& proposal, const Gtk::TextIter& 
iter), gtk_source_completion_provider_activate_proposal)
+  _WRAP_METHOD(bool activate_proposal(const Glib::RefPtr<CompletionProposal>& proposal, const 
Gtk::TextBuffer::iterator& iter), gtk_source_completion_provider_activate_proposal)
 
   /** Get with what kind of activation the provider should be activated.
    *
@@ -223,14 +223,14 @@ private:
 
 #m4 _CONVERSION(`GtkSourceCompletionContext*', `const Glib::RefPtr<const CompletionContext>&', 
`Glib::wrap($3, true)')
 #m4 _CONVERSION(`GtkSourceCompletionProposal*', `const Glib::RefPtr<const CompletionProposal>&', 
`Glib::wrap($3, true)')
-#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextIter&',`Glib::wrap_iter($3)')
-  _WRAP_VFUNC(bool get_start_iter(const Glib::RefPtr<const CompletionContext>& context, const 
Glib::RefPtr<const CompletionProposal>& proposal, Gtk::TextIter& iter), get_start_iter)
+#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextBuffer::iterator&',`Glib::wrap_iter($3)')
+  _WRAP_VFUNC(bool get_start_iter(const Glib::RefPtr<const CompletionContext>& context, const 
Glib::RefPtr<const CompletionProposal>& proposal, Gtk::TextBuffer::iterator& iter), get_start_iter)
 #m4 _CONVERSION(`GtkSourceCompletionProposal*', `const Glib::RefPtr<const CompletionProposal>&', 
`Glib::wrap($3)')
 #m4 _CONVERSION(`GtkSourceCompletionContext*', `const Glib::RefPtr<const CompletionContext>&', 
`Glib::wrap($3)')
 
 #m4 _CONVERSION(`GtkSourceCompletionProposal*', `const Glib::RefPtr<CompletionProposal>&', `Glib::wrap($3, 
true)')
-#m4 _CONVERSION(`GtkTextIter*',`const Gtk::TextIter&',`Glib::wrap_iter($3)')
-  _WRAP_VFUNC(bool activate_proposal(const Glib::RefPtr<CompletionProposal>& proposal, const Gtk::TextIter& 
iter), activate_proposal)
+#m4 _CONVERSION(`GtkTextIter*',`const Gtk::TextBuffer::iterator&',`Glib::wrap_iter($3)')
+  _WRAP_VFUNC(bool activate_proposal(const Glib::RefPtr<CompletionProposal>& proposal, const 
Gtk::TextBuffer::iterator& iter), activate_proposal)
 #m4 _CONVERSION(`GtkSourceCompletionProposal*', `const Glib::RefPtr<CompletionProposal>&', `Glib::wrap($3)')
 
   _WRAP_VFUNC(int get_interactive_delay() const, get_interactive_delay)
diff --git a/gtksourceview/src/gutterrenderer.hg b/gtksourceview/src/gutterrenderer.hg
index f97a4a8..7ee24d6 100644
--- a/gtksourceview/src/gutterrenderer.hg
+++ b/gtksourceview/src/gutterrenderer.hg
@@ -40,20 +40,20 @@ class GutterRenderer : public Gtk::Object
   _CLASS_GTKOBJECT(GutterRenderer, GtkSourceGutterRenderer, GTK_SOURCE_GUTTER_RENDERER, Gtk::Object, 
GInitiallyUnowned)
 public:
 #m4 _CONVERSION(`const Cairo::RefPtr<Cairo::Context>&', `cairo_t*', `(($3) ? ($3)->cobj() : 0)')
-#m4 _CONVERSION(`Gtk::TextIter&',`GtkTextIter*',($3).gobj())
+#m4 _CONVERSION(`Gtk::TextBuffer::iterator&',`GtkTextIter*',($3).gobj())
   _WRAP_METHOD(void begin(
                   const Cairo::RefPtr<Cairo::Context>& cr,
                   const Gdk::Rectangle& background_area,
                   const Gdk::Rectangle& cell_area,
-                  Gtk::TextIter& start,
-                  Gtk::TextIter& end), gtk_source_gutter_renderer_begin)
+                  Gtk::TextBuffer::iterator& start,
+                  Gtk::TextBuffer::iterator& end), gtk_source_gutter_renderer_begin)
 
   _WRAP_METHOD(void draw(
                   const Cairo::RefPtr<Cairo::Context>& cr,
                   const Gdk::Rectangle& background_area,
                   const Gdk::Rectangle& cell_area,
-                  Gtk::TextIter& start,
-                  Gtk::TextIter& end,
+                  Gtk::TextBuffer::iterator& start,
+                  Gtk::TextBuffer::iterator& end,
                   GutterRendererState), gtk_source_gutter_renderer_draw)
 
   _WRAP_METHOD(void end(), gtk_source_gutter_renderer_end)
@@ -116,28 +116,28 @@ public:
   _WRAP_PROPERTY("background-set", bool)
 
 #m4 _CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
-#m4 _CONVERSION(`GtkTextIter*',`const Gtk::TextIter&',`Glib::wrap_iter($3)')
-#m4 _CONVERSION(`const Gtk::TextIter&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
+#m4 _CONVERSION(`GtkTextIter*',`const Gtk::TextBuffer::iterator&',`Glib::wrap_iter($3)')
+#m4 _CONVERSION(`const Gtk::TextBuffer::iterator&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
 #m4 _CONVERSION(`GtkTooltip*', `const Glib::RefPtr<Gtk::Tooltip>&', `Glib::wrap($3, true)')
 #m4 _CONVERSION(`const 
Glib::RefPtr<Gtk::Tooltip>&',`GtkTooltip*',`const_cast<GtkTooltip*>(Glib::unwrap($3))')
 
-  _WRAP_SIGNAL(bool query_tooltip(const Gtk::TextIter& iter,
+  _WRAP_SIGNAL(bool query_tooltip(const Gtk::TextBuffer::iterator& iter,
                                   const Gdk::Rectangle& area,
                                   int x,
                                   int y,
                                   const Glib::RefPtr<Gtk::Tooltip>& tooltip), "query-tooltip")
 
-  _WRAP_SIGNAL(void activate(const Gtk::TextIter& iter,
+  _WRAP_SIGNAL(void activate(const Gtk::TextBuffer::iterator& iter,
                              const Gdk::Rectangle& area,
                              GdkEvent* event), "activate")
 
   _WRAP_SIGNAL(void queue_draw(), "queue-draw")
 
-  _WRAP_SIGNAL(void query_data(const Gtk::TextIter& start,
-                               const Gtk::TextIter& end,
+  _WRAP_SIGNAL(void query_data(const Gtk::TextBuffer::iterator& start,
+                               const Gtk::TextBuffer::iterator& end,
                                GutterRendererState state), "query-data")
 
-  _WRAP_SIGNAL(bool query_activatable(const Gtk::TextIter& iter,
+  _WRAP_SIGNAL(bool query_activatable(const Gtk::TextBuffer::iterator& iter,
                                       const Gdk::Rectangle& area,
                                       GdkEvent* event), "query-activatable")
 
@@ -145,19 +145,19 @@ protected:
   _CTOR_DEFAULT()
 
 #m4 _CONVERSION(`cairo_t*',`const Cairo::RefPtr<Cairo::Context>&',`Cairo::RefPtr<Cairo::Context>(new 
Cairo::Context($3, false))')
-#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextIter&',`Glib::wrap_iter($3)')
+#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextBuffer::iterator&',`Glib::wrap_iter($3)')
 
   _WRAP_VFUNC(void begin(const Cairo::RefPtr<Cairo::Context>& cr,
                          const Gdk::Rectangle& background_area,
                          const Gdk::Rectangle& cell_area,
-                         Gtk::TextIter& start,
-                         Gtk::TextIter& end), begin)
+                         Gtk::TextBuffer::iterator& start,
+                         Gtk::TextBuffer::iterator& end), begin)
 
   _WRAP_VFUNC(void draw(const Cairo::RefPtr<Cairo::Context>& cr,
                         const Gdk::Rectangle& background_area,
                         const Gdk::Rectangle& cell_area,
-                        Gtk::TextIter& start,
-                        Gtk::TextIter& end,
+                        Gtk::TextBuffer::iterator& start,
+                        Gtk::TextBuffer::iterator& end,
                         GutterRendererState), draw)
 
   _WRAP_VFUNC(void end(), end)
diff --git a/gtksourceview/src/view.hg b/gtksourceview/src/view.hg
index d21625a..0a15107 100644
--- a/gtksourceview/src/view.hg
+++ b/gtksourceview/src/view.hg
@@ -248,7 +248,7 @@ public:
    */
   _WRAP_METHOD(gint get_indent_width() const, gtk_source_view_get_indent_width)
 
-#m4 _CONVERSION(`const Gtk::TextIter&',`const GtkTextIter*',`($3).gobj()')
+#m4 _CONVERSION(`const Gtk::TextBuffer::iterator&',`const GtkTextIter*',`($3).gobj()')
   /** Determines the visual column at @a iter taking into consideration the indent
    *  width of @a view.
    *
@@ -258,7 +258,7 @@ public:
    *
    * @newin{3,0}
    */
-  _WRAP_METHOD(guint get_visual_column(const Gtk::TextIter& iter) const, gtk_source_view_get_visual_column)
+  _WRAP_METHOD(guint get_visual_column(const Gtk::TextBuffer::iterator& iter) const, 
gtk_source_view_get_visual_column)
 
   /** Returns the Gutter object associated with @a window_type for this
    *  view.
@@ -338,18 +338,18 @@ public:
    */
   _WRAP_SIGNAL(void undo(), "undo")
 
-#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextIter&',`Glib::wrap_iter($3)')
-#m4 _CONVERSION(`Gtk::TextIter&',`GtkTextIter*',`($3).gobj()')
+#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextBuffer::iterator&',`Glib::wrap_iter($3)')
+#m4 _CONVERSION(`Gtk::TextBuffer::iterator&',`GtkTextIter*',`($3).gobj()')
   /** Emitted when a line mark has been activated (for instance when there
    *  was a button press in the line marks gutter).
    *
    * You can use @a iter to determine on which line the activation took place.
    *
    * @par Handler parameters:
-   * iter A Gtk::TextIter.
+   * iter A Gtk::TextBuffer::iterator.
    * event The GdkEvent that activated the event.
    */
-  _WRAP_SIGNAL(void line_mark_activated(Gtk::TextIter& mark, GdkEvent* event), "line-mark-activated")
+  _WRAP_SIGNAL(void line_mark_activated(Gtk::TextBuffer::iterator& mark, GdkEvent* event), 
"line-mark-activated")
 
   /** Emitted when a the cursor was moved according to the smart home end setting.
    *
@@ -358,12 +358,12 @@ public:
    * cursor was moved by a normal home/end or by a smart home/end.
    *
    * @par Handler parameters:
-   * iter A Gtk::TextIter
+   * iter A Gtk::TextBuffer::iterator
    * count The count
    *
    * @newin{3,0}
    */
-  _WRAP_SIGNAL(void smart_home_end(Gtk::TextIter& iter, int count), "smart-home-end", no_default_handler)
+  _WRAP_SIGNAL(void smart_home_end(Gtk::TextBuffer::iterator& iter, int count), "smart-home-end", 
no_default_handler)
 
   // these are keybinding signals, so we ignore them.
   _IGNORE_SIGNAL(show-completion)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]