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 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
§Safety
scanner_device_viewmight not allowNone.urlmight not allowNone.datamight not allowNone.errormight not allowNone.
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
§Safety
scanner_device_viewmight not allowNone.urlmight not allowNone.errormight not allowNone.
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.
§Safety
scanner_device_viewmight not allowNone.datamight not allowNone.scan_infogeneric should be of the correct type.scan_infomight not allowNone.errormight not allowNone.
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.
§Safety
scanner_device_viewmight not allowNone.errormight not allowNone.
Trait Implementations§
Source§impl ProtocolType for dyn IKScannerDeviceViewDelegate
Available on crate feature ImageKit only.
impl ProtocolType for dyn IKScannerDeviceViewDelegate
ImageKit only.impl<T> ImplementedBy<T> for dyn IKScannerDeviceViewDelegate
ImageKit only.Implementations on Foreign Types§
impl<T> IKScannerDeviceViewDelegate for ProtocolObject<T>where
T: ?Sized + IKScannerDeviceViewDelegate,
ImageKit only.