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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
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: winsdk.system.Single
    dpi_y: winsdk.system.Single
    def __new__(cls: typing.Type[ImageScannerResolution], dpi_x: winsdk.system.Single, dpi_y: winsdk.system.Single) -> ImageScannerResolution: ...

class ImageScanner(winsdk.system.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: winsdk.system.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, /) -> winsdk.system.Boolean: ...
    def is_scan_source_supported(self, value: ImageScannerScanSource, /) -> winsdk.system.Boolean: ...
    def scan_files_to_folder_async(self, scan_source: ImageScannerScanSource, storage_folder: typing.Optional[winsdk.windows.storage.StorageFolder], /) -> winsdk.windows.foundation.IAsyncOperationWithProgress[ImageScannerScanResult, winsdk.system.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(winsdk.system.Object):
    format: ImageScannerFormat
    default_format: ImageScannerFormat
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> ImageScannerAutoConfiguration: ...
    def is_format_supported(self, value: ImageScannerFormat, /) -> winsdk.system.Boolean: ...

class ImageScannerFeederConfiguration(winsdk.system.Object):
    scan_ahead: winsdk.system.Boolean
    auto_detect_page_size: winsdk.system.Boolean
    duplex: winsdk.system.Boolean
    max_number_of_pages: winsdk.system.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: winsdk.system.Boolean
    can_scan_ahead: winsdk.system.Boolean
    can_auto_detect_page_size: winsdk.system.Boolean
    format: ImageScannerFormat
    default_format: ImageScannerFormat
    desired_resolution: ImageScannerResolution
    contrast: winsdk.system.Int32
    color_mode: ImageScannerColorMode
    auto_cropping_mode: ImageScannerAutoCroppingMode
    brightness: winsdk.system.Int32
    selected_scan_region: winsdk.windows.foundation.Rect
    min_brightness: winsdk.system.Int32
    min_contrast: winsdk.system.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: winsdk.system.Int32
    max_brightness: winsdk.system.Int32
    default_contrast: winsdk.system.Int32
    default_color_mode: ImageScannerColorMode
    default_brightness: winsdk.system.Int32
    contrast_step: winsdk.system.UInt32
    brightness_step: winsdk.system.UInt32
    actual_resolution: ImageScannerResolution
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> ImageScannerFeederConfiguration: ...
    def is_auto_cropping_mode_supported(self, value: ImageScannerAutoCroppingMode, /) -> winsdk.system.Boolean: ...
    def is_color_mode_supported(self, value: ImageScannerColorMode, /) -> winsdk.system.Boolean: ...
    def is_format_supported(self, value: ImageScannerFormat, /) -> winsdk.system.Boolean: ...
    def is_page_size_supported(self, page_size: winsdk.windows.graphics.printing.PrintMediaSize, page_orientation: winsdk.windows.graphics.printing.PrintOrientation, /) -> winsdk.system.Boolean: ...

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

class ImageScannerPreviewResult(winsdk.system.Object):
    format: ImageScannerFormat
    succeeded: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> ImageScannerPreviewResult: ...

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

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

class IImageScannerSourceConfiguration(winsdk.system.Object):
    actual_resolution: ImageScannerResolution
    auto_cropping_mode: ImageScannerAutoCroppingMode
    brightness: winsdk.system.Int32
    brightness_step: winsdk.system.UInt32
    color_mode: ImageScannerColorMode
    contrast: winsdk.system.Int32
    contrast_step: winsdk.system.UInt32
    default_brightness: winsdk.system.Int32
    default_color_mode: ImageScannerColorMode
    default_contrast: winsdk.system.Int32
    desired_resolution: ImageScannerResolution
    max_brightness: winsdk.system.Int32
    max_contrast: winsdk.system.Int32
    max_resolution: ImageScannerResolution
    max_scan_area: winsdk.windows.foundation.Size
    min_brightness: winsdk.system.Int32
    min_contrast: winsdk.system.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: winsdk.system.Object, /) -> IImageScannerSourceConfiguration: ...
    def is_auto_cropping_mode_supported(self, value: ImageScannerAutoCroppingMode, /) -> winsdk.system.Boolean: ...
    def is_color_mode_supported(self, value: ImageScannerColorMode, /) -> winsdk.system.Boolean: ...
    def is_format_supported(self, value: ImageScannerFormat, /) -> winsdk.system.Boolean: ...

