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::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: Now should be: If there was: Nothing needs to be changed. If there was: Now should be:
-
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
-
Replaced Glib::Handle<> with std::vector<> - that means that passing std::list<> or std::deque<> is now not supported. Affected methods are:
-
Gsv::Markup now has operator const void instead of operator bool, so implicit casts to int are avoided.