Detect when dragging outside of app macOS

Hi there! How do I detect when the user starts dragging something anywhere on the screen. For example, I'd like to detect when they start dragging a file from finder.
It is a bit long to explain.

You'd better look at this tutorial
https ://www.raywenderlich. com/1016-drag-and-drop-tutorial-for-macos
Or this SO thread
https://stackoverflow.com/questions/29233247/implementing-a-drag-and-drop-zone-in-swift
Detect when dragging outside of app macOS
 
 
Q