GObject-Introspection, ignoring private Structs

Well I have not much hope that someone may know it, but as ebassi recently gave me the great hing about array length fields, it may make some sense to ask again…

In the gir files we have listed all the private structs, for example

    <record name="ButtonPrivate" c:type="GtkButtonPrivate" disguised="1">

Currently I am generating code for these private structs in the same way as for non private structs – does not hurt, but is an useless effort.

So I would like to skip the private structs in a similar manner as I do it for the class structs using


I could do it by using the type names – ignore whenever name contains string “Private”. But that may be dangerous, I may leave out important types.

I have the feeling that flag disguised=“1” in gir files may be exactly what i need. But how can I query that flag from GObject-Introspection API? I think I have read full API docs, and asked Google. Still no idea. Well carefully investigation the GObject-Introspection source code may help, but I think I will delay that at least to next winter…

Basically, ignoring things with “Private” in their name is what Vala does (mind it parses the XML files):


That is interesting, thanks for that info. Then I will try to do the same.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.