PtAddCallbacks()

Add several callback entries to a callback list

Synopsis:

void PtAddCallbacks(
        PtWidget_t *widget,
        unsigned long callback_type,
        PtCallback_t const *callback_defs,
        unsigned int num_callbacks );

Library:

ph

Description:

This function adds the number of callbacks specified by num_callbacks to the callback list specified by callback_type (e.g. Pt_CB_ACTIVATE).


Note: Some types of callback resources have special routines that you should use instead of this one:
Pt_CB_FILTER
PtAddFilterCallback() or PtAddFilterCallbacks()
Pt_CB_HOTKEY
PtAddHotkeyHandler()
Pt_CB_RAW
PtAddEventHandler() or PtAddEventHandlers()

The callback_defs argument contains the address of an array of PtCallback_t structures. See the Photon Widget Reference.

Examples:

PtWidget_t *widget
PtCallback_t callbacks[]={
    my_first_callback, NULL ,
    my_second_callback, "Number 2",
    my_last_callback, NULL
    };
…
PtAddCallbacks( widget, Pt_CB_ACTIVATE, callbacks, 3 );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAddCallback(), PtAddEventHandler(), PtAddEventHandlers(), PtAddFilterCallback(), PtAddFilterCallbacks(), PtAddHotkeyHandler(), PtRemoveCallback(), PtRemoveCallbacks(),

PtCallback_t in the Photon Widget Reference

Managing Widgets in Application Code chapter of the Photon Programmer's Guide