Objective c NSWindows鼠标事件

Objective c NSWindows鼠标事件,objective-c,cocoa,mouseevent,nswindow,Objective C,Cocoa,Mouseevent,Nswindow,如何获取NSWindow的鼠标事件?我想知道用户何时将鼠标悬停在窗口上并单击窗口。谢谢 使用以下方法: - (void)mouseDown:(NSEvent *)theEvent { } - (void)mouseUp:(NSEvent *)theEvent { } - (void)mouseMoved:(NSEvent *)theEvent { }

如何获取NSWindow的鼠标事件?我想知道用户何时将鼠标悬停在窗口上并单击窗口。谢谢

使用以下方法:

- (void)mouseDown:(NSEvent *)theEvent {

}

- (void)mouseUp:(NSEvent *)theEvent {

}

- (void)mouseMoved:(NSEvent *)theEvent {

}