On MS Windows one can obtain a window handle by using:
WindowHandleToPlatform(winhandle).wnd
How does one obtain a MacOS Window "id":
for example a function that accepts a window id:
CGWindowListCreateImage(
CGRect screenBounds,
CGWindowListOption listOption,
CGWindowID windowID, // <------------------ here
CGWindowImageOption imageOption);