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 { ... }
}IKScannerDeviceView and ImageKit only.Expand description
A delegate of IKScannerDeviceView must conform to IKScannerDeviceViewDelegate protocol.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn scannerDeviceView_didScanToURL_fileData_error(
&self,
scanner_device_view: Option<&IKScannerDeviceView>,
url: Option<&NSURL>,
data: Option<&NSData>,
error: Option<&NSError>,
)
unsafe fn scannerDeviceView_didScanToURL_fileData_error( &self, scanner_device_view: Option<&IKScannerDeviceView>, url: Option<&NSURL>, data: Option<&NSData>, error: Option<&NSError>, )
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
Sourceunsafe fn scannerDeviceView_didScanToURL_error(
&self,
scanner_device_view: Option<&IKScannerDeviceView>,
url: Option<&NSURL>,
error: Option<&NSError>,
)
unsafe fn scannerDeviceView_didScanToURL_error( &self, scanner_device_view: Option<&IKScannerDeviceView>, url: Option<&NSURL>, error: Option<&NSError>, )
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
Sourceunsafe fn scannerDeviceView_didScanToBandData_scanInfo_error(
&self,
scanner_device_view: Option<&IKScannerDeviceView>,
data: Option<&ICScannerBandData>,
scan_info: Option<&NSDictionary>,
error: Option<&NSError>,
)
Available on crate feature objc2-image-capture-core only.
unsafe fn scannerDeviceView_didScanToBandData_scanInfo_error( &self, scanner_device_view: Option<&IKScannerDeviceView>, data: Option<&ICScannerBandData>, scan_info: Option<&NSDictionary>, error: Option<&NSError>, )
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.
Sourceunsafe fn scannerDeviceView_didEncounterError(
&self,
scanner_device_view: Option<&IKScannerDeviceView>,
error: Option<&NSError>,
)
unsafe fn scannerDeviceView_didEncounterError( &self, scanner_device_view: Option<&IKScannerDeviceView>, error: Option<&NSError>, )
This message is sent every time the scanner device reports an error.