Struct objc2_app_kit::NSGestureRecognizer
source · #[repr(C)]pub struct NSGestureRecognizer { /* private fields */ }
Available on crate feature
NSGestureRecognizer
only.Implementations§
source§impl NSGestureRecognizer
impl NSGestureRecognizer
pub unsafe fn initWithTarget_action( this: Allocated<Self>, target: Option<&AnyObject>, action: Option<Sel> ) -> Id<Self>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Option<Id<Self>>
pub unsafe fn target(&self) -> Option<Id<AnyObject>>
pub unsafe fn setTarget(&self, target: Option<&AnyObject>)
pub unsafe fn action(&self) -> Option<Sel>
pub unsafe fn setAction(&self, action: Option<Sel>)
pub unsafe fn delegate( &self ) -> Option<Id<ProtocolObject<dyn NSGestureRecognizerDelegate>>>
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn NSGestureRecognizerDelegate>> )
pub unsafe fn isEnabled(&self) -> bool
pub unsafe fn setEnabled(&self, enabled: bool)
pub unsafe fn view(&self) -> Option<Id<NSView>>
Available on crate features
NSResponder
and NSView
only.pub unsafe fn pressureConfiguration(&self) -> Id<NSPressureConfiguration>
Available on crate feature
NSPressureConfiguration
only.pub unsafe fn setPressureConfiguration( &self, pressure_configuration: &NSPressureConfiguration )
Available on crate feature
NSPressureConfiguration
only.pub unsafe fn delaysPrimaryMouseButtonEvents(&self) -> bool
pub unsafe fn setDelaysPrimaryMouseButtonEvents( &self, delays_primary_mouse_button_events: bool )
pub unsafe fn delaysSecondaryMouseButtonEvents(&self) -> bool
pub unsafe fn setDelaysSecondaryMouseButtonEvents( &self, delays_secondary_mouse_button_events: bool )
pub unsafe fn delaysOtherMouseButtonEvents(&self) -> bool
pub unsafe fn setDelaysOtherMouseButtonEvents( &self, delays_other_mouse_button_events: bool )
pub unsafe fn delaysKeyEvents(&self) -> bool
pub unsafe fn setDelaysKeyEvents(&self, delays_key_events: bool)
pub unsafe fn delaysMagnificationEvents(&self) -> bool
pub unsafe fn setDelaysMagnificationEvents( &self, delays_magnification_events: bool )
pub unsafe fn delaysRotationEvents(&self) -> bool
pub unsafe fn setDelaysRotationEvents(&self, delays_rotation_events: bool)
pub unsafe fn locationInView(&self, view: Option<&NSView>) -> NSPoint
Available on crate features
NSResponder
and NSView
only.source§impl NSGestureRecognizer
impl NSGestureRecognizer
Methods declared on superclass NSObject
source§impl NSGestureRecognizer
impl NSGestureRecognizer
NSTouchBar
pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask
Available on crate feature
NSTouch
only.pub unsafe fn setAllowedTouchTypes(&self, allowed_touch_types: NSTouchTypeMask)
Available on crate feature
NSTouch
only.source§impl NSGestureRecognizer
impl NSGestureRecognizer
NSSubclassUse
pub unsafe fn setState(&self, state: NSGestureRecognizerState)
pub unsafe fn reset(&self)
pub unsafe fn canPreventGestureRecognizer( &self, prevented_gesture_recognizer: &NSGestureRecognizer ) -> bool
pub unsafe fn canBePreventedByGestureRecognizer( &self, preventing_gesture_recognizer: &NSGestureRecognizer ) -> bool
pub unsafe fn shouldRequireFailureOfGestureRecognizer( &self, other_gesture_recognizer: &NSGestureRecognizer ) -> bool
pub unsafe fn shouldBeRequiredToFailByGestureRecognizer( &self, other_gesture_recognizer: &NSGestureRecognizer ) -> bool
pub unsafe fn mouseDown(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn rightMouseDown(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn otherMouseDown(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn mouseUp(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn rightMouseUp(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn otherMouseUp(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn mouseDragged(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn rightMouseDragged(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn otherMouseDragged(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn keyDown(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn keyUp(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn flagsChanged(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn tabletPoint(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn magnifyWithEvent(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn rotateWithEvent(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn pressureChangeWithEvent(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn touchesBeganWithEvent(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn touchesMovedWithEvent(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn touchesEndedWithEvent(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.pub unsafe fn touchesCancelledWithEvent(&self, event: &NSEvent)
Available on crate feature
NSEvent
only.Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature NSAccessibilityConstants
only.
pub fn class(&self) -> &'static AnyClass
NSAccessibilityConstants
only.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.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.NSAccessibilityConstants
only.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.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.NSAccessibilityConstants
only.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 AsMut<AnyObject> for NSGestureRecognizer
impl AsMut<AnyObject> for NSGestureRecognizer
source§impl AsMut<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature NSClickGestureRecognizer
only.
impl AsMut<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature
NSClickGestureRecognizer
only.source§fn as_mut(&mut self) -> &mut NSGestureRecognizer
fn as_mut(&mut self) -> &mut NSGestureRecognizer
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature NSMagnificationGestureRecognizer
only.
impl AsMut<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature
NSMagnificationGestureRecognizer
only.source§fn as_mut(&mut self) -> &mut NSGestureRecognizer
fn as_mut(&mut self) -> &mut NSGestureRecognizer
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature NSPanGestureRecognizer
only.
impl AsMut<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature
NSPanGestureRecognizer
only.source§fn as_mut(&mut self) -> &mut NSGestureRecognizer
fn as_mut(&mut self) -> &mut NSGestureRecognizer
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature NSPressGestureRecognizer
only.
impl AsMut<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature
NSPressGestureRecognizer
only.source§fn as_mut(&mut self) -> &mut NSGestureRecognizer
fn as_mut(&mut self) -> &mut NSGestureRecognizer
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature NSRotationGestureRecognizer
only.
impl AsMut<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature
NSRotationGestureRecognizer
only.source§fn as_mut(&mut self) -> &mut NSGestureRecognizer
fn as_mut(&mut self) -> &mut NSGestureRecognizer
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsMut<NSObject> for NSGestureRecognizer
impl AsMut<NSObject> for NSGestureRecognizer
source§impl AsRef<AnyObject> for NSGestureRecognizer
impl AsRef<AnyObject> for NSGestureRecognizer
source§impl AsRef<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature NSClickGestureRecognizer
only.
impl AsRef<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature
NSClickGestureRecognizer
only.source§fn as_ref(&self) -> &NSGestureRecognizer
fn as_ref(&self) -> &NSGestureRecognizer
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature NSMagnificationGestureRecognizer
only.
impl AsRef<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature
NSMagnificationGestureRecognizer
only.source§fn as_ref(&self) -> &NSGestureRecognizer
fn as_ref(&self) -> &NSGestureRecognizer
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature NSPanGestureRecognizer
only.
impl AsRef<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature
NSPanGestureRecognizer
only.source§fn as_ref(&self) -> &NSGestureRecognizer
fn as_ref(&self) -> &NSGestureRecognizer
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature NSPressGestureRecognizer
only.
impl AsRef<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature
NSPressGestureRecognizer
only.source§fn as_ref(&self) -> &NSGestureRecognizer
fn as_ref(&self) -> &NSGestureRecognizer
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature NSRotationGestureRecognizer
only.
impl AsRef<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature
NSRotationGestureRecognizer
only.source§fn as_ref(&self) -> &NSGestureRecognizer
fn as_ref(&self) -> &NSGestureRecognizer
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<NSObject> for NSGestureRecognizer
impl AsRef<NSObject> for NSGestureRecognizer
source§impl Borrow<AnyObject> for NSGestureRecognizer
impl Borrow<AnyObject> for NSGestureRecognizer
source§impl Borrow<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature NSClickGestureRecognizer
only.
impl Borrow<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature
NSClickGestureRecognizer
only.source§fn borrow(&self) -> &NSGestureRecognizer
fn borrow(&self) -> &NSGestureRecognizer
Immutably borrows from an owned value. Read more
source§impl Borrow<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature NSMagnificationGestureRecognizer
only.
impl Borrow<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature
NSMagnificationGestureRecognizer
only.source§fn borrow(&self) -> &NSGestureRecognizer
fn borrow(&self) -> &NSGestureRecognizer
Immutably borrows from an owned value. Read more
source§impl Borrow<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature NSPanGestureRecognizer
only.
impl Borrow<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature
NSPanGestureRecognizer
only.source§fn borrow(&self) -> &NSGestureRecognizer
fn borrow(&self) -> &NSGestureRecognizer
Immutably borrows from an owned value. Read more
source§impl Borrow<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature NSPressGestureRecognizer
only.
impl Borrow<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature
NSPressGestureRecognizer
only.source§fn borrow(&self) -> &NSGestureRecognizer
fn borrow(&self) -> &NSGestureRecognizer
Immutably borrows from an owned value. Read more
source§impl Borrow<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature NSRotationGestureRecognizer
only.
impl Borrow<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature
NSRotationGestureRecognizer
only.source§fn borrow(&self) -> &NSGestureRecognizer
fn borrow(&self) -> &NSGestureRecognizer
Immutably borrows from an owned value. Read more
source§impl Borrow<NSObject> for NSGestureRecognizer
impl Borrow<NSObject> for NSGestureRecognizer
source§impl BorrowMut<AnyObject> for NSGestureRecognizer
impl BorrowMut<AnyObject> for NSGestureRecognizer
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<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature NSClickGestureRecognizer
only.
impl BorrowMut<NSGestureRecognizer> for NSClickGestureRecognizer
Available on crate feature
NSClickGestureRecognizer
only.source§fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature NSMagnificationGestureRecognizer
only.
impl BorrowMut<NSGestureRecognizer> for NSMagnificationGestureRecognizer
Available on crate feature
NSMagnificationGestureRecognizer
only.source§fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature NSPanGestureRecognizer
only.
impl BorrowMut<NSGestureRecognizer> for NSPanGestureRecognizer
Available on crate feature
NSPanGestureRecognizer
only.source§fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature NSPressGestureRecognizer
only.
impl BorrowMut<NSGestureRecognizer> for NSPressGestureRecognizer
Available on crate feature
NSPressGestureRecognizer
only.source§fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature NSRotationGestureRecognizer
only.
impl BorrowMut<NSGestureRecognizer> for NSRotationGestureRecognizer
Available on crate feature
NSRotationGestureRecognizer
only.source§fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
fn borrow_mut(&mut self) -> &mut NSGestureRecognizer
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for NSGestureRecognizer
impl BorrowMut<NSObject> for NSGestureRecognizer
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 NSGestureRecognizer
impl ClassType for NSGestureRecognizer
§type Mutability = MainThreadOnly
type Mutability = MainThreadOnly
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSGestureRecognizer"
const NAME: &'static str = "NSGestureRecognizer"
The name of the Objective-C class that this type represents. 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 Debug for NSGestureRecognizer
impl Debug for NSGestureRecognizer
source§impl Deref for NSGestureRecognizer
impl Deref for NSGestureRecognizer
source§impl DerefMut for NSGestureRecognizer
impl DerefMut for NSGestureRecognizer
source§impl Hash for NSGestureRecognizer
impl Hash for NSGestureRecognizer
source§impl NSCoding for NSGestureRecognizer
impl NSCoding for NSGestureRecognizer
source§impl NSObjectProtocol for NSGestureRecognizer
impl NSObjectProtocol for NSGestureRecognizer
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 PartialEq for NSGestureRecognizer
impl PartialEq for NSGestureRecognizer
source§fn eq(&self, other: &NSGestureRecognizer) -> bool
fn eq(&self, other: &NSGestureRecognizer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSGestureRecognizer
impl RefEncode for NSGestureRecognizer
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 NSGestureRecognizer
impl Message for NSGestureRecognizer
impl StructuralPartialEq for NSGestureRecognizer
Auto Trait Implementations§
impl !Freeze for NSGestureRecognizer
impl !RefUnwindSafe for NSGestureRecognizer
impl !Send for NSGestureRecognizer
impl !Sync for NSGestureRecognizer
impl !Unpin for NSGestureRecognizer
impl !UnwindSafe for NSGestureRecognizer
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
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
The immutable counterpart of the type, or
Self
if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
The mutable counterpart of the type, or
Self
if the type has no
mutable counterpart. Read more