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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
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(winsdk.system.Object):
    uri: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> WebViewControlContentLoadingEventArgs: ...

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

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

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

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

class WebViewControlNavigationStartingEventArgs(winsdk.system.Object):
    cancel: winsdk.system.Boolean
    uri: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> WebViewControlNavigationStartingEventArgs: ...

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

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

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

class WebViewControlScriptNotifyEventArgs(winsdk.system.Object):
    uri: typing.Optional[winsdk.windows.foundation.Uri]
    value: str
    @staticmethod
    def _from(obj: winsdk.system.Object) -> WebViewControlScriptNotifyEventArgs: ...

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

class WebViewControlUnsupportedUriSchemeIdentifiedEventArgs(winsdk.system.Object):
    handled: winsdk.system.Boolean
    uri: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> WebViewControlUnsupportedUriSchemeIdentifiedEventArgs: ...

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

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

class IWebViewControl(winsdk.system.Object):
    can_go_back: winsdk.system.Boolean
    can_go_forward: winsdk.system.Boolean
    contains_full_screen_element: winsdk.system.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: winsdk.system.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]) -> 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: winsdk.system.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, winsdk.system.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, winsdk.system.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(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IWebViewControl2: ...
    def add_initialize_script(self, script: str) -> None: ...

