gobj_walk_gobj_childs_tree()

gobj_walk_gobj_childs_tree()#

Traverses the child objects of a given hgobj in a specified order and applies a callback function to each child.

Prototype

int gobj_walk_gobj_childs_tree(
    hgobj         gobj,
    walk_type_t   walk_type,
    cb_walking_t  cb_walking,
    void         *user_data,
    void         *user_data2
);

Parameters

Key

Type

Description

gobj

hgobj

The parent hgobj whose child objects will be traversed.

walk_type

walk_type_t

Specifies the traversal order, such as WALK_TOP2BOTTOM, WALK_BOTTOM2TOP, or WALK_BYLEVEL.

cb_walking

cb_walking_t

A callback function that is applied to each child hgobj.

user_data

void *

User-defined data passed to the callback function.

user_data2

void *

Additional user-defined data passed to the callback function.


Return Value

Returns 0 on success or a negative value if an error occurs.

Notes

The callback function should return 0 to continue traversal, a negative value to stop traversal, or a positive value to skip the current branch when using WALK_TOP2BOTTOM.

Prototype

// Not applicable in JS

Prototype

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