gtksourceviewmm 3.18.0

Migration from 2.0 to 3.0

This page lists some notable API/ABI breaks. Probably not all were listed, but this is provided in hope that with help of this page migrating from gtksourceviewmm-2.0 to 3.0 won't be a cause of headaches.

- Stuff marked as deprecated was removed of course.
- Removed Source prefix from all types, SOURCE_ prefix from all enum value names and source prefix from all file names. There is a helper script called source_truncate.pl in git repository in codegen directory to aid programmer in boring task of renaming everything.
- "source-mark-updated" signal in Gsv::Buffer now takes Gtk::TextMark instead of Mark.
- Vfuncs in Gsv::CompletionProposal, Gsv::CompletionProvider and Gsv::UndoManager are now private. They shouldn't be called directly anyway - there are respective methods for this.
- Some methods now takes std::string instead of Glib::ustring. These are:
  - Gsv::LanguageManager::get_search_path()
  - Gsv::LanguageManager::set_search_path()
  - Gsv::LanguageManager::get_language_ids()
  - Gsv::LanguageManager::get_language()
  - Gsv::LanguageManager::guess_language()
  - Gsv::StyleSchemeManager::set_search_path()
  - Gsv::StyleSchemeManager::get_search_path()
  - Gsv::StyleSchemeManager::append_search_path()
  - Gsv::StyleSchemeManager::prepend_search_path()
  - Gsv::StyleSchemeManager::get_scheme()
  - Gsv::StyleSchemeManager::get_scheme_ids()
- Gsv::Mark's constructor with category and name has parameter order the same as C gtk_source_mark_new(). Previously parameter order was reversed, because name parameter could be omitted - it has a default value of empty string, which was interpreted as creating anonymous Gsv::Mark. Now there is separate constructor for creating anonymous SourceMarks. If there was:
  Glib::RefPtr<Gsv::Mark> sm (Gsv::Mark::create ("category", "name"));
  Gsv::Mark::create
  static Glib::RefPtr< Mark > create(const Glib::ustring &category)
  Creates an anonymous text mark.
  Now should be:
  Glib::RefPtr<Gsv::Mark> sm (Gsv::Mark::create ("name", "category"));
  If there was:
  Glib::RefPtr<Gsv::Mark> sm (Gsv::Mark::create ("category"));
  Nothing needs to be changed. If there was:
  Glib::RefPtr<Gsv::Mark> sm (Gsv::Mark::create ("category", ""));
  Now should be:
  Glib::RefPtr<Gsv::Mark> sm (Gsv::Mark::create ("category"));
- If there is a code that somehow depended on Gsv::StyleScheme being a Glib::Interface, then this code is wrong, because it should always be a Glib::Object.
- SourceIter is gone - all its features are now supported by Gtk::TextIter.
- Gsv::Completion is now a Glib::Object, not Gtk::Object. So it should be used as Glib::RefPtr<Gsv::Completion> instead of plain Gsv::Completion.
- Namespace gtksourceview was renamed to Gsv. If there is a lot of code using gtksourceview namespace then a workaround would be creating a backward compatibility header and including it a place included by affected sources. A header could contain a lines like that:
  #ifndef GTKSOURCEVIEWMM_COMPAT_H
  #define GTKSOURCEVIEWMM_COMPAT_H
  namespace gtksourceview = Gsv;
  #endif // GTKSOURCEVIEWMM_COMPAT_H
  Gsv
  Definition buffer.h:51
- Replaced Glib::* Handle<> with std::vector<> - that means that passing std::list<> or std::deque<> is now not supported. Affected methods are:
  - Gsv::Buffer::get_source_marks_at_line()
  - Gsv::Buffer::get_source_marks_at_iter()
  - Gsv::Buffer::get_context_classes_at_iter()
  - Gsv::Completion::get_providers()
  - Gsv::Completion::show()
  - Gsv::CompletionContext::add_proposals()
  - Gsv::Language::get_mime_types()
  - Gsv::Language::get_globs()
  - Gsv::Language::get_style_ids()
  - Gsv::LanguageManager::get_search_path()
  - Gsv::LanguageManager::set_search_path()
  - Gsv::LanguageManager::get_language_ids()
  - Gsv::StyleScheme::get_authors()
  - Gsv::StyleSchemeManager::get_search_path()
  - Gsv::StyleSchemeManager::set_search_path()
  - Gsv::StyleSchemeManager::get_scheme_ids()
- Gsv::Markup now has operator const void* instead of operator bool, so implicit casts to int are avoided.