GLib, and therefore a system like GTK is slightly different from a system like C. GLib is developed in C, and therefore it cannot have real classes, like in C ++, C # or Java. Therefore, they need to somehow imitate. Each object is actually a structure (in this case, the _GtkMisc structure), which has a class field that is initialized when a type (class) is registered. Type input macros check this field value, and if the "object" is inherited from the requested type (in this case, from GtkMisc), it is "assigned" to this. If not, this will give you an error, so if you are not sure, you can check this with the GTK_IS _ * () macros, for example
if (GTK_IS_MISC(label)) gtk_misc_set_alignment(label);
In the second part, the spaces before the braces are part of the coding standards of the Gnome team, which, to my knowledge, are derived from the GNU coding standards.
source share