1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "dispatch2")]
use dispatch2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcdevice?language=objc)
pub unsafe trait GCDevice: NSObjectProtocol {
#[cfg(feature = "dispatch2")]
/// 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
#[unsafe(method(handlerQueue))]
#[unsafe(method_family = none)]
unsafe fn handlerQueue(&self) -> Retained<DispatchQueue>;
#[cfg(feature = "dispatch2")]
/// Setter for [`handlerQueue`][Self::handlerQueue].
///
/// # Safety
///
/// `handler_queue` possibly has additional threading requirements.
#[unsafe(method(setHandlerQueue:))]
#[unsafe(method_family = none)]
unsafe fn setHandlerQueue(&self, handler_queue: &DispatchQueue);
/// 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.
#[unsafe(method(vendorName))]
#[unsafe(method_family = none)]
unsafe fn vendorName(&self) -> Option<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
#[unsafe(method(productCategory))]
#[unsafe(method_family = none)]
unsafe fn productCategory(&self) -> Retained<NSString>;
#[cfg(feature = "GCPhysicalInputProfile")]
/// 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
#[deprecated = "Use the physicalInputProfile property on GCController instead. For GCKeyboard, use the keyboardInput property. For GCMouse, use the mouseInput property."]
#[unsafe(method(physicalInputProfile))]
#[unsafe(method_family = none)]
unsafe fn physicalInputProfile(&self) -> Retained<GCPhysicalInputProfile>;
}
);