Instance Property

eventRef

An opaque Carbon type associated with this event.

Declaration

@property(readonly) const void *eventRef;

Discussion

This method is valid for all types of events. The EventRef object is retained by the receiver, so it is valid as long as the NSEvent object is valid, and is released when the NSEvent object is freed. You can use RetainEvent to extend the lifetime of the EventRef object, with a corresponding ReleaseEvent when you are done with it.

The system typically creates user-input events with an associated EventRef. Other NSEvent objects create an EventRef when this property is first accessed, if possible. If there is no equivalent NSEvent for this event, the property is set to NULL.

See Also

Getting General Event Information

context

The display graphics context for this event.

Deprecated
locationInWindow

The receiver’s location in the base coordinate system of the associated window.

timestamp

The time when the event occurred in seconds since system startup.

window

The window object associated with the event.

windowNumber

The identifier for the window device associated with the event.

CGEvent

The Core Graphics event object corresponding to this event.