Recently I discovered that a PyGTK book exists – never heard about that one before. Seems to be a clone of the C book from 2007 of Mr. A. Krause.
And finally, we have some Nim bindings with a mini tutorial too:
[EDIT] I just remembered the DEVHELP tool, which is designed to discover the GTK C API. I think it is very helpful to find structures and functions fast, also for languages other than C. I used it a lot when I wrote the experimental NEd Nim editor some years ago. I just launched it again, seems still to work, but fired some errors messages unfortunately: “(devhelp:1988): GLib-CRITICAL **: 07:41:58.732: g_source_set_ready_time: assertion ‘source->priv != NULL’ failed”
I have just discovered it, had not time to really read it. I assume that you have a very good understanding of GTK3 and maybe upcoming GTK4 and do not teach us only old GTK2 stuff already covered by Andrew Krauses book, so then we maybe can translate the contents to other languages too. I would be interested to do it for Nim then, maybe others can do it for Rust, C++, Python or even plain C.
I have his book and I do refer to it from time to time, but for the most part, I’ve just struck out on my own and I follow my nose. My aim is to provide answers to 95% of the questions the average developer may have when it comes to GTK.
And anything that’s been deprecated I don’t mention. One of my aims is to make this blog as future-proof as possible within human limitations.
I haven’t yet started on GTK 4, but I’m aware of the pending release. Once it’s ready, I’ll check to see what’s changed and/or deprecated and make the necessary adjustments to my examples and documentation.
I’ve been thinking about how I might write a coder’s Rosetta stone, a guide to translating the examples on the blog into other languages. I’m not sure yet how involved this would be and I’ve got a lot on my plate ATM, but it’s an intriguing idea.
I just did a short investigation of your current tutorial. My impression is, that currently most is still GTK2 based, for example GAction/GMenu is not yet covered (that is something I have to read about soon, as I can not remember. And yes I know ebassi, there is a chapter in gtk howdoI, will read that. ) I also looked at some of your example code, it is nice that you provide full self contained stand alone examples for all of your explanations.
I was a bit confused about line 8
import gtk.EventBox; // Labels can’t have a background color, so we pack them in EventBoxes which can
Sure can labels have background, it is done with Css. I know some people say that it is not easy enough, so I provide a Nim example in
It is in the middle of that page, above is the C code from which it was derived.
Do you know which GTK3 version is currently supported by D-Lang? Are the D GTK language bindings done by Gobject-Introspection?
Well, google already answered my last question: DGTK is indeed gobject introspection based and latest version is actual 3.24. (https://github.com/gtkd-developers/GtkD) I am indeed surprised that there seems to exists still some activity concerning the D-lang GTK3 bindings…
One note for your blog posts, maybe it would be nice to add some more pictures. In these days younger people often have mental problems reading pure text, they need pictures and even videos. (People even create videos to teach programming and programming languages – I still wonder if that is why the authors have trouble writing text, or why the youtube watchers have trouble reading. Well both reasons seems to be strange, must be difficult programming software without reading capacity.)