I migrated from gtk3 to gtk4, thus wanted to give a try to gtksourceview-5.0. I successfully compiled and installed it but having hard time figuring it out for my purposes. For example for gtksourceviewmm-3 there is ; https://gitlab.gnome.org/GNOME/gtksourceviewmm/-/blob/3.91.1/tests/basic/main.cc?ref_type=tags) this for a minimal example. Can anybody direct me to the API page and a minimal working example for gtksourceview-5 ? I can’t seem to find any useful resource when I checked around.
I don’t know if C++ (gtksourceviewmm) APIs are available for the version 5, if not the standard C APIs should work from C++ code too.
Most of the APIs are unchanged, I remember the only big change on my side was to migrate my GtkSourceCompletion code to the new async APIs. There were also some small changes in the buffer history management, which is now inherited from GtkTextView.
GtkWindow inherits from GtkWidget, so you can use the GTK_WINDOW(window) to cast window (which is definitively a window because you used gtk_window_new ()) to a GtkWindow type like you do for other calls. I’ve adjusted my post.