Struct objc2_app_kit::NSPressGestureRecognizer
source · #[repr(C)]pub struct NSPressGestureRecognizer { /* private fields */ }
Available on crate features
NSGestureRecognizer
and NSPressGestureRecognizer
only.Implementations§
source§impl NSPressGestureRecognizer
impl NSPressGestureRecognizer
pub unsafe fn setButtonMask(&self, button_mask: NSUInteger)
pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval
pub unsafe fn setMinimumPressDuration( &self, minimum_press_duration: NSTimeInterval )
pub unsafe fn allowableMovement(&self) -> CGFloat
pub unsafe fn setAllowableMovement(&self, allowable_movement: CGFloat)
pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger
pub unsafe fn setNumberOfTouchesRequired( &self, number_of_touches_required: NSInteger )
source§impl NSPressGestureRecognizer
impl NSPressGestureRecognizer
Methods declared on superclass NSGestureRecognizer
Methods from Deref<Target = NSGestureRecognizer>§
pub unsafe fn target(&self) -> Option<Retained<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<Retained<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<Retained<NSView>>
Available on crate features
NSResponder
and NSView
only.pub unsafe fn pressureConfiguration(&self) -> Retained<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.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.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 NSPressGestureRecognizer
impl AsMut<AnyObject> for NSPressGestureRecognizer
source§impl AsMut<NSGestureRecognizer> for NSPressGestureRecognizer
impl AsMut<NSGestureRecognizer> for NSPressGestureRecognizer
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 NSPressGestureRecognizer
impl AsMut<NSObject> for NSPressGestureRecognizer
source§impl AsRef<AnyObject> for NSPressGestureRecognizer
impl AsRef<AnyObject> for NSPressGestureRecognizer
source§impl AsRef<NSGestureRecognizer> for NSPressGestureRecognizer
impl AsRef<NSGestureRecognizer> for NSPressGestureRecognizer
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 NSPressGestureRecognizer
impl AsRef<NSObject> for NSPressGestureRecognizer
source§impl Borrow<AnyObject> for NSPressGestureRecognizer
impl Borrow<AnyObject> for NSPressGestureRecognizer
source§impl Borrow<NSGestureRecognizer> for NSPressGestureRecognizer
impl Borrow<NSGestureRecognizer> for NSPressGestureRecognizer
source§fn borrow(&self) -> &NSGestureRecognizer
fn borrow(&self) -> &NSGestureRecognizer
Immutably borrows from an owned value. Read more
source§impl Borrow<NSObject> for NSPressGestureRecognizer
impl Borrow<NSObject> for NSPressGestureRecognizer
source§impl BorrowMut<AnyObject> for NSPressGestureRecognizer
impl BorrowMut<AnyObject> for NSPressGestureRecognizer
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 NSPressGestureRecognizer
impl BorrowMut<NSGestureRecognizer> for NSPressGestureRecognizer
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 NSPressGestureRecognizer
impl BorrowMut<NSObject> for NSPressGestureRecognizer
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 NSPressGestureRecognizer
impl ClassType for NSPressGestureRecognizer
§type Super = NSGestureRecognizer
type Super = NSGestureRecognizer
The superclass of this class. Read more
§type Mutability = MainThreadOnly
type Mutability = MainThreadOnly
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSPressGestureRecognizer"
const NAME: &'static str = "NSPressGestureRecognizer"
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 NSPressGestureRecognizer
impl Debug for NSPressGestureRecognizer
source§impl Deref for NSPressGestureRecognizer
impl Deref for NSPressGestureRecognizer
source§impl DerefMut for NSPressGestureRecognizer
impl DerefMut for NSPressGestureRecognizer
source§impl Hash for NSPressGestureRecognizer
impl Hash for NSPressGestureRecognizer
source§impl NSCoding for NSPressGestureRecognizer
impl NSCoding for NSPressGestureRecognizer
source§impl NSObjectProtocol for NSPressGestureRecognizer
impl NSObjectProtocol for NSPressGestureRecognizer
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) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for NSPressGestureRecognizer
impl PartialEq for NSPressGestureRecognizer
source§fn eq(&self, other: &NSPressGestureRecognizer) -> bool
fn eq(&self, other: &NSPressGestureRecognizer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSPressGestureRecognizer
impl RefEncode for NSPressGestureRecognizer
source§const ENCODING_REF: Encoding = <NSGestureRecognizer as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSGestureRecognizer as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSPressGestureRecognizer
impl Message for NSPressGestureRecognizer
impl StructuralPartialEq for NSPressGestureRecognizer
Auto Trait Implementations§
impl !Freeze for NSPressGestureRecognizer
impl !RefUnwindSafe for NSPressGestureRecognizer
impl !Send for NSPressGestureRecognizer
impl !Sync for NSPressGestureRecognizer
impl !Unpin for NSPressGestureRecognizer
impl !UnwindSafe for NSPressGestureRecognizer
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