title: How to get Window reference (CGWindow, NSWindow or WindowRef) from CGWindowID in Swift?
body: <p>How to get Window reference (CGWindow, NSWindow or WindowRef) from CGWindowID in Swift on XCode 7.3 Mac Playground?</p>
  
  <p>I referenced from Apple's document - <a href="http://n.ethz.ch/~upeter/download/carbon_port/Dokus/API_REF/Window_Manager.pdf" rel="nofollow">Window Manager Reference</a>, and from the sample code <a href="https://developer.apple.com/library/mac/samplecode/SonOfGrab/Introduction/Intro.html" rel="nofollow">SonofGrab</a>, but I didn't find an answer in obj-C nor Swift.</p>
  
  <p>How should I do it?</p>