pub trait NSEvent: Sized {
Show 71 methods
// Required methods
unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode_(
_: Self,
eventType: NSEventType,
location: NSPoint,
modifierFlags: NSEventModifierFlags,
timestamp: NSTimeInterval,
windowNumber: NSInteger,
context: id,
characters: id,
unmodCharacters: id,
repeatKey: BOOL,
code: c_ushort,
) -> id;
unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure_(
_: Self,
eventType: NSEventType,
location: NSPoint,
modifierFlags: NSEventModifierFlags,
timestamp: NSTimeInterval,
windowNumber: NSInteger,
context: id,
eventNumber: NSInteger,
clickCount: NSInteger,
pressure: c_float,
) -> id;
unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_(
_: Self,
eventType: NSEventType,
location: NSPoint,
modifierFlags: NSEventModifierFlags,
timestamp: NSTimeInterval,
windowNumber: NSInteger,
context: id,
eventNumber: NSInteger,
trackingNumber: NSInteger,
userData: *mut c_void,
) -> id;
unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_(
_: Self,
eventType: NSEventType,
location: NSPoint,
modifierFlags: NSEventModifierFlags,
timestamp: NSTimeInterval,
windowNumber: NSInteger,
context: id,
subtype: NSEventSubtype,
data1: NSInteger,
data2: NSInteger,
) -> id;
unsafe fn eventWithEventRef_(_: Self, eventRef: *const c_void) -> id;
unsafe fn eventWithCGEvent_(_: Self, cgEvent: *mut c_void) -> id;
unsafe fn context(self) -> id;
unsafe fn locationInWindow(self) -> NSPoint;
unsafe fn modifierFlags(self) -> NSEventModifierFlags;
unsafe fn timestamp(self) -> NSTimeInterval;
unsafe fn eventType(self) -> NSEventType;
unsafe fn window(self) -> id;
unsafe fn windowNumber(self) -> NSInteger;
unsafe fn eventRef(self) -> *const c_void;
unsafe fn CGEvent(self) -> *mut c_void;
unsafe fn currentModifierFlags(_: Self) -> NSEventModifierFlags;
unsafe fn keyRepeatDelay(_: Self) -> NSTimeInterval;
unsafe fn keyRepeatInterval(_: Self) -> NSTimeInterval;
unsafe fn characters(self) -> id;
unsafe fn charactersIgnoringModifiers(self) -> id;
unsafe fn keyCode(self) -> c_ushort;
unsafe fn isARepeat(self) -> BOOL;
unsafe fn pressedMouseButtons(_: Self) -> NSUInteger;
unsafe fn doubleClickInterval(_: Self) -> NSTimeInterval;
unsafe fn mouseLocation(_: Self) -> NSPoint;
unsafe fn buttonNumber(self) -> NSInteger;
unsafe fn clickCount(self) -> NSInteger;
unsafe fn pressure(self) -> c_float;
unsafe fn stage(self) -> NSInteger;
unsafe fn setMouseCoalescingEnabled_(_: Self, flag: BOOL);
unsafe fn isMouseCoalescingEnabled(_: Self) -> BOOL;
unsafe fn eventNumber(self) -> NSInteger;
unsafe fn trackingNumber(self) -> NSInteger;
unsafe fn trackingArea(self) -> id;
unsafe fn userData(self) -> *const c_void;
unsafe fn data1(self) -> NSInteger;
unsafe fn data2(self) -> NSInteger;
unsafe fn subtype(self) -> NSEventSubtype;
unsafe fn deltaX(self) -> CGFloat;
unsafe fn deltaY(self) -> CGFloat;
unsafe fn deltaZ(self) -> CGFloat;
unsafe fn capabilityMask(self) -> NSUInteger;
unsafe fn deviceID(self) -> NSUInteger;
unsafe fn pointingDeviceID(self) -> NSUInteger;
unsafe fn pointingDeviceSerialNumber(self) -> NSUInteger;
unsafe fn pointingDeviceType(self) -> NSPointingDeviceType;
unsafe fn systemTabletID(self) -> NSUInteger;
unsafe fn tabletID(self) -> NSUInteger;
unsafe fn uniqueID(self) -> c_ulonglong;
unsafe fn vendorID(self) -> NSUInteger;
unsafe fn vendorPointingDeviceType(self) -> NSUInteger;
unsafe fn absoluteX(self) -> NSInteger;
unsafe fn absoluteY(self) -> NSInteger;
unsafe fn absoluteZ(self) -> NSInteger;
unsafe fn buttonMask(self) -> NSEventButtonMask;
unsafe fn rotation(self) -> c_float;
unsafe fn tangentialPressure(self) -> c_float;
unsafe fn tilt(self) -> NSPoint;
unsafe fn vendorDefined(self) -> id;
unsafe fn startPeriodicEventsAfterDelay_withPeriod_(
_: Self,
delaySeconds: NSTimeInterval,
periodSeconds: NSTimeInterval,
);
unsafe fn stopPeriodicEvents(_: Self);
unsafe fn magnification(self) -> CGFloat;
unsafe fn touchesMatchingPhase_inView_(
self,
phase: NSTouchPhase,
view: id,
) -> id;
unsafe fn isSwipeTrackingFromScrollEventsEnabled(_: Self) -> BOOL;
unsafe fn removeMonitor_(_: Self, eventMonitor: id);
unsafe fn hasPreciseScrollingDeltas(self) -> BOOL;
unsafe fn scrollingDeltaX(self) -> CGFloat;
unsafe fn scrollingDeltaY(self) -> CGFloat;
unsafe fn momentumPhase(self) -> NSEventPhase;
unsafe fn phase(self) -> NSEventPhase;
unsafe fn locationInNode_(self, node: id) -> CGPoint;
}๐Deprecated: use the objc2-app-kit crate instead
Required Methodsยง
unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode_( _: Self, eventType: NSEventType, location: NSPoint, modifierFlags: NSEventModifierFlags, timestamp: NSTimeInterval, windowNumber: NSInteger, context: id, characters: id, unmodCharacters: id, repeatKey: BOOL, code: c_ushort, ) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure_( _: Self, eventType: NSEventType, location: NSPoint, modifierFlags: NSEventModifierFlags, timestamp: NSTimeInterval, windowNumber: NSInteger, context: id, eventNumber: NSInteger, clickCount: NSInteger, pressure: c_float, ) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_( _: Self, eventType: NSEventType, location: NSPoint, modifierFlags: NSEventModifierFlags, timestamp: NSTimeInterval, windowNumber: NSInteger, context: id, eventNumber: NSInteger, trackingNumber: NSInteger, userData: *mut c_void, ) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_( _: Self, eventType: NSEventType, location: NSPoint, modifierFlags: NSEventModifierFlags, timestamp: NSTimeInterval, windowNumber: NSInteger, context: id, subtype: NSEventSubtype, data1: NSInteger, data2: NSInteger, ) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn eventWithEventRef_(_: Self, eventRef: *const c_void) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn eventWithCGEvent_(_: Self, cgEvent: *mut c_void) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn context(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn locationInWindow(self) -> NSPoint
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn modifierFlags(self) -> NSEventModifierFlags
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn timestamp(self) -> NSTimeInterval
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn eventType(self) -> NSEventType
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn window(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn windowNumber(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn eventRef(self) -> *const c_void
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn CGEvent(self) -> *mut c_void
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn currentModifierFlags(_: Self) -> NSEventModifierFlags
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn keyRepeatDelay(_: Self) -> NSTimeInterval
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn keyRepeatInterval(_: Self) -> NSTimeInterval
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn characters(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn charactersIgnoringModifiers(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn keyCode(self) -> c_ushort
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn isARepeat(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn pressedMouseButtons(_: Self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn doubleClickInterval(_: Self) -> NSTimeInterval
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn mouseLocation(_: Self) -> NSPoint
๐Deprecated: use the objc2-app-kit crate instead
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn clickCount(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn pressure(self) -> c_float
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn stage(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn setMouseCoalescingEnabled_(_: Self, flag: BOOL)
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn isMouseCoalescingEnabled(_: Self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn eventNumber(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn trackingNumber(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn trackingArea(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn userData(self) -> *const c_void
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn data1(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn data2(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn subtype(self) -> NSEventSubtype
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn deltaX(self) -> CGFloat
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn deltaY(self) -> CGFloat
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn deltaZ(self) -> CGFloat
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn capabilityMask(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn deviceID(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn pointingDeviceID(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn pointingDeviceSerialNumber(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn pointingDeviceType(self) -> NSPointingDeviceType
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn systemTabletID(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn tabletID(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn uniqueID(self) -> c_ulonglong
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn vendorID(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn vendorPointingDeviceType(self) -> NSUInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn absoluteX(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn absoluteY(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn absoluteZ(self) -> NSInteger
๐Deprecated: use the objc2-app-kit crate instead
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn rotation(self) -> c_float
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn tangentialPressure(self) -> c_float
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn tilt(self) -> NSPoint
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn vendorDefined(self) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn startPeriodicEventsAfterDelay_withPeriod_( _: Self, delaySeconds: NSTimeInterval, periodSeconds: NSTimeInterval, )
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn stopPeriodicEvents(_: Self)
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn magnification(self) -> CGFloat
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn touchesMatchingPhase_inView_( self, phase: NSTouchPhase, view: id, ) -> id
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn isSwipeTrackingFromScrollEventsEnabled(_: Self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn removeMonitor_(_: Self, eventMonitor: id)
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn hasPreciseScrollingDeltas(self) -> BOOL
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn scrollingDeltaX(self) -> CGFloat
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn scrollingDeltaY(self) -> CGFloat
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn momentumPhase(self) -> NSEventPhase
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn phase(self) -> NSEventPhase
๐Deprecated: use the objc2-app-kit crate instead
unsafe fn locationInNode_(self, node: id) -> CGPoint
๐Deprecated: use the objc2-app-kit crate instead
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.