(gtype)
return [_to_string(g_enum_class.values[i].value_nick)
            for i in range(g_enum_class.n_values - 1)]
Get all values for a enum (gtype).
Get all values for a enum (gtype).
Get all values for a enum ( gtype ) .
def values_for_enum(gtype):
    """Get all values for a enum (gtype)."""

    g_type_class = gobject_lib.g_type_class_ref(gtype)
    g_enum_class = ffi.cast('GEnumClass *', g_type_class)

    # -1 since we always have a "last" member.
    return [_to_string(g_enum_class.values[i].value_nick)
            for i in range(g_enum_class.n_values - 1)]
def values_for_enum ( gtype ) : g_type_class = gobject_lib . g_type_class_ref ( gtype ) g_enum_class = ffi . cast ( 'GEnumClass *' , g_type_class ) # -1 since we always have a "last" member. return [ _to_string ( g_enum_class . values [ i ] . value_nick ) for i in range ( g_enum_class . n_values - 1 ) ]