module CMouseHoleEnumVariables use CVoidEventHandlerCollection implicit none integer :: MouseHole = 0 integer :: MouseHole_S = 0 public type(VoidEventHandlerCollection) :: OnMouseHoleChange enum, bind(c) enumerator MOUSE_HOLE_NEUTRAL enumerator MOUSE_HOLE_FILL enumerator MOUSE_HOLE_EMPTY end enum private :: MouseHole contains subroutine Set_MouseHole(v) implicit none integer , intent(in) :: v #ifdef ExcludeExtraChanges if(MouseHole == v) return #endif !call sleep(2) MouseHole = v #ifdef deb print*, 'MouseHole=', MouseHole #endif call OnMouseHoleChange%RunAll() end subroutine integer function Get_MouseHole() implicit none Get_MouseHole = MouseHole end function subroutine Update_MouseHole_From_Snapshot() implicit none call Set_MouseHole(MouseHole_S) end subroutine subroutine Set_MouseHole_WN(v) !DEC$ ATTRIBUTES DLLEXPORT :: Set_MouseHole_WN !DEC$ ATTRIBUTES ALIAS: 'Set_MouseHole_WN' :: Set_MouseHole_WN implicit none integer , intent(in) :: v !call Set_MouseHole(v) MouseHole_S = v end subroutine integer function Get_MouseHole_WN() !DEC$ ATTRIBUTES DLLEXPORT :: Get_MouseHole_WN !DEC$ ATTRIBUTES ALIAS: 'Get_MouseHole_WN' :: Get_MouseHole_WN implicit none Get_MouseHole_WN = MouseHole end function logical function Get_EmptyMouseHole() !DEC$ ATTRIBUTES DLLEXPORT :: Get_EmptyMouseHole !DEC$ ATTRIBUTES ALIAS: 'Get_EmptyMouseHole' :: Get_EmptyMouseHole implicit none Get_EmptyMouseHole = .false. ! MouseHole == EMPTY_MOUSE_HOLE end function logical function Get_FillMouseHole() !DEC$ ATTRIBUTES DLLEXPORT :: Get_FillMouseHole !DEC$ ATTRIBUTES ALIAS: 'Get_FillMouseHole' :: Get_FillMouseHole implicit none Get_FillMouseHole = .false. ! MouseHole == FILL_MOUSE_HOLE end function end module CMouseHoleEnumVariables