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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
//! 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 UILargeContentViewerItem: NSObjectProtocol + IsMainThreadOnly {
        #[method(showsLargeContentViewer)]
        unsafe fn showsLargeContentViewer(&self) -> bool;

        #[method_id(@__retain_semantics Other largeContentTitle)]
        unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Other largeContentImage)]
        unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>;

        #[method(scalesLargeContentImage)]
        unsafe fn scalesLargeContentImage(&self) -> bool;

        #[cfg(feature = "UIGeometry")]
        #[method(largeContentImageInsets)]
        unsafe fn largeContentImageInsets(&self) -> UIEdgeInsets;
    }

    unsafe impl ProtocolType for dyn UILargeContentViewerItem {}
);

extern_methods!(
    /// UILargeContentViewer
    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
    unsafe impl UIView {
        #[method(showsLargeContentViewer)]
        pub unsafe fn showsLargeContentViewer(&self) -> bool;

        #[method(setShowsLargeContentViewer:)]
        pub unsafe fn setShowsLargeContentViewer(&self, shows_large_content_viewer: bool);

        #[method_id(@__retain_semantics Other largeContentTitle)]
        pub unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>;

        #[method(setLargeContentTitle:)]
        pub unsafe fn setLargeContentTitle(&self, large_content_title: Option<&NSString>);

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Other largeContentImage)]
        pub unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>;

        #[cfg(feature = "UIImage")]
        #[method(setLargeContentImage:)]
        pub unsafe fn setLargeContentImage(&self, large_content_image: Option<&UIImage>);

        #[method(scalesLargeContentImage)]
        pub unsafe fn scalesLargeContentImage(&self) -> bool;

        #[method(setScalesLargeContentImage:)]
        pub unsafe fn setScalesLargeContentImage(&self, scales_large_content_image: bool);

        #[cfg(feature = "UIGeometry")]
        #[method(largeContentImageInsets)]
        pub unsafe fn largeContentImageInsets(&self) -> UIEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setLargeContentImageInsets:)]
        pub unsafe fn setLargeContentImageInsets(&self, large_content_image_insets: UIEdgeInsets);
    }
);

#[cfg(all(feature = "UIResponder", feature = "UIView"))]
unsafe impl UILargeContentViewerItem for UIView {}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UILargeContentViewerInteraction;

    unsafe impl ClassType for UILargeContentViewerInteraction {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UILargeContentViewerInteraction {}

#[cfg(feature = "UIInteraction")]
unsafe impl UIInteraction for UILargeContentViewerInteraction {}

extern_methods!(
    unsafe impl UILargeContentViewerInteraction {
        #[method_id(@__retain_semantics Init initWithDelegate:)]
        pub unsafe fn initWithDelegate(
            this: Allocated<Self>,
            delegate: Option<&ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other delegate)]
        pub unsafe fn delegate(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>>;

        #[cfg(feature = "UIGestureRecognizer")]
        #[method_id(@__retain_semantics Other gestureRecognizerForExclusionRelationship)]
        pub unsafe fn gestureRecognizerForExclusionRelationship(
            &self,
        ) -> Retained<UIGestureRecognizer>;

        #[method(isEnabled)]
        pub unsafe fn isEnabled(mtm: MainThreadMarker) -> bool;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UILargeContentViewerInteraction {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

extern_protocol!(
    pub unsafe trait UILargeContentViewerInteractionDelegate:
        NSObjectProtocol + IsMainThreadOnly
    {
        #[optional]
        #[method(largeContentViewerInteraction:didEndOnItem:atPoint:)]
        unsafe fn largeContentViewerInteraction_didEndOnItem_atPoint(
            &self,
            interaction: &UILargeContentViewerInteraction,
            item: Option<&ProtocolObject<dyn UILargeContentViewerItem>>,
            point: CGPoint,
        );

        #[optional]
        #[method_id(@__retain_semantics Other largeContentViewerInteraction:itemAtPoint:)]
        unsafe fn largeContentViewerInteraction_itemAtPoint(
            &self,
            interaction: &UILargeContentViewerInteraction,
            point: CGPoint,
        ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerItem>>>;

        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
        #[optional]
        #[method_id(@__retain_semantics Other viewControllerForLargeContentViewerInteraction:)]
        unsafe fn viewControllerForLargeContentViewerInteraction(
            &self,
            interaction: &UILargeContentViewerInteraction,
        ) -> Retained<UIViewController>;
    }

    unsafe impl ProtocolType for dyn UILargeContentViewerInteractionDelegate {}
);

extern "C" {
    pub static UILargeContentViewerInteractionEnabledStatusDidChangeNotification:
        &'static NSNotificationName;
}