gobj_child_by_index()

gobj_child_by_index()#

gobj_child_by_index() returns the child of a given hgobj at the specified index, where the index is relative to 1.

Prototype

hgobj gobj_child_by_index(
    hgobj gobj,
    size_t idx
);

Parameters

Key

Type

Description

gobj

hgobj

The parent hgobj whose child is to be retrieved.

idx

size_t

The index of the child to retrieve, starting from 1.


Return Value

Returns the child hgobj at the specified index, or NULL if the index is out of bounds.

Notes

If idx is greater than the number of children, the function returns NULL.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples