pub unsafe trait IKSlideshowDataSource {
// Provided methods
unsafe fn numberOfSlideshowItems(&self) -> NSUInteger
where Self: Sized + Message { ... }
unsafe fn slideshowItemAtIndex(
&self,
index: NSUInteger,
) -> Option<Retained<AnyObject>>
where Self: Sized + Message { ... }
unsafe fn nameOfSlideshowItemAtIndex(
&self,
index: NSUInteger,
) -> Option<Retained<NSString>>
where Self: Sized + Message { ... }
unsafe fn canExportSlideshowItemAtIndex_toApplication(
&self,
index: NSUInteger,
application_bundle_identifier: Option<&NSString>,
) -> bool
where Self: Sized + Message { ... }
unsafe fn slideshowWillStart(&self)
where Self: Sized + Message { ... }
unsafe fn slideshowDidStop(&self)
where Self: Sized + Message { ... }
unsafe fn slideshowDidChangeCurrentIndex(&self, new_index: NSUInteger)
where Self: Sized + Message { ... }
}Available on crate features
IKSlideshow and ImageKit only.Expand description
The data source of IKSlideshow must conform to IKSlideshowDataSource protocol.
The data source methods may be called one a non-main thread.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn numberOfSlideshowItems(&self) -> NSUInteger
unsafe fn numberOfSlideshowItems(&self) -> NSUInteger
return number of items in Slideshow.
Sourceunsafe fn slideshowItemAtIndex(
&self,
index: NSUInteger,
) -> Option<Retained<AnyObject>>
unsafe fn slideshowItemAtIndex( &self, index: NSUInteger, ) -> Option<Retained<AnyObject>>
return the item for a given index.
The item can be either: NSImage, NSString, NSURL, CGImageRef, or PDFPage. Note: when using ‘IKSlideshowModeOther’ as slideshowMode, the item has to be a NSURL.
Sourceunsafe fn nameOfSlideshowItemAtIndex(
&self,
index: NSUInteger,
) -> Option<Retained<NSString>>
unsafe fn nameOfSlideshowItemAtIndex( &self, index: NSUInteger, ) -> Option<Retained<NSString>>
Display name for item at index.
Sourceunsafe fn canExportSlideshowItemAtIndex_toApplication(
&self,
index: NSUInteger,
application_bundle_identifier: Option<&NSString>,
) -> bool
unsafe fn canExportSlideshowItemAtIndex_toApplication( &self, index: NSUInteger, application_bundle_identifier: Option<&NSString>, ) -> bool
should the export button be enabled for a given item at index?
§Safety
application_bundle_identifier might not allow None.
Sourceunsafe fn slideshowWillStart(&self)
unsafe fn slideshowWillStart(&self)
Slideshow will start.
Sourceunsafe fn slideshowDidStop(&self)
unsafe fn slideshowDidStop(&self)
Slideshow did stop.
Sourceunsafe fn slideshowDidChangeCurrentIndex(&self, new_index: NSUInteger)
unsafe fn slideshowDidChangeCurrentIndex(&self, new_index: NSUInteger)
Slideshow did change current item index.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn IKSlideshowDataSource
Source§impl ProtocolType for dyn IKSlideshowDataSource
impl ProtocolType for dyn IKSlideshowDataSource
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".