Callback function to handle changes in the toolbox.
typedef GSErrCode APIToolChangeHandlerProc ( const API_ToolBoxItem* newToolMode );
Parameters
- newToolMode
- [in] The toolbox mode the user switched to.
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 toolbox item changes with ACAPI_Notify_CatchToolChange.
Example
// ----------------------------------------------------------------------------- // Toolbox item change handler function // ----------------------------------------------------------------------------- static GSErrCode __ACENV_CALL ToolChangeHandlerProc (const API_ToolBoxItem *newToolMode) { char msgStr[256]; char elemStr[32]; if (newToolMode->type == API_ZombieElemID) CHCopyC ("Arrow or Marquee", elemStr); else if (!GetElementTypeString (newToolMode->type, elemStr)) CHCopyC ("Unknown", elemStr); sprintf (msgStr, "%s toolbox mode selected", elemStr); ACAPI_WriteReport (msgStr, false); return NoError; } // ToolChangeHandlerProc
Requirements
- Version: API 4.1 or later
- Header: APIdefs_Callback.h
See Also
API_ToolBoxItem,>br> ACAPI_Notify_CatchToolChange, API Functions