pub trait ICScannerFunctionalUnit: Sized {
Show 40 methods
// Required methods
unsafe fn type_(self) -> ICScannerFunctionalUnitType;
unsafe fn pixelDataType(self) -> ICScannerPixelDataType;
unsafe fn setPixelDataType(self, pixelDataType: ICScannerPixelDataType);
unsafe fn supportedBitDepths(self) -> id;
unsafe fn bitDepth(self) -> ICScannerBitDepth;
unsafe fn setBitDepth(self, bitDepth: ICScannerBitDepth);
unsafe fn supportedMeasurementUnits(self) -> id;
unsafe fn measurementUnit(self) -> ICScannerMeasurementUnit;
unsafe fn setMeasurementUnit(
self,
measurementUnit: ICScannerMeasurementUnit,
);
unsafe fn supportedResolutions(self) -> id;
unsafe fn preferredResolutions(self) -> id;
unsafe fn resolution(self) -> NSUInteger;
unsafe fn setResolution(self, resolution: NSUInteger);
unsafe fn nativeXResolution(self) -> NSUInteger;
unsafe fn nativeYResolution(self) -> NSUInteger;
unsafe fn supportedScaleFactors(self) -> id;
unsafe fn preferredScaleFactors(self) -> id;
unsafe fn scaleFactor(self) -> NSUInteger;
unsafe fn setScaleFactor(self, scaleFactor: NSUInteger);
unsafe fn templates(self) -> id;
unsafe fn vendorFeatures(self) -> id;
unsafe fn physicalSize(self) -> NSSize;
unsafe fn scanArea(self) -> NSRect;
unsafe fn setScanArea(self, scanArea: NSRect);
unsafe fn scanAreaOrientation(self) -> ICEXIFOrientationType;
unsafe fn setScanAreaOrientation(
self,
scanAreaOrientation: ICEXIFOrientationType,
);
unsafe fn acceptsThresholdForBlackAndWhiteScanning(self) -> BOOL;
unsafe fn usesThresholdForBlackAndWhiteScanning(self) -> BOOL;
unsafe fn setUsesThresholdForBlackAndWhiteScanning(
self,
usesThresholdForBlackAndWhiteScanning: BOOL,
);
unsafe fn defaultThresholdForBlackAndWhiteScanning(self) -> c_uchar;
unsafe fn thresholdForBlackAndWhiteScanning(self) -> c_uchar;
unsafe fn setThresholdForBlackAndWhiteScanning(
self,
thresholdForBlackAndWhiteScanning: c_uchar,
);
unsafe fn state(self) -> ICScannerFunctionalUnitState;
unsafe fn scanInProgress(self) -> BOOL;
unsafe fn scanProgressPercentDone(self) -> CGFloat;
unsafe fn canPerformOverviewScan(self) -> BOOL;
unsafe fn overviewScanInProgress(self) -> BOOL;
unsafe fn overviewImage(self) -> CGImageRef;
unsafe fn overviewResolution(self) -> NSUInteger;
unsafe fn setOverviewResolution(self, overviewResolution: NSUInteger);
}Expand description
ICScannerFunctionalUnit is an abstract class that represents a scanner functiona unit. ImageCaptureCore defines three concrete subclasses of ICScannerFunctionalUnit: ICScannerFunctionalUnitFlatbed, ICScannerFunctionalUnitPositiveTransparency, ICScannerFunctionalUnitNegativeTransparency and ICScannerFunctionalUnitDocumentFeeder. ICScannerDevice creates instances of these concrete subclasses.
Required Methods§
Sourceunsafe fn type_(self) -> ICScannerFunctionalUnitType
unsafe fn type_(self) -> ICScannerFunctionalUnitType
Functional unit type.
Sourceunsafe fn pixelDataType(self) -> ICScannerPixelDataType
unsafe fn pixelDataType(self) -> ICScannerPixelDataType
The pixel data type.
Sourceunsafe fn setPixelDataType(self, pixelDataType: ICScannerPixelDataType)
unsafe fn setPixelDataType(self, pixelDataType: ICScannerPixelDataType)
Set the pixel data type.
Sourceunsafe fn supportedBitDepths(self) -> id
unsafe fn supportedBitDepths(self) -> id
Supported bit depths. The values in this set are valid values defined by ICScannerBitDepth.
Sourceunsafe fn bitDepth(self) -> ICScannerBitDepth
unsafe fn bitDepth(self) -> ICScannerBitDepth
The bit depth to use when performing the final scan. This will always be one of the supported bit depths.
Sourceunsafe fn setBitDepth(self, bitDepth: ICScannerBitDepth)
unsafe fn setBitDepth(self, bitDepth: ICScannerBitDepth)
Set the bit depth to use when performing the final scan.
Sourceunsafe fn supportedMeasurementUnits(self) -> id
unsafe fn supportedMeasurementUnits(self) -> id
Supported measurement units. The values in this set are valid values defined by ICScannerMeasurementUnit.
Sourceunsafe fn measurementUnit(self) -> ICScannerMeasurementUnit
unsafe fn measurementUnit(self) -> ICScannerMeasurementUnit
Current measurement unit. This will always be one of the supported measurement units.
Sourceunsafe fn setMeasurementUnit(self, measurementUnit: ICScannerMeasurementUnit)
unsafe fn setMeasurementUnit(self, measurementUnit: ICScannerMeasurementUnit)
Set current measurement unit.
Sourceunsafe fn supportedResolutions(self) -> id
unsafe fn supportedResolutions(self) -> id
Supported scan resolutions in DPI.
Sourceunsafe fn preferredResolutions(self) -> id
unsafe fn preferredResolutions(self) -> id
Preferred scan resolutions in DPI.
Sourceunsafe fn resolution(self) -> NSUInteger
unsafe fn resolution(self) -> NSUInteger
Current scan resolution. This will always be one of the supported resolution values.
Sourceunsafe fn setResolution(self, resolution: NSUInteger)
unsafe fn setResolution(self, resolution: NSUInteger)
Set the current scan resolution.
Sourceunsafe fn nativeXResolution(self) -> NSUInteger
unsafe fn nativeXResolution(self) -> NSUInteger
Optical resolution along the X axis.
Sourceunsafe fn nativeYResolution(self) -> NSUInteger
unsafe fn nativeYResolution(self) -> NSUInteger
Optical resolution along the Y axis.
Sourceunsafe fn supportedScaleFactors(self) -> id
unsafe fn supportedScaleFactors(self) -> id
Supported scale factors in percentage.
Sourceunsafe fn preferredScaleFactors(self) -> id
unsafe fn preferredScaleFactors(self) -> id
Preferred scale factors in percentage.
Sourceunsafe fn scaleFactor(self) -> NSUInteger
unsafe fn scaleFactor(self) -> NSUInteger
Current scale factor. This will always be one of the supported scale factor values.
Sourceunsafe fn setScaleFactor(self, scaleFactor: NSUInteger)
unsafe fn setScaleFactor(self, scaleFactor: NSUInteger)
Set the current scale factor.
Sourceunsafe fn vendorFeatures(self) -> id
unsafe fn vendorFeatures(self) -> id
An array of objects of type ICScannerFeature.
Sourceunsafe fn physicalSize(self) -> NSSize
unsafe fn physicalSize(self) -> NSSize
Physical size of the scan area in current measurement unit.
Sourceunsafe fn scanArea(self) -> NSRect
unsafe fn scanArea(self) -> NSRect
This property along with scanAreaOrientation describes the area to be scanned.
Sourceunsafe fn setScanArea(self, scanArea: NSRect)
unsafe fn setScanArea(self, scanArea: NSRect)
Set the area to be scanned.
Sourceunsafe fn scanAreaOrientation(self) -> ICEXIFOrientationType
unsafe fn scanAreaOrientation(self) -> ICEXIFOrientationType
Desired orientation of the scan area. This property along with scanArea describes the area to be scanned.
Sourceunsafe fn setScanAreaOrientation(
self,
scanAreaOrientation: ICEXIFOrientationType,
)
unsafe fn setScanAreaOrientation( self, scanAreaOrientation: ICEXIFOrientationType, )
Set the orientation of the scan area.
Sourceunsafe fn acceptsThresholdForBlackAndWhiteScanning(self) -> BOOL
unsafe fn acceptsThresholdForBlackAndWhiteScanning(self) -> BOOL
Indicates if this functional unit accepts threshold value to be used when performing a scan in black & white.
Sourceunsafe fn usesThresholdForBlackAndWhiteScanning(self) -> BOOL
unsafe fn usesThresholdForBlackAndWhiteScanning(self) -> BOOL
Indicates if this functional unit uses threshold value to be used when performing a scan in black & white.
Sourceunsafe fn setUsesThresholdForBlackAndWhiteScanning(
self,
usesThresholdForBlackAndWhiteScanning: BOOL,
)
unsafe fn setUsesThresholdForBlackAndWhiteScanning( self, usesThresholdForBlackAndWhiteScanning: BOOL, )
Indicate if this functional unit uses threshold value to be used when performing a scan in black & white.
Sourceunsafe fn defaultThresholdForBlackAndWhiteScanning(self) -> c_uchar
unsafe fn defaultThresholdForBlackAndWhiteScanning(self) -> c_uchar
Default threshold value used when performing a scan in black & white. This value is from 0 to 255.
Sourceunsafe fn thresholdForBlackAndWhiteScanning(self) -> c_uchar
unsafe fn thresholdForBlackAndWhiteScanning(self) -> c_uchar
Threshold value to be used when performing a scan in black & white. This value should be from 0 to 255.
Sourceunsafe fn setThresholdForBlackAndWhiteScanning(
self,
thresholdForBlackAndWhiteScanning: c_uchar,
)
unsafe fn setThresholdForBlackAndWhiteScanning( self, thresholdForBlackAndWhiteScanning: c_uchar, )
Set the threshold value to be used when performing a scan in black & white.
Sourceunsafe fn state(self) -> ICScannerFunctionalUnitState
unsafe fn state(self) -> ICScannerFunctionalUnitState
Indicates the current state of the functional unit.
Sourceunsafe fn scanInProgress(self) -> BOOL
unsafe fn scanInProgress(self) -> BOOL
Indicates if a scan is in progress.
Sourceunsafe fn scanProgressPercentDone(self) -> CGFloat
unsafe fn scanProgressPercentDone(self) -> CGFloat
Indicates percentage of scan completed.
Sourceunsafe fn canPerformOverviewScan(self) -> BOOL
unsafe fn canPerformOverviewScan(self) -> BOOL
Indicates if this functional unit can perfrom an overview scan. Not all functional units can perform an overview scan. For example, a document feeder or a sheet feeder unit cannot perform an overview scan.
Sourceunsafe fn overviewScanInProgress(self) -> BOOL
unsafe fn overviewScanInProgress(self) -> BOOL
Indicates if an overview scan is in progress.
Sourceunsafe fn overviewImage(self) -> CGImageRef
unsafe fn overviewImage(self) -> CGImageRef
Overview scan image. This property will be NULL for functional units that do not support overview scans.
Sourceunsafe fn overviewResolution(self) -> NSUInteger
unsafe fn overviewResolution(self) -> NSUInteger
Overview image resolution. Value assigned to this will be contrained by resolutions allowed by the device.
Sourceunsafe fn setOverviewResolution(self, overviewResolution: NSUInteger)
unsafe fn setOverviewResolution(self, overviewResolution: NSUInteger)
Set the overview image resolution.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".