PhAB information structure
#include <Ap.h>
typedef struct {
short reason;
PtWidget_t *widget;
} ApInfo_t;
This structure is used as the second argument to most functions generated by PhAB, including code callbacks and module-setup functions.
The possible values for reason are:
| Value | Description |
|---|---|
| ABR_PRE_REALIZE | Pre-realize setup function |
| ABR_POST_REALIZE | Post-realize setup function |
| ABR_CODE | Code-type callback |
| ABR_DONE | Done-type callback |
| ABR_CANCEL | Cancel-type callback |
The widget argument is a pointer to the widget that invoked the callback function. This is very useful in setup functions to determine which widget initiated the link callback.
Photon
PtCallback_t in the Photon Widget Reference
"Module setup functions" and "Code-callback functions" in the Working with Code chapter of the Photon Programmer's Guide