# 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.ui.uiautomation

class AutomationRemoteOperationStatus(enum.IntEnum):
    SUCCESS = 0
    MALFORMED_BYTECODE = 1
    INSTRUCTION_LIMIT_EXCEEDED = 2
    UNHANDLED_EXCEPTION = 3
    EXECUTION_FAILURE = 4

Self = typing.TypeVar('Self')

class AutomationAnnotationTypeRegistration:
    local_id: winsdk.system.Int32
    def __new__(cls: typing.Type[AutomationAnnotationTypeRegistration], local_id: winsdk.system.Int32) -> AutomationAnnotationTypeRegistration: ...

class AutomationRemoteOperationOperandId:
    value: winsdk.system.Int32
    def __new__(cls: typing.Type[AutomationRemoteOperationOperandId], value: winsdk.system.Int32) -> AutomationRemoteOperationOperandId: ...

class AutomationRemoteOperationResult(winsdk.system.Object):
    error_location: winsdk.system.Int32
    extended_error: winsdk.windows.foundation.HResult
    status: AutomationRemoteOperationStatus
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> AutomationRemoteOperationResult: ...
    def get_operand(self, operand_id: AutomationRemoteOperationOperandId, /) -> typing.Optional[winsdk.system.Object]: ...
    def has_operand(self, operand_id: AutomationRemoteOperationOperandId, /) -> winsdk.system.Boolean: ...

class CoreAutomationRegistrar(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> CoreAutomationRegistrar: ...
    @staticmethod
    def register_annotation_type(guid: winsdk.system.Guid, /) -> AutomationAnnotationTypeRegistration: ...
    @staticmethod
    def unregister_annotation_type(registration: AutomationAnnotationTypeRegistration, /) -> None: ...

class CoreAutomationRemoteOperation(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> CoreAutomationRemoteOperation: ...
    def __new__(cls: typing.Type[CoreAutomationRemoteOperation]) -> CoreAutomationRemoteOperation:...
    def add_to_results(self, operand_id: AutomationRemoteOperationOperandId, /) -> None: ...
    def execute(self, bytecode_buffer: winsdk.system.Array[winsdk.system.UInt8], /) -> typing.Optional[AutomationRemoteOperationResult]: ...
    def import_connection_bound_object(self, operand_id: AutomationRemoteOperationOperandId, connection_bound_object: typing.Optional[winsdk.windows.ui.uiautomation.AutomationConnectionBoundObject], /) -> None: ...
    def import_element(self, operand_id: AutomationRemoteOperationOperandId, element: typing.Optional[winsdk.windows.ui.uiautomation.AutomationElement], /) -> None: ...
    def import_text_range(self, operand_id: AutomationRemoteOperationOperandId, text_range: typing.Optional[winsdk.windows.ui.uiautomation.AutomationTextRange], /) -> None: ...
    def is_opcode_supported(self, opcode: winsdk.system.UInt32, /) -> winsdk.system.Boolean: ...

class CoreAutomationRemoteOperationContext(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> CoreAutomationRemoteOperationContext: ...
    def get_operand(self, id: AutomationRemoteOperationOperandId, /) -> typing.Optional[winsdk.system.Object]: ...
    @typing.overload
    def set_operand(self, id: AutomationRemoteOperationOperandId, operand: typing.Optional[winsdk.system.Object], /) -> None: ...
    @typing.overload
    def set_operand(self, id: AutomationRemoteOperationOperandId, operand: typing.Optional[winsdk.system.Object], operand_interface_id: winsdk.system.Guid, /) -> None: ...

class RemoteAutomationClientSession(winsdk.system.Object):
    session_id: winsdk.system.Guid
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> RemoteAutomationClientSession: ...
    @typing.overload
    def __new__(cls: typing.Type[RemoteAutomationClientSession], name: str) -> RemoteAutomationClientSession:...
    @typing.overload
    def __new__(cls: typing.Type[RemoteAutomationClientSession], name: str, session_id: winsdk.system.Guid) -> RemoteAutomationClientSession:...
    def create_window_async(self, remote_window_id: winsdk.system.UInt64, remote_process_id: winsdk.system.UInt32, parent_automation_element: typing.Optional[winsdk.system.Object], /) -> winsdk.windows.foundation.IAsyncOperation[RemoteAutomationWindow]: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def add_connection_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[RemoteAutomationClientSession, RemoteAutomationConnectionRequestedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_connection_requested(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_disconnected(self, handler: winsdk.windows.foundation.TypedEventHandler[RemoteAutomationClientSession, RemoteAutomationDisconnectedEventArgs], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_disconnected(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

class RemoteAutomationConnectionRequestedEventArgs(winsdk.system.Object):
    local_pipe_name: str
    remote_process_id: winsdk.system.UInt32
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> RemoteAutomationConnectionRequestedEventArgs: ...

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

class RemoteAutomationServer(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> RemoteAutomationServer: ...
    @staticmethod
    def report_session(session_id: winsdk.system.Guid, /) -> None: ...

class RemoteAutomationWindow(winsdk.system.Object):
    automation_provider: typing.Optional[winsdk.system.Object]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> RemoteAutomationWindow: ...
    def unregister_async(self) -> winsdk.windows.foundation.IAsyncAction: ...

class ICoreAutomationConnectionBoundObjectProvider(winsdk.system.Object):
    is_com_threading_required: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> ICoreAutomationConnectionBoundObjectProvider: ...

class ICoreAutomationRemoteOperationExtensionProvider(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> ICoreAutomationRemoteOperationExtensionProvider: ...
    def call_extension(self, extension_id: winsdk.system.Guid, context: typing.Optional[CoreAutomationRemoteOperationContext], operand_ids: winsdk.system.Array[AutomationRemoteOperationOperandId], /) -> None: ...
    def is_extension_supported(self, extension_id: winsdk.system.Guid, /) -> winsdk.system.Boolean: ...

