Which version of GTK+ are you aiming your application for? I had a quick look at your source and it appears to be a version of GTK+ 2. Cairo starting being used with version 2.8. Your code uses various deprecated functions left over from the transition from GTK+ v1 to GTK+ v2.0.
Cairo is a drawing library and not a widget library. It is used by GTK+ to draw the widgets and you can also use it to do your own drawing or if you create your own widgets use Cairo to do the drawing.
Yes you can draw basic text with Cairo although if you want much more effect you would use Pango. Looking at your code you are using the GDK library to do your drawing. You can also use this library to draw text and if you intend to stay with GTK v2 for a while then this may be the best way to start while changing the deprecated stuff before moving on to Cairo.
Thanks for the reply. That's all probably accurate. I wasn't there at the beginning of the project, and haven't been in contact with the originator for over 10 years.
What you outline is exactly the way I want to go. I just don't know how, and the documentation I've found is just plain daunting. If you're experienced with the new styles it probably all looks obvious, but from where I am, it's mysterious.
I'm on Xubuntu saucy (13.10), using libgtk2.0 (version 2.24.20-1ubuntu1), and my configuration pulls in (amongst other things) libcairo2 (version 1.12.16-0ubuntu2)
As it stands, my drawing is limited to stroking lines and filling rectangles. Nothing scrolls. As you note, it uses a bunch of deprecated calls. I'd be happy to replace them if I knew how, but the most pressing thing for me at the moment is to place a few words as captions on the drawings. I see no need for pango at present, but when I have some integrated help, I'll probably want it.
My intent is to replace the deprecated stuff, get it all working, and then target GTK 3. I find the documentation on the GTK site a good reference for things I'm already using, but pretty confusing for the stuff I want to do. And the tutorials I've found aren't any better. The way my mind works, I need a simple but working example and all I'm finding is fragments.
If there's better beginner stuff out there, I'd love to know it.