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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
#[cfg(feature = "block2")]
use block2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

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

        #[cfg(all(feature = "GCPhysicalInputElement", feature = "block2"))]
        #[method(elementValueDidChangeHandler)]
        unsafe fn elementValueDidChangeHandler(
            &self,
        ) -> *mut Block<
            dyn Fn(
                NonNull<ProtocolObject<dyn GCDevicePhysicalInput>>,
                NonNull<ProtocolObject<dyn GCPhysicalInputElement>>,
            ),
        >;

        #[cfg(all(feature = "GCPhysicalInputElement", feature = "block2"))]
        #[method(setElementValueDidChangeHandler:)]
        unsafe fn setElementValueDidChangeHandler(
            &self,
            element_value_did_change_handler: Option<
                &Block<
                    dyn Fn(
                        NonNull<ProtocolObject<dyn GCDevicePhysicalInput>>,
                        NonNull<ProtocolObject<dyn GCPhysicalInputElement>>,
                    ),
                >,
            >,
        );

        #[method_id(@__retain_semantics Other capture)]
        unsafe fn capture(&self) -> Id<ProtocolObject<dyn GCDevicePhysicalInputState>>;

        #[cfg(feature = "block2")]
        #[method(inputStateAvailableHandler)]
        unsafe fn inputStateAvailableHandler(
            &self,
        ) -> *mut Block<dyn Fn(NonNull<ProtocolObject<dyn GCDevicePhysicalInput>>)>;

        #[cfg(feature = "block2")]
        #[method(setInputStateAvailableHandler:)]
        unsafe fn setInputStateAvailableHandler(
            &self,
            input_state_available_handler: Option<
                &Block<dyn Fn(NonNull<ProtocolObject<dyn GCDevicePhysicalInput>>)>,
            >,
        );

        #[method(inputStateQueueDepth)]
        unsafe fn inputStateQueueDepth(&self) -> NSInteger;

        #[method(setInputStateQueueDepth:)]
        unsafe fn setInputStateQueueDepth(&self, input_state_queue_depth: NSInteger);

        #[cfg(feature = "GCDevicePhysicalInputStateDiff")]
        #[method_id(@__retain_semantics Other nextInputState)]
        unsafe fn nextInputState(&self) -> Option<Id<TodoProtocols>>;
    }

    #[cfg(feature = "GCDevicePhysicalInputState")]
    unsafe impl ProtocolType for dyn GCDevicePhysicalInput {}
);