gobject-introspection bindings: how to get gtype for enum type?



Hi,

I have started writing [1]gobject-introspection bindings for the
[2]Yorick language.

 [1] https://github.com/paumard/yorick-gy
 [2] http://yorick.sourceforge.net/

It is much simpler than I initially envisioned (although I'm sure this
initial implementation is very... naive), but I must say I wasn't able
to find actual documentation about how it's supposed to be done and
basic concepts... So i'm browsing through devhelp and grepping through
the PyGObject source, but I'm stuck at that one:

I want to implement setting GObject properties during initialization
with g_object_newv().

When the property is of an Enum type, I need to find the gtype
corresponding to the exact Enum type. What I have in my hands is the
GIPropertyInfo for the property, which yields the GITypeInfo for the
Enum type. How do I get from here to there?

Kind regards, Thibaut.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]