# 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.storage

class AddFileResult(enum.IntEnum):
    ADDED = 0
    ALREADY_ADDED = 1
    NOT_ALLOWED = 2
    UNAVAILABLE = 3

class FileSelectionMode(enum.IntEnum):
    SINGLE = 0
    MULTIPLE = 1

class SetFileNameResult(enum.IntEnum):
    SUCCEEDED = 0
    NOT_ALLOWED = 1
    UNAVAILABLE = 2

Self = typing.TypeVar('Self')

class FileOpenPickerUI(winsdk.system.Object):
    title: str
    allowed_file_types: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    selection_mode: FileSelectionMode
    settings_identifier: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> FileOpenPickerUI: ...
    def add_file(self, id: str, file: typing.Optional[winsdk.windows.storage.IStorageFile], /) -> AddFileResult: ...
    def can_add_file(self, file: typing.Optional[winsdk.windows.storage.IStorageFile], /) -> winsdk.system.Boolean: ...
    def contains_file(self, id: str, /) -> winsdk.system.Boolean: ...
    def remove_file(self, id: str, /) -> None: ...
    def add_closing(self, handler: winsdk.windows.foundation.TypedEventHandler[FileOpenPickerUI, PickerClosingEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_closing(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_file_removed(self, handler: winsdk.windows.foundation.TypedEventHandler[FileOpenPickerUI, FileRemovedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_file_removed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class FileRemovedEventArgs(winsdk.system.Object):
    id: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> FileRemovedEventArgs: ...

class FileSavePickerUI(winsdk.system.Object):
    title: str
    allowed_file_types: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    file_name: str
    settings_identifier: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> FileSavePickerUI: ...
    def try_set_file_name(self, value: str, /) -> SetFileNameResult: ...
    def add_file_name_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[FileSavePickerUI, winsdk.system.Object], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_file_name_changed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_target_file_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[FileSavePickerUI, TargetFileRequestedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_target_file_requested(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class PickerClosingDeferral(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PickerClosingDeferral: ...
    def complete(self) -> None: ...

class PickerClosingEventArgs(winsdk.system.Object):
    closing_operation: typing.Optional[PickerClosingOperation]
    is_canceled: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PickerClosingEventArgs: ...

class PickerClosingOperation(winsdk.system.Object):
    deadline: datetime.datetime
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PickerClosingOperation: ...
    def get_deferral(self) -> typing.Optional[PickerClosingDeferral]: ...

class TargetFileRequest(winsdk.system.Object):
    target_file: typing.Optional[winsdk.windows.storage.IStorageFile]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> TargetFileRequest: ...
    def get_deferral(self) -> typing.Optional[TargetFileRequestDeferral]: ...

class TargetFileRequestDeferral(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> TargetFileRequestDeferral: ...
    def complete(self) -> None: ...

class TargetFileRequestedEventArgs(winsdk.system.Object):
    request: typing.Optional[TargetFileRequest]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> TargetFileRequestedEventArgs: ...

