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
73
74
75
76
77
78
79
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    pub unsafe trait GCDevicePhysicalInputState: NSObjectProtocol {
        #[cfg(feature = "GCDevice")]
        #[method_id(@__retain_semantics Other device)]
        unsafe fn device(&self) -> Option<Retained<ProtocolObject<dyn GCDevice>>>;

        #[method(lastEventTimestamp)]
        unsafe fn lastEventTimestamp(&self) -> NSTimeInterval;

        #[method(lastEventLatency)]
        unsafe fn lastEventLatency(&self) -> NSTimeInterval;

        #[cfg(all(feature = "GCInputNames", feature = "GCPhysicalInputElement"))]
        #[method_id(@__retain_semantics Other elements)]
        unsafe fn elements(
            &self,
        ) -> Retained<
            GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCPhysicalInputElement>>,
        >;

        #[cfg(all(
            feature = "GCButtonElement",
            feature = "GCInputNames",
            feature = "GCPhysicalInputElement"
        ))]
        #[method_id(@__retain_semantics Other buttons)]
        unsafe fn buttons(
            &self,
        ) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCButtonElement>>>;

        #[cfg(all(
            feature = "GCAxisElement",
            feature = "GCInputNames",
            feature = "GCPhysicalInputElement"
        ))]
        #[method_id(@__retain_semantics Other axes)]
        unsafe fn axes(
            &self,
        ) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCAxisElement>>>;

        #[cfg(all(
            feature = "GCInputNames",
            feature = "GCPhysicalInputElement",
            feature = "GCSwitchElement"
        ))]
        #[method_id(@__retain_semantics Other switches)]
        unsafe fn switches(
            &self,
        ) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCSwitchElement>>>;

        #[cfg(all(
            feature = "GCDirectionPadElement",
            feature = "GCInputNames",
            feature = "GCPhysicalInputElement"
        ))]
        #[method_id(@__retain_semantics Other dpads)]
        unsafe fn dpads(
            &self,
        ) -> Retained<
            GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCDirectionPadElement>>,
        >;

        #[cfg(feature = "GCPhysicalInputElement")]
        #[method_id(@__retain_semantics Other objectForKeyedSubscript:)]
        unsafe fn objectForKeyedSubscript(
            &self,
            key: &NSString,
        ) -> Option<Retained<ProtocolObject<dyn GCPhysicalInputElement>>>;
    }

    unsafe impl ProtocolType for dyn GCDevicePhysicalInputState {}
);