How do currently downloading files show a circular progress indicator besides them in Finder?

This is achieved by macOS apps using Apple provided API. Specifically, NSProgress Cocoa API.