#[repr(C)]pub struct GCExtendedGamepadSnapshot { /* private fields */ }๐Deprecated: GCExtendedGamepadSnapshot has been deprecated, use [GCController controllerWithExtendedGamepad] instead
Available on crate features
GCExtendedGamepad and GCExtendedGamepadSnapshot and GCPhysicalInputProfile only.Implementationsยง
sourceยงimpl GCExtendedGamepadSnapshot
impl GCExtendedGamepadSnapshot
pub unsafe fn snapshotData(&self) -> Retained<NSData>
๐Deprecated: GCExtendedGamepadSnapshot has been deprecated, use [GCController controllerWithExtendedGamepad] instead
pub unsafe fn setSnapshotData(&self, snapshot_data: &NSData)
๐Deprecated: GCExtendedGamepadSnapshot has been deprecated, use [GCController controllerWithExtendedGamepad] instead
pub unsafe fn initWithSnapshotData( this: Allocated<Self>, data: &NSData ) -> Retained<Self>
๐Deprecated: GCExtendedGamepadSnapshot has been deprecated, use [GCController controllerWithExtendedGamepad] instead
pub unsafe fn initWithController_snapshotData( this: Allocated<Self>, controller: &GCController, data: &NSData ) -> Retained<Self>
๐Deprecated: GCExtendedGamepadSnapshot has been deprecated, use [GCController controllerWithExtendedGamepad] instead
Available on crate feature
GCController only.Methods from Deref<Target = GCExtendedGamepad>ยง
pub unsafe fn controller(&self) -> Option<Retained<GCController>>
Available on crate feature
GCController only.pub unsafe fn valueChangedHandler(&self) -> GCExtendedGamepadValueChangedHandler
Available on crate features
GCControllerElement and block2 only.pub unsafe fn setValueChangedHandler( &self, value_changed_handler: GCExtendedGamepadValueChangedHandler )
Available on crate features
GCControllerElement and block2 only.pub unsafe fn saveSnapshot(&self) -> Retained<GCExtendedGamepadSnapshot>
๐Deprecated: GCExtendedGamepadSnapshot has been deprecated, use [GCController capture] instead
pub unsafe fn dpad(&self) -> Retained<GCControllerDirectionPad>
Available on crate features
GCControllerDirectionPad and GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn leftThumbstick(&self) -> Retained<GCControllerDirectionPad>
Available on crate features
GCControllerDirectionPad and GCControllerElement only.pub unsafe fn rightThumbstick(&self) -> Retained<GCControllerDirectionPad>
Available on crate features
GCControllerDirectionPad and GCControllerElement only.pub unsafe fn leftShoulder(&self) -> Retained<GCControllerButtonInput>
Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn rightShoulder(&self) -> Retained<GCControllerButtonInput>
Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn leftTrigger(&self) -> Retained<GCControllerButtonInput>
Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn rightTrigger(&self) -> Retained<GCControllerButtonInput>
Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn leftThumbstickButton( &self ) -> Option<Retained<GCControllerButtonInput>>
Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn rightThumbstickButton( &self ) -> Option<Retained<GCControllerButtonInput>>
Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn setStateFromExtendedGamepad( &self, extended_gamepad: &GCExtendedGamepad )
Methods from Deref<Target = GCPhysicalInputProfile>ยง
pub unsafe fn device(&self) -> Option<Retained<ProtocolObject<dyn GCDevice>>>
Available on crate feature
GCDevice only.pub unsafe fn lastEventTimestamp(&self) -> NSTimeInterval
pub unsafe fn hasRemappedElements(&self) -> bool
pub unsafe fn valueDidChangeHandler( &self ) -> *mut Block<dyn Fn(NonNull<GCPhysicalInputProfile>, NonNull<GCControllerElement>)>
Available on crate features
GCControllerElement and block2 only.pub unsafe fn setValueDidChangeHandler( &self, value_did_change_handler: Option<&Block<dyn Fn(NonNull<GCPhysicalInputProfile>, NonNull<GCControllerElement>)>> )
Available on crate features
GCControllerElement and block2 only.pub unsafe fn elements( &self ) -> Retained<NSDictionary<NSString, GCControllerElement>>
Available on crate feature
GCControllerElement only.Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn axes( &self ) -> Retained<NSDictionary<NSString, GCControllerAxisInput>>
Available on crate features
GCControllerAxisInput and GCControllerElement only.pub unsafe fn dpads( &self ) -> Retained<NSDictionary<NSString, GCControllerDirectionPad>>
Available on crate features
GCControllerDirectionPad and GCControllerElement only.pub unsafe fn touchpads( &self ) -> Retained<NSDictionary<NSString, GCControllerTouchpad>>
Available on crate features
GCControllerElement and GCControllerTouchpad only.pub unsafe fn allElements(&self) -> Retained<NSSet<GCControllerElement>>
Available on crate feature
GCControllerElement only.pub unsafe fn allButtons(&self) -> Retained<NSSet<GCControllerButtonInput>>
Available on crate features
GCControllerButtonInput and GCControllerElement only.pub unsafe fn allAxes(&self) -> Retained<NSSet<GCControllerAxisInput>>
Available on crate features
GCControllerAxisInput and GCControllerElement only.pub unsafe fn allDpads(&self) -> Retained<NSSet<GCControllerDirectionPad>>
Available on crate features
GCControllerDirectionPad and GCControllerElement only.pub unsafe fn allTouchpads(&self) -> Retained<NSSet<GCControllerTouchpad>>
Available on crate features
GCControllerElement and GCControllerTouchpad only.pub unsafe fn objectForKeyedSubscript( &self, key: &NSString ) -> Option<Retained<GCControllerElement>>
Available on crate feature
GCControllerElement only.pub unsafe fn capture(&self) -> Retained<Self>
pub unsafe fn setStateFromPhysicalInput( &self, physical_input: &GCPhysicalInputProfile )
pub unsafe fn mappedElementAliasForPhysicalInputName( &self, input_name: &NSString ) -> Retained<NSString>
pub unsafe fn mappedPhysicalInputNamesForElementAlias( &self, element_alias: &NSString ) -> Retained<NSSet<NSString>>
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
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 AsMut<AnyObject> for GCExtendedGamepadSnapshot
impl AsMut<AnyObject> for GCExtendedGamepadSnapshot
sourceยงimpl AsMut<GCExtendedGamepad> for GCExtendedGamepadSnapshot
impl AsMut<GCExtendedGamepad> for GCExtendedGamepadSnapshot
sourceยงfn as_mut(&mut self) -> &mut GCExtendedGamepad
fn as_mut(&mut self) -> &mut GCExtendedGamepad
Converts this type into a mutable reference of the (usually inferred) input type.
sourceยงimpl AsMut<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
impl AsMut<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
sourceยงfn as_mut(&mut self) -> &mut GCPhysicalInputProfile
fn as_mut(&mut self) -> &mut GCPhysicalInputProfile
Converts this type into a mutable reference of the (usually inferred) input type.
sourceยงimpl AsMut<NSObject> for GCExtendedGamepadSnapshot
impl AsMut<NSObject> for GCExtendedGamepadSnapshot
sourceยงimpl AsRef<AnyObject> for GCExtendedGamepadSnapshot
impl AsRef<AnyObject> for GCExtendedGamepadSnapshot
sourceยงimpl AsRef<GCExtendedGamepad> for GCExtendedGamepadSnapshot
impl AsRef<GCExtendedGamepad> for GCExtendedGamepadSnapshot
sourceยงfn as_ref(&self) -> &GCExtendedGamepad
fn as_ref(&self) -> &GCExtendedGamepad
Converts this type into a shared reference of the (usually inferred) input type.
sourceยงimpl AsRef<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
impl AsRef<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
sourceยงfn as_ref(&self) -> &GCPhysicalInputProfile
fn as_ref(&self) -> &GCPhysicalInputProfile
Converts this type into a shared reference of the (usually inferred) input type.
sourceยงimpl AsRef<NSObject> for GCExtendedGamepadSnapshot
impl AsRef<NSObject> for GCExtendedGamepadSnapshot
sourceยงimpl Borrow<AnyObject> for GCExtendedGamepadSnapshot
impl Borrow<AnyObject> for GCExtendedGamepadSnapshot
sourceยงimpl Borrow<GCExtendedGamepad> for GCExtendedGamepadSnapshot
impl Borrow<GCExtendedGamepad> for GCExtendedGamepadSnapshot
sourceยงfn borrow(&self) -> &GCExtendedGamepad
fn borrow(&self) -> &GCExtendedGamepad
Immutably borrows from an owned value. Read more
sourceยงimpl Borrow<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
impl Borrow<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
sourceยงfn borrow(&self) -> &GCPhysicalInputProfile
fn borrow(&self) -> &GCPhysicalInputProfile
Immutably borrows from an owned value. Read more
sourceยงimpl Borrow<NSObject> for GCExtendedGamepadSnapshot
impl Borrow<NSObject> for GCExtendedGamepadSnapshot
sourceยงimpl BorrowMut<AnyObject> for GCExtendedGamepadSnapshot
impl BorrowMut<AnyObject> for GCExtendedGamepadSnapshot
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<GCExtendedGamepad> for GCExtendedGamepadSnapshot
impl BorrowMut<GCExtendedGamepad> for GCExtendedGamepadSnapshot
sourceยงfn borrow_mut(&mut self) -> &mut GCExtendedGamepad
fn borrow_mut(&mut self) -> &mut GCExtendedGamepad
Mutably borrows from an owned value. Read more
sourceยงimpl BorrowMut<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
impl BorrowMut<GCPhysicalInputProfile> for GCExtendedGamepadSnapshot
sourceยงfn borrow_mut(&mut self) -> &mut GCPhysicalInputProfile
fn borrow_mut(&mut self) -> &mut GCPhysicalInputProfile
Mutably borrows from an owned value. Read more
sourceยงimpl BorrowMut<NSObject> for GCExtendedGamepadSnapshot
impl BorrowMut<NSObject> for GCExtendedGamepadSnapshot
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 GCExtendedGamepadSnapshot
impl ClassType for GCExtendedGamepadSnapshot
ยงtype Super = GCExtendedGamepad
type Super = GCExtendedGamepad
The superclass of this class. Read more
ยงtype Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
sourceยงconst NAME: &'static str = "GCExtendedGamepadSnapshot"
const NAME: &'static str = "GCExtendedGamepadSnapshot"
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 GCExtendedGamepadSnapshot
impl Debug for GCExtendedGamepadSnapshot
sourceยงimpl Deref for GCExtendedGamepadSnapshot
impl Deref for GCExtendedGamepadSnapshot
sourceยงimpl Hash for GCExtendedGamepadSnapshot
impl Hash for GCExtendedGamepadSnapshot
sourceยงimpl NSObjectProtocol for GCExtendedGamepadSnapshot
impl NSObjectProtocol for GCExtendedGamepadSnapshot
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 description(&self) -> Retained<NSObject>
fn description(&self) -> Retained<NSObject>
A textual representation of the object. 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 GCExtendedGamepadSnapshot
impl PartialEq for GCExtendedGamepadSnapshot
sourceยงfn eq(&self, other: &GCExtendedGamepadSnapshot) -> bool
fn eq(&self, other: &GCExtendedGamepadSnapshot) -> bool
This method tests for
self and other values to be equal, and is used
by ==.sourceยงimpl RefEncode for GCExtendedGamepadSnapshot
impl RefEncode for GCExtendedGamepadSnapshot
sourceยงconst ENCODING_REF: Encoding = <GCExtendedGamepad as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <GCExtendedGamepad as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for GCExtendedGamepadSnapshot
impl Message for GCExtendedGamepadSnapshot
impl StructuralPartialEq for GCExtendedGamepadSnapshot
Auto Trait Implementationsยง
impl !Freeze for GCExtendedGamepadSnapshot
impl !RefUnwindSafe for GCExtendedGamepadSnapshot
impl !Send for GCExtendedGamepadSnapshot
impl !Sync for GCExtendedGamepadSnapshot
impl !Unpin for GCExtendedGamepadSnapshot
impl !UnwindSafe for GCExtendedGamepadSnapshot
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