[Previous] [Contents] [Index] [Next]

PtContainerChildRedirect()

Set the pointer to the child-redirector function

Synopsis:

int PtContainerChildRedirect( 
        PtWidget_t *container,
        PtWidget_t *(*redirect)( 
            PtWidget_t  *container,
            PtWidgetClassRef_t *child_class_ref ));

Description:

This function sets the provided container's child-redirector function to the given redirect function. The child-redirector function is invoked whenever a user attempts to create a widget within the immediate child of container.

The container parameter in the callback must be a pointer to the container itself. The child_class_ref pointer points to the child's class reference, which indicates what class of widget is being created.

The PtWidget_t * return type of your redirector function will be used as the ultimate parent of the newly created widget.

Returns:

0
Successful completion.
-1
An error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtCompoundRedirect()


[Previous] [Contents] [Index] [Next]