# 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.applicationmodel.datatransfer
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.storage.streams
import winsdk.windows.ui
import winsdk.windows.web
import winsdk.windows.web.http

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

Self = typing.TypeVar('Self')

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

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

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

class WebViewControlLongRunningScriptDetectedEventArgs(_winrt.Object):
    stop_page_script_execution: _winrt.Boolean
    execution_time: datetime.timedelta
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlLongRunningScriptDetectedEventArgs: ...

class WebViewControlNavigationCompletedEventArgs(_winrt.Object):
    is_success: _winrt.Boolean
    uri: typing.Optional[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: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlNavigationStartingEventArgs: ...

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

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

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

class WebViewControlScriptNotifyEventArgs(_winrt.Object):
    uri: typing.Optional[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: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: _winrt.Object) -> WebViewControlUnsupportedUriSchemeIdentifiedEventArgs: ...

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

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

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

