GObject.type_next_base

function type_next_base(leaf_type: GObject.Type, root_type: GObject.Type): GObject.Type {
    // Gjs wrapper for g_type_next_base()
}
  

Given a leaf_type and a root_type which is contained in its anchestry, return the type that root_type is the immediate parent of. In other words, this function determines the type that is derived directly from root_type which is also a base class of leaf_type. Given a root type and a leaf type, this function can be used to determine the types and order in which the leaf type is descended from the root type.

leaf_type

descendant of root_type and the type to be returned

root_type

immediate parent of the returned type

Returns

immediate child of root_type and anchestor of leaf_type