module CTongNotificationVariables use CVoidEventHandlerCollection use CIActionReference implicit none logical :: TongNotification = .false. procedure (ActionBool), pointer :: TongNotificationPtr public type(VoidEventHandlerCollection) :: OnTongNotificationChange private :: TongNotification contains subroutine Set_TongNotification(v) implicit none logical , intent(in) :: v #ifdef ExcludeExtraChanges if(TongNotification == v) return #endif TongNotification = v if(associated(TongNotificationPtr)) call TongNotificationPtr(TongNotification) #ifdef deb print*, 'TongNotification=', TongNotification #endif call OnTongNotificationChange%RunAll() end subroutine logical function Get_TongNotification() implicit none Get_TongNotification = TongNotification end function subroutine Set_TongNotification_WN(v) !DEC$ ATTRIBUTES DLLEXPORT :: Set_TongNotification_WN !DEC$ ATTRIBUTES ALIAS: 'Set_TongNotification_WN' :: Set_TongNotification_WN implicit none logical , intent(in) :: v call Set_TongNotification(v) end subroutine logical function Get_TongNotification_WN() !DEC$ ATTRIBUTES DLLEXPORT :: Get_TongNotification_WN !DEC$ ATTRIBUTES ALIAS: 'Get_TongNotification_WN' :: Get_TongNotification_WN implicit none Get_TongNotification_WN = TongNotification end function subroutine SubscribeTongNotification(a) !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeTongNotification !DEC$ ATTRIBUTES ALIAS: 'SubscribeTongNotification' :: SubscribeTongNotification implicit none procedure (ActionBool) :: a TongNotificationPtr => a end subroutine end module CTongNotificationVariables