APIDefaultsChangeHandlerProc

Callback procedure to receive notifications on changes in element defaults.

    typedef GSErrCode  APIDefaultsChangeHandlerProc (
        const API_ToolBoxItem*     defElemType
    );

 

Parameters

defElemType
[in] The element type the notification is coming for.

 

Return Values

NoError
The function has completed with success.

For other common API errors see the API Errors document.

 

Remarks

This is the function which will be called when your add-on requested notifications on element default chnages with ACAPI_Notify_CatchChangeDefaults.

 

Example


// -----------------------------------------------------------------------------
// Defaults change handler function
// -----------------------------------------------------------------------------
static GSErrCode __ACENV_CALL DefaultsChangeHandlerProc (const API_ToolBoxItem *defElemType)
{
    char    msgStr[256];
    char    elemStr[32];

    if (GetElementTypeString (defElemType->typeID, elemStr))
        sprintf (msgStr, "%s element type defaults changed", elemStr);
    else
        sprintf (msgStr, "Unknown element type defaults changed");

    ACAPI_WriteReport (msgStr, false);

    return NoError;
}   // DefaultsChangeHandlerProc

 

Requirements

Version: API 4.1 or later
Header: APIdefs_Callback.h

 

See Also

API_ToolBoxItem,
ACAPI_Notify_CatchChangeDefaults, API Functions