Creates an event object that is based on a Carbon type of event.
SDK
- macOS 10.5+
Framework
- App
Kit
Declaration
+ (NSEvent *)eventWithEventRef:(const void *)eventRef;
Parameters
eventRef
The EventRef opaque type to be associated with the created
NSEvent
object.
Return Value
An autoreleased NSEvent
object corresponding to event
or nil
if event
cannot be converted into an equivalent NSEvent
object.
Discussion
This method is valid for all events. The created NSEvent
object retains the Event
object and is released when the NSEvent
object is freed.