IKScannerDeviceViewDelegate

Trait IKScannerDeviceViewDelegate 

Source
pub unsafe trait IKScannerDeviceViewDelegate {
    // Provided methods
    unsafe fn scannerDeviceView_didScanToURL_fileData_error(
        &self,
        scanner_device_view: Option<&IKScannerDeviceView>,
        url: Option<&NSURL>,
        data: Option<&NSData>,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDeviceView_didScanToURL_error(
        &self,
        scanner_device_view: Option<&IKScannerDeviceView>,
        url: Option<&NSURL>,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDeviceView_didScanToBandData_scanInfo_error(
        &self,
        scanner_device_view: Option<&IKScannerDeviceView>,
        data: Option<&ICScannerBandData>,
        scan_info: Option<&NSDictionary>,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn scannerDeviceView_didEncounterError(
        &self,
        scanner_device_view: Option<&IKScannerDeviceView>,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
}
Available on crate features IKScannerDeviceView and ImageKit only.
Expand description

A delegate of IKScannerDeviceView must conform to IKScannerDeviceViewDelegate protocol.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn scannerDeviceView_didScanToURL_fileData_error( &self, scanner_device_view: Option<&IKScannerDeviceView>, url: Option<&NSURL>, data: Option<&NSData>, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent for each image that gets scanned.

Based on the IKScannerDeviceViewTransferMode the downloaded file will be saved on disk using the ‘url’, or returned in memory as NSData

Source

unsafe fn scannerDeviceView_didScanToURL_error( &self, scanner_device_view: Option<&IKScannerDeviceView>, url: Option<&NSURL>, error: Option<&NSError>, )
where Self: Sized + Message,

For file based transfer this message is sent for each image that gets scanned.

Based on the IKScannerDeviceViewTransferMode the downloaded file will be saved on disk using the ‘url’, or returned in memory as NSData

Source

unsafe fn scannerDeviceView_didScanToBandData_scanInfo_error( &self, scanner_device_view: Option<&IKScannerDeviceView>, data: Option<&ICScannerBandData>, scan_info: Option<&NSDictionary>, error: Option<&NSError>, )
where Self: Sized + Message,

Available on crate feature objc2-image-capture-core only.

For memory a based transfer this message is sent for every time an image band of data was scanned.

The ‘data’ parameter describes the scanned image data. Note that rotation/cropping/image adjustments are not applied yet. The ‘scanInfo’ parameter contains additional information (rotation angle, …) that should be applied once the scan is completed.

Source

unsafe fn scannerDeviceView_didEncounterError( &self, scanner_device_view: Option<&IKScannerDeviceView>, error: Option<&NSError>, )
where Self: Sized + Message,

This message is sent every time the scanner device reports an error.

Trait Implementations§

Source§

impl ProtocolType for dyn IKScannerDeviceViewDelegate

Source§

const NAME: &'static str = "IKScannerDeviceViewDelegate"

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

impl<T> ImplementedBy<T> for dyn IKScannerDeviceViewDelegate

Implementations on Foreign Types§

Source§

impl<T> IKScannerDeviceViewDelegate for ProtocolObject<T>

Implementors§