GObject lacks accessible introduction
Submitted by Sodhi, Cedric
Link to original bug (#658766)
Description
I hope this doesn't sound like too much of a rant, though it probably is, as so far I have no means of providing actual constructive suggestions. I'm hitting a wall with the introduction to Gobject which I blame mostly on the fact, that the documentation tries to explain the general concepts without actually going deep enough to be applicable. It's like trying to learn science based upon popular science literature: At the end of the day you can lengthly explain what it's all about but you still really have no clue how to do it.
I think a good start would be if the code snippets would, at least at parts, not only be snippets but actually working, nonetheless minimal examples (forgoing the boilerplate parts like includes, if you like).
In particular I struggle with understanding what I as a user have to do and what the GType system does for me.
In particular, one single, but very precise and elaborate description of the chain of events would be particularly helpful. I appreciate the tables at the end of most of the introductory sections, but they are again very general and, standing alone, do not help putting the concepts to use. Something like
User calls g_type_create_instance( Desired GType ) => GType System looks up memory required and allocates it => GType System calls XYZ (is XYZ a user defined function or part of GType?) ... etc
would greatly help. It poses a great problem that even at the pointer where the GObject as an example for what uses GObject is introduced, I have not the slightest clue how I would create a simple GObject, what the initialisation functions which I specify in GTypeInfo have to do, who allocates the memory where, when and how, and what exactly I have to provide for GType so I get a created object.
Version: 2.29.x