# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.7

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.graphics.printing
import winsdk.windows.storage
import winsdk.windows.storage.streams

class ImageScannerAutoCroppingMode(enum.IntEnum):
    DISABLED = 0
    SINGLE_REGION = 1
    MULTIPLE_REGION = 2

class ImageScannerColorMode(enum.IntEnum):
    COLOR = 0
    GRAYSCALE = 1
    MONOCHROME = 2
    AUTO_COLOR = 3

class ImageScannerFormat(enum.IntEnum):
    JPEG = 0
    PNG = 1
    DEVICE_INDEPENDENT_BITMAP = 2
    TIFF = 3
    XPS = 4
    OPEN_XPS = 5
    PDF = 6

class ImageScannerScanSource(enum.IntEnum):
    DEFAULT = 0
    FLATBED = 1
    FEEDER = 2
    AUTO_CONFIGURED = 3

Self = typing.TypeVar('Self')

class ImageScannerResolution:
    dpi_x: _winrt.Single
    dpi_y: _winrt.Single
    def __new__(cls: typing.Type[ImageScannerResolution], dpi_x: _winrt.Single, dpi_y: _winrt.Single) -> ImageScannerResolution: ...

class ImageScanner(_winrt.Object):
    auto_configuration: typing.Optional[ImageScannerAutoConfiguration]
    default_scan_source: ImageScannerScanSource
    device_id: str
    feeder_configuration: typing.Optional[ImageScannerFeederConfiguration]
    flatbed_configuration: typing.Optional[ImageScannerFlatbedConfiguration]
    @staticmethod
    def _from(obj: _winrt.Object) -> ImageScanner: ...
    @staticmethod
    def from_id_async(device_id: str) -> winsdk.windows.foundation.IAsyncOperation[ImageScanner]: ...
    @staticmethod
    def get_device_selector() -> str: ...
    def is_preview_supported(self, scan_source: ImageScannerScanSource) -> _winrt.Boolean: ...
    def is_scan_source_supported(self, value: ImageScannerScanSource) -> _winrt.Boolean: ...
    def scan_files_to_folder_async(self, scan_source: ImageScannerScanSource, storage_folder: typing.Optional[winsdk.windows.storage.StorageFolder]) -> winsdk.windows.foundation.IAsyncOperationWithProgress[ImageScannerScanResult, _winrt.UInt32]: ...
    def scan_preview_to_stream_async(self, scan_source: ImageScannerScanSource, target_stream: typing.Optional[winsdk.windows.storage.streams.IRandomAccessStream]) -> winsdk.windows.foundation.IAsyncOperation[ImageScannerPreviewResult]: ...

class ImageScannerAutoConfiguration(_winrt.Object):
    format: ImageScannerFormat
    default_format: ImageScannerFormat
    @staticmethod
    def _from(obj: _winrt.Object) -> ImageScannerAutoConfiguration: ...
    def is_format_supported(self, value: ImageScannerFormat) -> _winrt.Boolean: ...

class ImageScannerFeederConfiguration(_winrt.Object):
    scan_ahead: _winrt.Boolean
    auto_detect_page_size: _winrt.Boolean
    duplex: _winrt.Boolean
    max_number_of_pages: _winrt.UInt32
    page_orientation: winsdk.windows.graphics.printing.PrintOrientation
    page_size: winsdk.windows.graphics.printing.PrintMediaSize
    page_size_dimensions: winsdk.windows.foundation.Size
    can_scan_duplex: _winrt.Boolean
    can_scan_ahead: _winrt.Boolean
    can_auto_detect_page_size: _winrt.Boolean
    format: ImageScannerFormat
    default_format: ImageScannerFormat
    desired_resolution: ImageScannerResolution
    contrast: _winrt.Int32
    color_mode: ImageScannerColorMode
    auto_cropping_mode: ImageScannerAutoCroppingMode
    brightness: _winrt.Int32
    selected_scan_region: winsdk.windows.foundation.Rect
    min_brightness: _winrt.Int32
    min_contrast: _winrt.Int32
    min_resolution: ImageScannerResolution
    min_scan_area: winsdk.windows.foundation.Size
    optical_resolution: ImageScannerResolution
    max_scan_area: winsdk.windows.foundation.Size
    max_resolution: ImageScannerResolution
    max_contrast: _winrt.Int32
    max_brightness: _winrt.Int32
    default_contrast: _winrt.Int32
    default_color_mode: ImageScannerColorMode
    default_brightness: _winrt.Int32
    contrast_step: _winrt.UInt32
    brightness_step: _winrt.UInt32
    actual_resolution: ImageScannerResolution
    @staticmethod
    def _from(obj: _winrt.Object) -> ImageScannerFeederConfiguration: ...
    def is_auto_cropping_mode_supported(self, value: ImageScannerAutoCroppingMode) -> _winrt.Boolean: ...
    def is_color_mode_supported(self, value: ImageScannerColorMode) -> _winrt.Boolean: ...
    def is_format_supported(self, value: ImageScannerFormat) -> _winrt.Boolean: ...
    def is_page_size_supported(self, page_size: winsdk.windows.graphics.printing.PrintMediaSize, page_orientation: winsdk.windows.graphics.printing.PrintOrientation) -> _winrt.Boolean: ...

class ImageScannerFlatbedConfiguration(_winrt.Object):
    format: ImageScannerFormat
    default_format: ImageScannerFormat
    selected_scan_region: winsdk.windows.foundation.Rect
    desired_resolution: ImageScannerResolution
    contrast: _winrt.Int32
    brightness: _winrt.Int32
    auto_cropping_mode: ImageScannerAutoCroppingMode
    color_mode: ImageScannerColorMode
    contrast_step: _winrt.UInt32
    default_brightness: _winrt.Int32
    default_color_mode: ImageScannerColorMode
    default_contrast: _winrt.Int32
    actual_resolution: ImageScannerResolution
    max_brightness: _winrt.Int32
    max_contrast: _winrt.Int32
    max_resolution: ImageScannerResolution
    max_scan_area: winsdk.windows.foundation.Size
    min_brightness: _winrt.Int32
    brightness_step: _winrt.UInt32
    min_contrast: _winrt.Int32
    min_resolution: ImageScannerResolution
    optical_resolution: ImageScannerResolution
    min_scan_area: winsdk.windows.foundation.Size
    @staticmethod
    def _from(obj: _winrt.Object) -> ImageScannerFlatbedConfiguration: ...
    def is_auto_cropping_mode_supported(self, value: ImageScannerAutoCroppingMode) -> _winrt.Boolean: ...
    def is_color_mode_supported(self, value: ImageScannerColorMode) -> _winrt.Boolean: ...
    def is_format_supported(self, value: ImageScannerFormat) -> _winrt.Boolean: ...

class ImageScannerPreviewResult(_winrt.Object):
    format: ImageScannerFormat
    succeeded: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> ImageScannerPreviewResult: ...

class ImageScannerScanResult(_winrt.Object):
    scanned_files: typing.Optional[winsdk.windows.foundation.collections.IVectorView[winsdk.windows.storage.StorageFile]]
    @staticmethod
    def _from(obj: _winrt.Object) -> ImageScannerScanResult: ...

class IImageScannerFormatConfiguration(_winrt.Object):
    default_format: ImageScannerFormat
    format: ImageScannerFormat
    @staticmethod
    def _from(obj: _winrt.Object) -> IImageScannerFormatConfiguration: ...
    def is_format_supported(self, value: ImageScannerFormat) -> _winrt.Boolean: ...

class IImageScannerSourceConfiguration(_winrt.Object):
    actual_resolution: ImageScannerResolution
    auto_cropping_mode: ImageScannerAutoCroppingMode
    brightness: _winrt.Int32
    brightness_step: _winrt.UInt32
    color_mode: ImageScannerColorMode
    contrast: _winrt.Int32
    contrast_step: _winrt.UInt32
    default_brightness: _winrt.Int32
    default_color_mode: ImageScannerColorMode
    default_contrast: _winrt.Int32
    desired_resolution: ImageScannerResolution
    max_brightness: _winrt.Int32
    max_contrast: _winrt.Int32
    max_resolution: ImageScannerResolution
    max_scan_area: winsdk.windows.foundation.Size
    min_brightness: _winrt.Int32
    min_contrast: _winrt.Int32
    min_resolution: ImageScannerResolution
    min_scan_area: winsdk.windows.foundation.Size
    optical_resolution: ImageScannerResolution
    selected_scan_region: winsdk.windows.foundation.Rect
    default_format: ImageScannerFormat
    format: ImageScannerFormat
    @staticmethod
    def _from(obj: _winrt.Object) -> IImageScannerSourceConfiguration: ...
    def is_auto_cropping_mode_supported(self, value: ImageScannerAutoCroppingMode) -> _winrt.Boolean: ...
    def is_color_mode_supported(self, value: ImageScannerColorMode) -> _winrt.Boolean: ...
    def is_format_supported(self, value: ImageScannerFormat) -> _winrt.Boolean: ...

