objc2_quartz/generated/ImageKit/
IKSlideshow.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait IKSlideshowDataSource {
17 #[unsafe(method(numberOfSlideshowItems))]
19 #[unsafe(method_family = none)]
20 unsafe fn numberOfSlideshowItems(&self) -> NSUInteger;
21
22 #[unsafe(method(slideshowItemAtIndex:))]
27 #[unsafe(method_family = none)]
28 unsafe fn slideshowItemAtIndex(&self, index: NSUInteger) -> Option<Retained<AnyObject>>;
29
30 #[optional]
32 #[unsafe(method(nameOfSlideshowItemAtIndex:))]
33 #[unsafe(method_family = none)]
34 unsafe fn nameOfSlideshowItemAtIndex(
35 &self,
36 index: NSUInteger,
37 ) -> Option<Retained<NSString>>;
38
39 #[optional]
41 #[unsafe(method(canExportSlideshowItemAtIndex:toApplication:))]
42 #[unsafe(method_family = none)]
43 unsafe fn canExportSlideshowItemAtIndex_toApplication(
44 &self,
45 index: NSUInteger,
46 application_bundle_identifier: Option<&NSString>,
47 ) -> bool;
48
49 #[optional]
51 #[unsafe(method(slideshowWillStart))]
52 #[unsafe(method_family = none)]
53 unsafe fn slideshowWillStart(&self);
54
55 #[optional]
57 #[unsafe(method(slideshowDidStop))]
58 #[unsafe(method_family = none)]
59 unsafe fn slideshowDidStop(&self);
60
61 #[optional]
63 #[unsafe(method(slideshowDidChangeCurrentIndex:))]
64 #[unsafe(method_family = none)]
65 unsafe fn slideshowDidChangeCurrentIndex(&self, new_index: NSUInteger);
66 }
67);
68
69extern_class!(
70 #[unsafe(super(NSObject))]
76 #[derive(Debug, PartialEq, Eq, Hash)]
77 pub struct IKSlideshow;
78);
79
80extern_conformance!(
81 unsafe impl NSObjectProtocol for IKSlideshow {}
82);
83
84impl IKSlideshow {
85 extern_methods!(
86 #[unsafe(method(autoPlayDelay))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn autoPlayDelay(&self) -> NSTimeInterval;
90
91 #[unsafe(method(setAutoPlayDelay:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn setAutoPlayDelay(&self, auto_play_delay: NSTimeInterval);
95
96 #[unsafe(method(sharedSlideshow))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn sharedSlideshow() -> Option<Retained<IKSlideshow>>;
100
101 #[unsafe(method(runSlideshowWithDataSource:inMode:options:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn runSlideshowWithDataSource_inMode_options(
105 &self,
106 data_source: Option<&ProtocolObject<dyn IKSlideshowDataSource>>,
107 slideshow_mode: Option<&NSString>,
108 slideshow_options: Option<&NSDictionary>,
109 );
110
111 #[unsafe(method(stopSlideshow:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn stopSlideshow(&self, sender: Option<&AnyObject>);
115
116 #[unsafe(method(reloadData))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn reloadData(&self);
120
121 #[unsafe(method(reloadSlideshowItemAtIndex:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn reloadSlideshowItemAtIndex(&self, index: NSUInteger);
125
126 #[unsafe(method(indexOfCurrentSlideshowItem))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn indexOfCurrentSlideshowItem(&self) -> NSUInteger;
130
131 #[unsafe(method(canExportToApplication:))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn canExportToApplication(
135 application_bundle_identifier: Option<&NSString>,
136 ) -> bool;
137
138 #[unsafe(method(exportSlideshowItem:toApplication:))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn exportSlideshowItem_toApplication(
144 item: Option<&AnyObject>,
145 application_bundle_identifier: Option<&NSString>,
146 );
147 );
148}
149
150impl IKSlideshow {
152 extern_methods!(
153 #[unsafe(method(init))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
156
157 #[unsafe(method(new))]
158 #[unsafe(method_family = new)]
159 pub unsafe fn new() -> Retained<Self>;
160 );
161}
162
163extern "C" {
164 pub static IKSlideshowModeImages: Option<&'static NSString>;
166}
167
168extern "C" {
169 pub static IKSlideshowModePDF: Option<&'static NSString>;
171}
172
173extern "C" {
174 pub static IKSlideshowModeOther: Option<&'static NSString>;
176}
177
178extern "C" {
179 pub static IKSlideshowWrapAround: Option<&'static NSString>;
181}
182
183extern "C" {
184 pub static IKSlideshowStartPaused: Option<&'static NSString>;
186}
187
188extern "C" {
189 pub static IKSlideshowStartIndex: Option<&'static NSString>;
191}
192
193extern "C" {
194 pub static IKSlideshowScreen: Option<&'static NSString>;
196}
197
198extern "C" {
199 pub static IKSlideshowAudioFile: Option<&'static NSString>;
201}
202
203extern "C" {
204 pub static IKSlideshowPDFDisplayBox: Option<&'static NSString>;
206}
207
208extern "C" {
209 pub static IKSlideshowPDFDisplayMode: Option<&'static NSString>;
211}
212
213extern "C" {
214 pub static IKSlideshowPDFDisplaysAsBook: Option<&'static NSString>;
216}
217
218extern "C" {
219 pub static IK_iPhotoBundleIdentifier: Option<&'static NSString>;
221}
222
223extern "C" {
224 pub static IK_ApertureBundleIdentifier: Option<&'static NSString>;
226}
227
228extern "C" {
229 pub static IK_MailBundleIdentifier: Option<&'static NSString>;
231}
232
233extern "C" {
234 pub static IK_PhotosBundleIdentifier: Option<&'static NSString>;
236}