Python: get all values of a GObject.GEnum

Ralf Sippl ralf.sippl at
Thu May 9 17:22:48 UTC 2019

In C, this works:

values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;

In Python, this

value_type = param.value_type
if value_type.is_a(GObject.GEnum):
    values = GObject.TypeClass.ref(value_type).values

fails with an AttributeError: 'TypeClass' object has no attribute 'values'

What is the Python mapping of G_ENUM_CLASS (g_type_class_ref(...))?

Sent from:

More information about the gstreamer-devel mailing list