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

ApWidget()

Determine the widget that initiated a link callback

Synopsis:

#include <Ap.h>

PtWidget_t *ApWidget( PtCallbackInfo_t *cbinfo );

Description:

ApWidget() is used within module setup functions to determine the widget that initiated the link callback.

Returns:

A pointer to the initiating widget.

Examples:

mysetup_function( ..., PtCallbackInfo_t cbinfo ) {
    if (ApName(ApWidget(cbinfo)) == ABN_widget1) {
        /* setup based on widget1 */
    } else {
        if (ApName(ApWidget(cbinfo)) == ABN_widget2) {
            /* setup based on widget2 */
        } else {
            /* common setup */
        }
    }
    return( Pt_CONTINUE );
}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

For another method of determining the widget that initiated a link callback, see the ApInfo_t structure.


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