objc2_game_controller/generated/
GCDevice.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_protocol!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcdevice?language=objc)
11    pub unsafe trait GCDevice: NSObjectProtocol {
12        /// 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,
13        /// but simply as a way to present some basic information about the device in testing or to the user.
14        #[unsafe(method(vendorName))]
15        #[unsafe(method_family = none)]
16        unsafe fn vendorName(&self) -> Option<Retained<NSString>>;
17
18        /// The product category the device belongs to. This is useful for setting appropriate UI elements based on what type of device is connected.
19        ///
20        ///
21        /// See: GCProductCategories.h
22        #[unsafe(method(productCategory))]
23        #[unsafe(method_family = none)]
24        unsafe fn productCategory(&self) -> Retained<NSString>;
25
26        #[cfg(feature = "GCPhysicalInputProfile")]
27        /// Gets the physical input profile for the device.
28        ///
29        ///
30        /// Note: This is equivalent to the controller's gamepad, microGamepad, or extendedGamepad instance.
31        ///
32        /// See: GCController.microGamepad
33        ///
34        /// See: GCController.extendedGamepad
35        #[deprecated = "Use the physicalInputProfile property on GCController instead.  For GCKeyboard, use the keyboardInput property.  For GCMouse, use the mouseInput property."]
36        #[unsafe(method(physicalInputProfile))]
37        #[unsafe(method_family = none)]
38        unsafe fn physicalInputProfile(&self) -> Retained<GCPhysicalInputProfile>;
39    }
40);