//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0021
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "windowscontracts.idl";
import "Windows.Foundation.idl";
import "Windows.Graphics.Printing.idl";
import "Windows.Storage.idl";
import "Windows.Storage.Streams.idl";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        typedef struct Rect Rect;

        typedef struct Size Size;
    }
}
namespace Windows
{
    namespace Graphics
    {
        namespace Printing
        {
            typedef enum PrintMediaSize PrintMediaSize;

            typedef enum PrintOrientation PrintOrientation;
        }
    }
}
namespace Windows
{
    namespace Storage
    {
        runtimeclass StorageFile;

        runtimeclass StorageFolder;
    }
}
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            interface IRandomAccessStream;
        }
    }
}
namespace Windows
{
    namespace Devices
    {
        namespace Scanners
        {
            apicontract ScannerDeviceContract;

            typedef enum ImageScannerAutoCroppingMode ImageScannerAutoCroppingMode;

            typedef enum ImageScannerColorMode ImageScannerColorMode;

            typedef enum ImageScannerFormat ImageScannerFormat;

            typedef enum ImageScannerScanSource ImageScannerScanSource;

            typedef struct ImageScannerResolution ImageScannerResolution;

            interface IImageScanner;

            interface IImageScannerFeederConfiguration;

            interface IImageScannerFormatConfiguration;

            interface IImageScannerPreviewResult;

            interface IImageScannerScanResult;

            interface IImageScannerSourceConfiguration;

            interface IImageScannerStatics;

            runtimeclass ImageScanner;

            runtimeclass ImageScannerAutoConfiguration;

            runtimeclass ImageScannerFeederConfiguration;

            runtimeclass ImageScannerFlatbedConfiguration;

            runtimeclass ImageScannerPreviewResult;

            runtimeclass ImageScannerScanResult;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Devices
    {
        namespace Scanners
        {
            declare
            {
                interface Windows.Foundation.IAsyncOperationWithProgress<Windows.Devices.Scanners.ImageScannerScanResult*, UINT32>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.Scanners.ImageScanner*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.Scanners.ImageScannerPreviewResult*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Devices
    {
        namespace Scanners
        {
            [contractversion(1.0)]
            apicontract ScannerDeviceContract
            {
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            enum ImageScannerAutoCroppingMode
            {
                Disabled       = 0,
                SingleRegion   = 1,
                MultipleRegion = 2
            };

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            enum ImageScannerColorMode
            {
                Color      = 0,
                Grayscale  = 1,
                Monochrome = 2,
                AutoColor  = 3
            };

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            enum ImageScannerFormat
            {
                Jpeg                    = 0,
                Png                     = 1,
                DeviceIndependentBitmap = 2,
                Tiff                    = 3,
                Xps                     = 4,
                OpenXps                 = 5,
                Pdf                     = 6
            };

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            enum ImageScannerScanSource
            {
                Default        = 0,
                Flatbed        = 1,
                Feeder         = 2,
                AutoConfigured = 3
            };

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            struct ImageScannerResolution
            {
                FLOAT DpiX;
                FLOAT DpiY;
            };

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [exclusiveto(Windows.Devices.Scanners.ImageScanner)]
            [uuid(53A88F78-5298-48A0-8DA3-8087519665E0)]
            interface IImageScanner : IInspectable
            {
                [propget] HRESULT DeviceId([out] [retval] HSTRING* value);
                [propget] HRESULT DefaultScanSource([out] [retval] Windows.Devices.Scanners.ImageScannerScanSource* value);
                HRESULT IsScanSourceSupported([in] Windows.Devices.Scanners.ImageScannerScanSource value, [out] [retval] boolean* result);
                [propget] HRESULT FlatbedConfiguration([out] [retval] Windows.Devices.Scanners.ImageScannerFlatbedConfiguration** value);
                [propget] HRESULT FeederConfiguration([out] [retval] Windows.Devices.Scanners.ImageScannerFeederConfiguration** value);
                [propget] HRESULT AutoConfiguration([out] [retval] Windows.Devices.Scanners.ImageScannerAutoConfiguration** value);
                HRESULT IsPreviewSupported([in] Windows.Devices.Scanners.ImageScannerScanSource scanSource, [out] [retval] boolean* result);
                HRESULT ScanPreviewToStreamAsync([in] Windows.Devices.Scanners.ImageScannerScanSource scanSource, [in] Windows.Storage.Streams.IRandomAccessStream* targetStream, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Scanners.ImageScannerPreviewResult*>** operation);
                HRESULT ScanFilesToFolderAsync([in] Windows.Devices.Scanners.ImageScannerScanSource scanSource, [in] Windows.Storage.StorageFolder* storageFolder, [out] [retval] Windows.Foundation.IAsyncOperationWithProgress<Windows.Devices.Scanners.ImageScannerScanResult*, UINT32>** operation);
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [exclusiveto(Windows.Devices.Scanners.ImageScannerFeederConfiguration)]
            [uuid(74BDACEE-FA97-4C17-8280-40E39C6DCC67)]
            interface IImageScannerFeederConfiguration : IInspectable
                requires
                    Windows.Devices.Scanners.IImageScannerFormatConfiguration,
                    Windows.Devices.Scanners.IImageScannerSourceConfiguration
            {
                [propget] HRESULT CanAutoDetectPageSize([out] [retval] boolean* value);
                [propget] HRESULT AutoDetectPageSize([out] [retval] boolean* value);
                [propput] HRESULT AutoDetectPageSize([in] boolean value);
                [propget] HRESULT PageSize([out] [retval] Windows.Graphics.Printing.PrintMediaSize* value);
                [propput] HRESULT PageSize([in] Windows.Graphics.Printing.PrintMediaSize value);
                [propget] HRESULT PageOrientation([out] [retval] Windows.Graphics.Printing.PrintOrientation* value);
                [propput] HRESULT PageOrientation([in] Windows.Graphics.Printing.PrintOrientation value);
                [propget] HRESULT PageSizeDimensions([out] [retval] Windows.Foundation.Size* value);
                HRESULT IsPageSizeSupported([in] Windows.Graphics.Printing.PrintMediaSize pageSize, [in] Windows.Graphics.Printing.PrintOrientation pageOrientation, [out] [retval] boolean* result);
                [propget] HRESULT MaxNumberOfPages([out] [retval] UINT32* value);
                [propput] HRESULT MaxNumberOfPages([in] UINT32 value);
                [propget] HRESULT CanScanDuplex([out] [retval] boolean* value);
                [propget] HRESULT Duplex([out] [retval] boolean* value);
                [propput] HRESULT Duplex([in] boolean value);
                [propget] HRESULT CanScanAhead([out] [retval] boolean* value);
                [propget] HRESULT ScanAhead([out] [retval] boolean* value);
                [propput] HRESULT ScanAhead([in] boolean value);
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [uuid(AE275D11-DADF-4010-BF10-CCA5C83DCBB0)]
            interface IImageScannerFormatConfiguration : IInspectable
            {
                [propget] HRESULT DefaultFormat([out] [retval] Windows.Devices.Scanners.ImageScannerFormat* value);
                [propget] HRESULT Format([out] [retval] Windows.Devices.Scanners.ImageScannerFormat* value);
                [propput] HRESULT Format([in] Windows.Devices.Scanners.ImageScannerFormat value);
                HRESULT IsFormatSupported([in] Windows.Devices.Scanners.ImageScannerFormat value, [out] [retval] boolean* result);
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [exclusiveto(Windows.Devices.Scanners.ImageScannerPreviewResult)]
            [uuid(08B7FE8E-8891-441D-BE9C-176FA109C8BB)]
            interface IImageScannerPreviewResult : IInspectable
            {
                [propget] HRESULT Succeeded([out] [retval] boolean* value);
                [propget] HRESULT Format([out] [retval] Windows.Devices.Scanners.ImageScannerFormat* value);
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [exclusiveto(Windows.Devices.Scanners.ImageScannerScanResult)]
            [uuid(C91624CD-9037-4E48-84C1-AC0975076BC5)]
            interface IImageScannerScanResult : IInspectable
            {
                [propget] HRESULT ScannedFiles([out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Storage.StorageFile*>** value);
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [uuid(BFB50055-0B44-4C82-9E89-205F9C234E59)]
            interface IImageScannerSourceConfiguration : IInspectable
                requires
                    Windows.Devices.Scanners.IImageScannerFormatConfiguration
            {
                [propget] HRESULT MinScanArea([out] [retval] Windows.Foundation.Size* value);
                [propget] HRESULT MaxScanArea([out] [retval] Windows.Foundation.Size* value);
                [propget] HRESULT SelectedScanRegion([out] [retval] Windows.Foundation.Rect* value);
                [propput] HRESULT SelectedScanRegion([in] Windows.Foundation.Rect value);
                [propget] HRESULT AutoCroppingMode([out] [retval] Windows.Devices.Scanners.ImageScannerAutoCroppingMode* value);
                [propput] HRESULT AutoCroppingMode([in] Windows.Devices.Scanners.ImageScannerAutoCroppingMode value);
                HRESULT IsAutoCroppingModeSupported([in] Windows.Devices.Scanners.ImageScannerAutoCroppingMode value, [out] [retval] boolean* result);
                [propget] HRESULT MinResolution([out] [retval] Windows.Devices.Scanners.ImageScannerResolution* value);
                [propget] HRESULT MaxResolution([out] [retval] Windows.Devices.Scanners.ImageScannerResolution* value);
                [propget] HRESULT OpticalResolution([out] [retval] Windows.Devices.Scanners.ImageScannerResolution* value);
                [propget] HRESULT DesiredResolution([out] [retval] Windows.Devices.Scanners.ImageScannerResolution* value);
                [propput] HRESULT DesiredResolution([in] Windows.Devices.Scanners.ImageScannerResolution value);
                [propget] HRESULT ActualResolution([out] [retval] Windows.Devices.Scanners.ImageScannerResolution* value);
                [propget] HRESULT DefaultColorMode([out] [retval] Windows.Devices.Scanners.ImageScannerColorMode* value);
                [propget] HRESULT ColorMode([out] [retval] Windows.Devices.Scanners.ImageScannerColorMode* value);
                [propput] HRESULT ColorMode([in] Windows.Devices.Scanners.ImageScannerColorMode value);
                HRESULT IsColorModeSupported([in] Windows.Devices.Scanners.ImageScannerColorMode value, [out] [retval] boolean* result);
                [propget] HRESULT MinBrightness([out] [retval] INT32* value);
                [propget] HRESULT MaxBrightness([out] [retval] INT32* value);
                [propget] HRESULT BrightnessStep([out] [retval] UINT32* value);
                [propget] HRESULT DefaultBrightness([out] [retval] INT32* value);
                [propget] HRESULT Brightness([out] [retval] INT32* value);
                [propput] HRESULT Brightness([in] INT32 value);
                [propget] HRESULT MinContrast([out] [retval] INT32* value);
                [propget] HRESULT MaxContrast([out] [retval] INT32* value);
                [propget] HRESULT ContrastStep([out] [retval] UINT32* value);
                [propget] HRESULT DefaultContrast([out] [retval] INT32* value);
                [propget] HRESULT Contrast([out] [retval] INT32* value);
                [propput] HRESULT Contrast([in] INT32 value);
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [exclusiveto(Windows.Devices.Scanners.ImageScanner)]
            [uuid(BC57E70E-D804-4477-9FB5-B911B5473897)]
            interface IImageScannerStatics : IInspectable
            {
                HRESULT FromIdAsync([in] HSTRING deviceId, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Scanners.ImageScanner*>** asyncInfo);
                HRESULT GetDeviceSelector([out] [retval] HSTRING* selector);
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.Scanners.IImageScannerStatics, Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [threading(both)]
            runtimeclass ImageScanner
            {
                [default] interface Windows.Devices.Scanners.IImageScanner;
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass ImageScannerAutoConfiguration
            {
                [default] interface Windows.Devices.Scanners.IImageScannerFormatConfiguration;
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass ImageScannerFeederConfiguration
            {
                [default] interface Windows.Devices.Scanners.IImageScannerFormatConfiguration;
                interface Windows.Devices.Scanners.IImageScannerSourceConfiguration;
                interface Windows.Devices.Scanners.IImageScannerFeederConfiguration;
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass ImageScannerFlatbedConfiguration
            {
                [default] interface Windows.Devices.Scanners.IImageScannerFormatConfiguration;
                interface Windows.Devices.Scanners.IImageScannerSourceConfiguration;
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass ImageScannerPreviewResult
            {
                [default] interface Windows.Devices.Scanners.IImageScannerPreviewResult;
            }

            [contract(Windows.Devices.Scanners.ScannerDeviceContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass ImageScannerScanResult
            {
                [default] interface Windows.Devices.Scanners.IImageScannerScanResult;
            }
        }
    }
}
