---
title: window
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsevent/window
---

# window

The window object associated with the event.

## Declaration

```swift
weak var window: NSWindow? { get }
```

## Discussion

Discussion Periodic events do not have a window. The result of accessing this property on a periodic event is undefined.

## See Also

### Getting general event information

- [locationInWindow](appkit/nsevent/locationinwindow.md)
- [timestamp](appkit/nsevent/timestamp.md)
- [windowNumber](appkit/nsevent/windownumber.md)
- [eventRef](appkit/nsevent/eventref.md)
- [cgEvent](appkit/nsevent/cgevent.md)
- [foreverDuration](appkit/nsevent/foreverduration.md)
