pub unsafe trait GCDevice: NSObjectProtocol {
// Provided methods
unsafe fn handlerQueue(&self) -> Retained<DispatchQueue>
where Self: Sized + Message { ... }
unsafe fn setHandlerQueue(&self, handler_queue: &DispatchQueue)
where Self: Sized + Message { ... }
unsafe fn vendorName(&self) -> Option<Retained<NSString>>
where Self: Sized + Message { ... }
unsafe fn productCategory(&self) -> Retained<NSString>
where Self: Sized + Message { ... }
unsafe fn physicalInputProfile(&self) -> Retained<GCPhysicalInputProfile>
where Self: Sized + Message { ... }
}GCDevice only.Expand description
Provided Methods§
Sourceunsafe fn handlerQueue(&self) -> Retained<DispatchQueue>
Available on crate feature dispatch2 only.
unsafe fn handlerQueue(&self) -> Retained<DispatchQueue>
dispatch2 only.The dispatch queue that element value change handlers are submitted on. The default queue is main, and setting this to any other queue will make value change handlers dispatch async on the given queue. This is useful if the main game loop of the application is not on main, or if input logic is handled on another thread from the main game loop.
See: GCControllerAxisInput.valueChangedHandler
See: GCControllerButtonInput.valueChangedHandler
See: GCControllerButtonInput.pressedChangedHandler
See: GCControllerDirectionPad.valueChangedHandler
See: GCMotion.valueChangedHandler
Sourceunsafe fn setHandlerQueue(&self, handler_queue: &DispatchQueue)
Available on crate feature dispatch2 only.
unsafe fn setHandlerQueue(&self, handler_queue: &DispatchQueue)
dispatch2 only.Sourceunsafe fn vendorName(&self) -> Option<Retained<NSString>>
unsafe fn vendorName(&self) -> Option<Retained<NSString>>
A vendor supplied name. May be nil, and is not guaranteed to be unique. This should not be used as a key in a dictionary, but simply as a way to present some basic information about the device in testing or to the user.
Sourceunsafe fn productCategory(&self) -> Retained<NSString>
unsafe fn productCategory(&self) -> Retained<NSString>
The product category the device belongs to. This is useful for setting appropriate UI elements based on what type of device is connected.
See: GCProductCategories.h
Sourceunsafe fn physicalInputProfile(&self) -> Retained<GCPhysicalInputProfile>
👎Deprecated: Use the physicalInputProfile property on GCController instead. For GCKeyboard, use the keyboardInput property. For GCMouse, use the mouseInput property.Available on crate feature GCPhysicalInputProfile only.
unsafe fn physicalInputProfile(&self) -> Retained<GCPhysicalInputProfile>
GCPhysicalInputProfile only.Gets the physical input profile for the device.
Note: This is equivalent to the controller’s gamepad, microGamepad, or extendedGamepad instance.
See: GCController.microGamepad
See: GCController.extendedGamepad
Trait Implementations§
Source§impl ProtocolType for dyn GCDevice
impl ProtocolType for dyn GCDevice
impl<T> ImplementedBy<T> for dyn GCDevice
Implementations on Foreign Types§
impl<T> GCDevice for ProtocolObject<T>
Implementors§
impl GCDevice for GCController
GCController only.impl GCDevice for GCKeyboard
GCKeyboard only.impl GCDevice for GCMouse
GCMouse only.impl GCDevice for GCRacingWheel
GCRacingWheel only.impl GCDevice for GCStylus
GCStylus only.