Skip to main content

IKSlideshowDataSource

Trait IKSlideshowDataSource 

Source
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§

Source

unsafe fn numberOfSlideshowItems(&self) -> NSUInteger
where Self: Sized + Message,

return number of items in Slideshow.

Source

unsafe fn slideshowItemAtIndex( &self, index: NSUInteger, ) -> Option<Retained<AnyObject>>
where Self: Sized + Message,

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.

Source

unsafe fn nameOfSlideshowItemAtIndex( &self, index: NSUInteger, ) -> Option<Retained<NSString>>
where Self: Sized + Message,

Display name for item at index.

Source

unsafe fn canExportSlideshowItemAtIndex_toApplication( &self, index: NSUInteger, application_bundle_identifier: Option<&NSString>, ) -> bool
where Self: Sized + Message,

should the export button be enabled for a given item at index?

§Safety

application_bundle_identifier might not allow None.

Source

unsafe fn slideshowWillStart(&self)
where Self: Sized + Message,

Slideshow will start.

Source

unsafe fn slideshowDidStop(&self)
where Self: Sized + Message,

Slideshow did stop.

Source

unsafe fn slideshowDidChangeCurrentIndex(&self, new_index: NSUInteger)
where Self: Sized + Message,

Slideshow did change current item index.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn IKSlideshowDataSource

Source§

impl ProtocolType for dyn IKSlideshowDataSource

Source§

const NAME: &'static str = "IKSlideshowDataSource"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> IKSlideshowDataSource for ProtocolObject<T>

Implementors§