Contents

init(eventRef:)

Creates and returns a new event object for a Carbon event.

Declaration

init?(eventRef: UnsafeRawPointer)

Parameters

  • eventRef:

    The EventRef opaque type to be associated with the created NSEvent object.

Return Value

An autoreleased NSEvent object corresponding to eventRef or nil if eventRef cannot be converted into an equivalent NSEvent object.

Discussion

This method is valid for all events. The created NSEvent object retains the EventRef object and is released when the NSEvent object is freed.

See Also

Related Documentation

Creating an event object