Yes, the entire function must be used, but it is included in a source file that uses the same license as Geany.
Yes, GTK has removed this user interface interaction, but it is useful, perhaps not for you. It's like menu icons, GTK 3 has spent time explaining to everyone that we need to delete them, and it looks like GTK 4 will delete them.
Same thing for the [treeview zebra/even-odd row styling](https://user-images.githubusercontent.com/31816829/81144172-ceb1ef00-8f73-11...), the possibility to use one color for even row and another for odd row from CSS, was removed. But for some people like me, it's useful.
About the proposed snippet, I tried new things. Since GTK 3.24 we can use GtkEventController, but the first scroll event is ignored (example links: [link1](https://github.com/luigifab/awf-extended/blob/a8489cda0196e473da4960e1a5d68e...) and [link2](https://github.com/luigifab/awf-extended/blob/a8489cda0196e473da4960e1a5d68e...) and [link3](https://github.com/luigifab/awf-extended/blob/a8489cda0196e473da4960e1a5d68e...), that's also true, I'm a noob in C language).