Installs the property visibility handler function.
GSErrCode ACAPI_Install_PropertyVisibilityHandler ( APIPropertyVisibilityHandlerProc* handlerProc );
Parameters
- handlerProc
- [in] The property visibility handler function.
Return Values
NoError
- The function has completed with success.
For other common API errors see the API Errors document.
Remarks
This function should be called from the Initialize
function of the add-on, after registering the property handler with ACAPI_Register_PropertyVisibilityHandler
.
Example
//------------------------------------------------------ // Called after the add-on has been loaded into memory //------------------------------------------------------ GSErrCode __ACENV_CALL APIMenuCommandProc_Main (const API_MenuParams *menuParams); bool __ACENV_CALL PropertyVisibilityHandler (API_PropertyVisibilityMode visibilityMode, const GS::Array<API_Guid>& classificationGuids, const API_Guid& propertyDefinitionGuid); GSErrCode __ACENV_CALL Initialize (void) { GSErrCode err = ACAPI_Install_MenuHandler (32500, APIMenuCommandProc_Main); if (err != NoError) { return err; } err = ACAPI_Install_PropertyVisibilityHandler (PropertyVisibilityHandler); if (err != NoError) { return err; } ACAPI_KeepInMemory (true); return NoError; }
Requirements
- Version: API 21 or later
- Header: ACAPinc.h