Graphisoft®

API Development KitVersion: 18

APIProjectEventHandlerProc

프로젝트의 변경사항들에 대한 알림들을 받기 위한 콜백 함수입니다.

    typedef GSErrCode  APIProjectEventHandlerProc (
        API_NotifyEventID     notifID,
        Int32                 param
    );

 

파라미터

notifID
[in] 알림의 대상이 되는 프로젝트 이벤트의 타입입니다.
param Featuring API 10
[in] 이 파라미터는 notifIDAPINotify_ChangeLibrary일 때에만 유효합니다. 만약 개별적인 라이브러리 파트가 라이브러리에서 변경되었으면, (예. 라이브러리 안에 추가됨) 이 파라미터는 해당 라이브러리 파트의 인덱스를 포함합니다.

 

리턴 값

NoError
함수가 성공적으로 완료되었습니다.

다른 공통 API 오류들에 대해서는 API 오류 문서를 보십시오.

 

설명

이것은 ACAPI_Notify_CatchProjectEvent로 프로젝트 이벤트들에 대하여 애드온들이 알림들을 요청 받았을 때 이 함수가 호출될 것입니다.

 

예제

// -----------------------------------------------------------------------------
// 프로젝트 이벤트 핸들러 함수
// -----------------------------------------------------------------------------
static GSErrCode __ACENV_CALL    NotificationHandler (API_NotifyEventID notifID, Int32 param)
{
    char    msgStr[256] = { '\0' };

    switch (notifID) {
        case APINotify_New:                CHCopyC ("APINotify_New", msgStr);             break;
        case APINotify_NewAndReset:        CHCopyC ("APINotify_NewAndReset", msgStr);     break;
        case APINotify_Open:               CHCopyC ("APINotify_Open", msgStr);            break;
        case APINotify_PreSave:            CHCopyC ("APINotify_PreSave", msgStr);         break;
        case APINotify_Save:               CHCopyC ("APINotify_Save", msgStr);            break;
        case APINotify_Close:              CHCopyC ("APINotify_Close", msgStr);           break;
        case APINotify_Quit:               CHCopyC ("APINotify_Quit", msgStr);            break;

        case APINotify_SendChanges:        CHCopyC ("APINotify_SendChanges", msgStr);     break;
        case APINotify_ReceiveChanges:     CHCopyC ("APINotify_ReceiveChanges", msgStr);  break;

        case APINotify_ChangeProjectDB:    CHCopyC ("APINotify_ChangeProjectDB", msgStr); break;
        case APINotify_ChangeWindow:       CHCopyC ("APINotify_ChangeWindow", msgStr);    break;
        case APINotify_ChangeFloor:        CHCopyC ("APINotify_ChangeFloor", msgStr);     break;
        case APINotify_ChangeLibrary:      if (param != 0)
                                               sprintf (msgStr, "APINotify_ChangeLibrary for library part #%ld", param);
                                           else
                                               CHCopyC ("APINotify_ChangeLibrary", msgStr);
                                           break;
    }

    ACAPI_WriteReport (msgStr, false);

    return NoError;
}   // NotificationHandler

 

요구사항

버전: API 4.1 또는 이후
헤더: APIdefs_Callback.h

 

참고사항

API_NotifyEventID
ACAPI_Notify_CatchProjectEvent
API 함수