Cocoa window with events