Value nsWindow
let WindowContext.nsWindow: LightUserData<NSWindow>
NSWindow instance of the window.
Here is how you can convert the reference back to the NSWindow object (Swift):
if let nsWindowPtr = lua_touserdata(L, index) {
let nsWindow = Unmanaged<NSWindow>.fromOpaque(nsWindowPtr).takeUnretainedValue()
}