Register or unregister your add-on to be notified of Project Navigator changes.
    GSErrCode  ACAPI_Notify_CatchViewEvent (
        GSFlags                      eventTypes,
        API_NavigatorMapID           mapId,
        APIViewEventHandlerProc*     handlerProc
    );
    
Parameters
- eventTypes
- [in] A combination of different API_NotifyViewEventID values, specifying the types of project navigator events you are interested in.
- mapId
- [in] Specifies the project navigator map you are interested in.
- handlerProc
- [in] The callback procedure to call when notifications are sent out… Specifying nullptrhere means you don’t need the notifications any more.
Return Values
- NoError
- The requested operation finished successfully.
- APIERR_BADPARS
- The eventTypesparameter is invalid.
For other common API errors see the API Errors document.
Remarks
This function enables the API tool add-on catch the changes of Project Navigator items in the specified map. Each time when a navigator item is inserted, modified, deleted or opened the server application calls the supplied handlerProc of your those add-ons which have been registered for this event previously.
If you do not need to catch any project navigator event of the specified map any longer, please remember to unregister by calling ACAPI_Notify_CatchViewEvent for the required map with nullptr in the handlerProc parameter.
Example
ACAPI_Notify_CatchViewEvent (APINotifyView_Inserted | APINotifyView_Deleted | APINotifyView_Modified, API_PublicViewMap, ViewNotificationHandlerProc); ACAPI_Notify_CatchViewEvent (API_AllViewNotificationMask, API_MyViewMap, nullptr);
Requirements
- Version: API 10 or later
- Header: ACAPinc.h
See Also
API_NavigatorMapID, APIViewEventHandlerProc
Notification Manager, API Functions