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

import enum
import sys
import types
import typing
import uuid

import winsdk._winrt as _winrt

try:
    import winsdk.windows.applicationmodel.datatransfer
except Exception:
    pass

try:
    import winsdk.windows.foundation
except Exception:
    pass

try:
    import winsdk.windows.foundation.collections
except Exception:
    pass

try:
    import winsdk.windows.storage.streams
except Exception:
    pass

try:
    import winsdk.windows.ui
except Exception:
    pass

try:
    import winsdk.windows.web
except Exception:
    pass

try:
    import winsdk.windows.web.http
except Exception:
    pass

class WebViewControlPermissionState(enum.IntEnum):
    UNKNOWN = 0
    DEFER = 1
    ALLOW = 2
    DENY = 3

class WebViewControlPermissionType(enum.IntEnum):
    GEOLOCATION = 0
    UNLIMITED_INDEXED_D_B_QUOTA = 1
    MEDIA = 2
    POINTER_LOCK = 3
    WEB_NOTIFICATIONS = 4
    SCREEN = 5
    IMMERSIVE_VIEW = 6

class WebViewControlContentLoadingEventArgs(_winrt.Object):
    uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlContentLoadingEventArgs: ...

class WebViewControlDOMContentLoadedEventArgs(_winrt.Object):
    uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlDOMContentLoadedEventArgs: ...

class WebViewControlDeferredPermissionRequest(_winrt.Object):
    id: _winrt.UInt32
    permission_type: WebViewControlPermissionType
    uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlDeferredPermissionRequest: ...
    @typing.overload
    def allow(self) -> None: ...
    @typing.overload
    def deny(self) -> None: ...

class WebViewControlLongRunningScriptDetectedEventArgs(_winrt.Object):
    stop_page_script_execution: _winrt.Boolean
    execution_time: winsdk.windows.foundation.TimeSpan
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlLongRunningScriptDetectedEventArgs: ...

class WebViewControlNavigationCompletedEventArgs(_winrt.Object):
    is_success: _winrt.Boolean
    uri: winsdk.windows.foundation.Uri
    web_error_status: winsdk.windows.web.WebErrorStatus
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlNavigationCompletedEventArgs: ...

class WebViewControlNavigationStartingEventArgs(_winrt.Object):
    cancel: _winrt.Boolean
    uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlNavigationStartingEventArgs: ...

class WebViewControlNewWindowRequestedEventArgs(_winrt.Object):
    handled: _winrt.Boolean
    referrer: winsdk.windows.foundation.Uri
    uri: winsdk.windows.foundation.Uri
    new_window: IWebViewControl
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlNewWindowRequestedEventArgs: ...
    @typing.overload
    def get_deferral(self) -> winsdk.windows.foundation.Deferral: ...

class WebViewControlPermissionRequest(_winrt.Object):
    id: _winrt.UInt32
    permission_type: WebViewControlPermissionType
    state: WebViewControlPermissionState
    uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlPermissionRequest: ...
    @typing.overload
    def allow(self) -> None: ...
    @typing.overload
    def defer(self) -> None: ...
    @typing.overload
    def deny(self) -> None: ...

class WebViewControlPermissionRequestedEventArgs(_winrt.Object):
    permission_request: WebViewControlPermissionRequest
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlPermissionRequestedEventArgs: ...

class WebViewControlScriptNotifyEventArgs(_winrt.Object):
    uri: winsdk.windows.foundation.Uri
    value: str
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlScriptNotifyEventArgs: ...

class WebViewControlSettings(_winrt.Object):
    is_script_notify_allowed: _winrt.Boolean
    is_java_script_enabled: _winrt.Boolean
    is_indexed_d_b_enabled: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlSettings: ...

class WebViewControlUnsupportedUriSchemeIdentifiedEventArgs(_winrt.Object):
    handled: _winrt.Boolean
    uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlUnsupportedUriSchemeIdentifiedEventArgs: ...

class WebViewControlUnviewableContentIdentifiedEventArgs(_winrt.Object):
    media_type: str
    referrer: winsdk.windows.foundation.Uri
    uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlUnviewableContentIdentifiedEventArgs: ...

class WebViewControlWebResourceRequestedEventArgs(_winrt.Object):
    response: winsdk.windows.web.http.HttpResponseMessage
    request: winsdk.windows.web.http.HttpRequestMessage
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlWebResourceRequestedEventArgs: ...
    @typing.overload
    def get_deferral(self) -> winsdk.windows.foundation.Deferral: ...

class IWebViewControl(_winrt.Object):
    can_go_back: _winrt.Boolean
    can_go_forward: _winrt.Boolean
    contains_full_screen_element: _winrt.Boolean
    default_background_color: winsdk.windows.ui.Color
    deferred_permission_requests: winsdk.windows.foundation.collections.IVectorView[WebViewControlDeferredPermissionRequest]
    document_title: str
    settings: WebViewControlSettings
    source: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> IWebViewControl: ...
    @typing.overload
    def build_local_stream_uri(self, content_identifier: str, relative_path: str) -> winsdk.windows.foundation.Uri: ...
    @typing.overload
    def capture_preview_to_stream_async(self, stream: winsdk.windows.storage.streams.IRandomAccessStream) -> winsdk.windows.foundation.IAsyncAction: ...
    @typing.overload
    def capture_selected_content_to_data_package_async(self) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.applicationmodel.datatransfer.DataPackage]: ...
    @typing.overload
    def get_deferred_permission_request_by_id(self, id: _winrt.UInt32) -> WebViewControlDeferredPermissionRequest: ...
    @typing.overload
    def go_back(self) -> None: ...
    @typing.overload
    def go_forward(self) -> None: ...
    @typing.overload
    def invoke_script_async(self, script_name: str, arguments: typing.Iterable[str]) -> winsdk.windows.foundation.IAsyncOperation[str]: ...
    @typing.overload
    def navigate(self, source: winsdk.windows.foundation.Uri) -> None: ...
    @typing.overload
    def navigate_to_local_stream_uri(self, source: winsdk.windows.foundation.Uri, stream_resolver: winsdk.windows.web.IUriToStreamResolver) -> None: ...
    @typing.overload
    def navigate_to_string(self, text: str) -> None: ...
    @typing.overload
    def navigate_with_http_request_message(self, request_message: winsdk.windows.web.http.HttpRequestMessage) -> None: ...
    @typing.overload
    def refresh(self) -> None: ...
    @typing.overload
    def stop(self) -> None: ...
    @typing.overload
    def add_contains_full_screen_element_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_contains_full_screen_element_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_content_loading(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlContentLoadingEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_content_loading(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_d_o_m_content_loaded(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlDOMContentLoadedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_d_o_m_content_loaded(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_frame_content_loading(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlContentLoadingEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_frame_content_loading(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_frame_d_o_m_content_loaded(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlDOMContentLoadedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_frame_d_o_m_content_loaded(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_frame_navigation_completed(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlNavigationCompletedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_frame_navigation_completed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_frame_navigation_starting(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlNavigationStartingEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_frame_navigation_starting(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_long_running_script_detected(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlLongRunningScriptDetectedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_long_running_script_detected(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_navigation_completed(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlNavigationCompletedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_navigation_completed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_navigation_starting(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlNavigationStartingEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_navigation_starting(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_new_window_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlNewWindowRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_new_window_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_permission_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlPermissionRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_permission_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_script_notify(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlScriptNotifyEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_script_notify(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_unsafe_content_warning_displaying(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_unsafe_content_warning_displaying(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_unsupported_uri_scheme_identified(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlUnsupportedUriSchemeIdentifiedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_unsupported_uri_scheme_identified(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_unviewable_content_identified(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlUnviewableContentIdentifiedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_unviewable_content_identified(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_web_resource_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[IWebViewControl, WebViewControlWebResourceRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_web_resource_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class IWebViewControl2(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> IWebViewControl2: ...
    @typing.overload
    def add_initialize_script(self, script: str) -> None: ...

