#[repr(C)]pub struct NSEvent { /* private fields */ }πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit and AppKit_NSEvent only.ImplementationsΒ§
SourceΒ§impl NSEvent
impl NSEvent
pub unsafe fn type(&self) -> NSEventType
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn modifierFlags(&self) -> NSEventModifierFlags
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn timestamp(&self) -> NSTimeInterval
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn window(&self, mtm: MainThreadMarker) -> Option<Id<NSWindow>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSWindow only.pub unsafe fn windowNumber(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn context(&self) -> Option<Id<NSGraphicsContext>>
πDeprecated: This method always returns nil. If you need access to the current drawing context, use [NSGraphicsContext currentContext] inside of a draw operation.
Available on crate feature
AppKit_NSGraphicsContext only.pub unsafe fn clickCount(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitπDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn eventNumber(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn pressure(&self) -> c_float
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn locationInWindow(&self) -> NSPoint
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn deltaX(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn deltaY(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn deltaZ(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn hasPreciseScrollingDeltas(&self) -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn scrollingDeltaX(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn scrollingDeltaY(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn momentumPhase(&self) -> NSEventPhase
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn isDirectionInvertedFromDevice(&self) -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn characters(&self) -> Option<Id<NSString>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn charactersIgnoringModifiers(&self) -> Option<Id<NSString>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn charactersByApplyingModifiers( &self, modifiers: NSEventModifierFlags, ) -> Option<Id<NSString>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
Foundation_NSString only.pub unsafe fn isARepeat(&self) -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn keyCode(&self) -> c_ushort
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn trackingNumber(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn userData(&self) -> *mut c_void
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn trackingArea(&self) -> Option<Id<NSTrackingArea>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSTrackingArea only.pub unsafe fn subtype(&self) -> NSEventSubtype
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn data1(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn data2(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn eventRef(&self) -> *mut c_void
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn eventWithEventRef( event_ref: NonNull<c_void>, ) -> Option<Id<NSEvent>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn isMouseCoalescingEnabled() -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn setMouseCoalescingEnabled(mouse_coalescing_enabled: bool)
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn magnification(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn deviceID(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn rotation(&self) -> c_float
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn absoluteX(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn absoluteY(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn absoluteZ(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitπDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn tilt(&self) -> NSPoint
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn tangentialPressure(&self) -> c_float
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn vendorDefined(&self) -> Id<AnyObject>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn vendorID(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn tabletID(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn pointingDeviceID(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn systemTabletID(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn vendorPointingDeviceType(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn pointingDeviceSerialNumber(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn uniqueID(&self) -> c_ulonglong
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn capabilityMask(&self) -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn pointingDeviceType(&self) -> NSPointingDeviceType
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn isEnteringProximity(&self) -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn touchesMatchingPhase_inView( &self, phase: NSTouchPhase, view: Option<&NSView>, ) -> Id<NSSet<NSTouch>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSTouch and AppKit_NSView and Foundation_NSSet only.pub unsafe fn allTouches(&self) -> Id<NSSet<NSTouch>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSTouch and Foundation_NSSet only.pub unsafe fn touchesForView(&self, view: &NSView) -> Id<NSSet<NSTouch>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSTouch and AppKit_NSView and Foundation_NSSet only.pub unsafe fn coalescedTouchesForTouch( &self, touch: &NSTouch, ) -> Id<NSArray<NSTouch>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSTouch and Foundation_NSArray only.pub unsafe fn phase(&self) -> NSEventPhase
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn stage(&self) -> NSInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn stageTransition(&self) -> CGFloat
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn associatedEventsMask(&self) -> NSEventMask
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn pressureBehavior(&self) -> NSPressureBehavior
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn isSwipeTrackingFromScrollEventsEnabled() -> bool
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler( &self, options: NSEventSwipeTrackingOptions, min_dampen_threshold: CGFloat, max_dampen_threshold: CGFloat, tracking_handler: &Block<(CGFloat, NSEventPhase, Bool, NonNull<Bool>), ()>, )
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn startPeriodicEventsAfterDelay_withPeriod( delay: NSTimeInterval, period: NSTimeInterval, )
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn stopPeriodicEvents()
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure( type: NSEventType, location: NSPoint, flags: NSEventModifierFlags, time: NSTimeInterval, w_num: NSInteger, unused_pass_nil: Option<&NSGraphicsContext>, e_num: NSInteger, c_num: NSInteger, pressure: c_float, ) -> Option<Id<NSEvent>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSGraphicsContext only.pub unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode( type: NSEventType, location: NSPoint, flags: NSEventModifierFlags, time: NSTimeInterval, w_num: NSInteger, unused_pass_nil: Option<&NSGraphicsContext>, keys: &NSString, ukeys: &NSString, flag: bool, code: c_ushort, ) -> Option<Id<NSEvent>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate features
AppKit_NSGraphicsContext and Foundation_NSString only.pub unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData( type: NSEventType, location: NSPoint, flags: NSEventModifierFlags, time: NSTimeInterval, w_num: NSInteger, unused_pass_nil: Option<&NSGraphicsContext>, e_num: NSInteger, t_num: NSInteger, data: *mut c_void, ) -> Option<Id<NSEvent>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSGraphicsContext only.pub unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2( type: NSEventType, location: NSPoint, flags: NSEventModifierFlags, time: NSTimeInterval, w_num: NSInteger, unused_pass_nil: Option<&NSGraphicsContext>, subtype: c_short, d1: NSInteger, d2: NSInteger, ) -> Option<Id<NSEvent>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitAvailable on crate feature
AppKit_NSGraphicsContext only.pub unsafe fn mouseLocation() -> NSPoint
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn modifierFlags_class() -> NSEventModifierFlags
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn pressedMouseButtons() -> NSUInteger
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn doubleClickInterval() -> NSTimeInterval
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn keyRepeatDelay() -> NSTimeInterval
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn keyRepeatInterval() -> NSTimeInterval
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn addGlobalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: &Block<(NonNull<NSEvent>,), ()>, ) -> Option<Id<AnyObject>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn addLocalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: &Block<(NonNull<NSEvent>,), *mut NSEvent>, ) -> Option<Id<AnyObject>>
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitpub unsafe fn removeMonitor(event_monitor: &AnyObject)
πDeprecated:
icrate::AppKit has been moved to objc2-app-kitMethods from Deref<Target = NSObject>Β§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Available on crate feature AuthenticationServices only.
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
AuthenticationServices only.Handle messages the object doesnβt recognize.
See Appleβs documentation for details.
Methods from Deref<Target = AnyObject>Β§
Sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
Β§Example
Check that an instance of NSObject has the precise class NSObject.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
πDeprecated: this is difficult to use correctly, use Ivar::load instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.Use Ivar::load instead.
Β§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
πDeprecated: this is difficult to use correctly, use Ivar::load_mut instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut instead.Use Ivar::load_mut instead.
Β§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Trait ImplementationsΒ§
SourceΒ§impl BorrowMut<AnyObject> for NSEvent
impl BorrowMut<AnyObject> for NSEvent
SourceΒ§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
SourceΒ§impl BorrowMut<NSObject> for NSEvent
impl BorrowMut<NSObject> for NSEvent
SourceΒ§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
SourceΒ§impl ClassType for NSEvent
impl ClassType for NSEvent
SourceΒ§const NAME: &'static str = "NSEvent"
const NAME: &'static str = "NSEvent"
The name of the Objective-C class that this type represents. Read more
SourceΒ§type Mutability = Immutable
type Mutability = Immutable
Whether the type is mutable or immutable. Read more
SourceΒ§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
SourceΒ§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
SourceΒ§impl NSCoding for NSEvent
impl NSCoding for NSEvent
SourceΒ§unsafe fn encodeWithCoder(&self, coder: &NSCoder)
unsafe fn encodeWithCoder(&self, coder: &NSCoder)
πDeprecated:
icrate::Foundation has been moved to objc2-foundationAvailable on crate features
Foundation and Foundation_NSCoder only.SourceΒ§impl NSCopying for NSEvent
impl NSCopying for NSEvent
SourceΒ§fn copy(&self) -> Id<Self::Immutable>
fn copy(&self) -> Id<Self::Immutable>
πDeprecated:
icrate::Foundation has been moved to objc2-foundationAvailable on crate feature
Foundation only.Returns a new instance thatβs a copy of the receiver. Read more
SourceΒ§impl NSObjectProtocol for NSEvent
impl NSObjectProtocol for NSEvent
SourceΒ§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
SourceΒ§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
SourceΒ§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
SourceΒ§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
SourceΒ§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
SourceΒ§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
SourceΒ§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
SourceΒ§fn debugDescription(&self) -> Id<NSObject>
fn debugDescription(&self) -> Id<NSObject>
A textual representation of the object to use when debugging. Read more
SourceΒ§impl RefEncode for NSEvent
impl RefEncode for NSEvent
SourceΒ§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSEvent
impl Message for NSEvent
impl StructuralPartialEq for NSEvent
Auto Trait ImplementationsΒ§
impl !Freeze for NSEvent
impl !RefUnwindSafe for NSEvent
impl !Send for NSEvent
impl !Sync for NSEvent
impl !Unpin for NSEvent
impl !UnwindSafe for NSEvent
Blanket ImplementationsΒ§
SourceΒ§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
SourceΒ§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more