Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apname.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apname.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apname.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apname.html on line 8

ApName()

Return a PhAB name value for the specified widget

Synopsis:

#include <Ap.h>

int ApName( PtWidget_t *widget );

Arguments:

widget
A pointer to the widget whose PhAB name you want to get.

Library:

Ap

Description:

ApName() returns a PhAB name value for the specified widget. You can compare this name value with the global name values that PhAB generates for your application code. These name values make it easier to access and compare widgets in callback functions. It also lets you use the same callback function for more than one widget.

Returns:

A PhAB name value, or -1 if the widget doesn't have a name.

Examples:

my_callback( PtWidget_t *widget, ... )
{
    if ( ApName( widget ) == ABN_widget1 ) {
        /* do widget1 processing */
    } else {
        if ( ApName( widget ) == ABN_widget2 ) {
            /* do widget2 processing */
        } else {
            /* do something else? */
        }
    }
}

Note: ABN_widget1 and ABN_widget2 are name values generated by PhAB for widgets in your application with instance names of widget1 and widget2.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

Variables and manifests in the Working With Code chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apname.html on line 134

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apname.html on line 134