# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections
import winrt.windows.globalization as windows_globalization
import winrt.windows.ui.text as windows_ui_text
import winrt.windows.ui.viewmanagement as windows_ui_viewmanagement

from winrt.windows.ui.text.core import CoreTextFormatUpdatingReason, CoreTextFormatUpdatingResult, CoreTextInputPaneDisplayPolicy, CoreTextInputScope, CoreTextSelectionUpdatingResult, CoreTextTextUpdatingResult

Self = typing.TypeVar('Self')

@typing.final
class CoreTextRange:
    start_caret_position: winrt.system.Int32
    end_caret_position: winrt.system.Int32
    def __init__(self, start_caret_position: winrt.system.Int32, end_caret_position: winrt.system.Int32) -> None: ...

@typing.final
class CoreTextCompositionCompletedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextCompositionCompletedEventArgs: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def composition_segments(self) -> typing.Optional[windows_foundation_collections.IVectorView[CoreTextCompositionSegment]]: ...
    @_property
    def is_canceled(self) -> bool: ...

@typing.final
class CoreTextCompositionSegment(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextCompositionSegment: ...
    @_property
    def preconversion_string(self) -> str: ...
    @_property
    def range(self) -> CoreTextRange: ...

@typing.final
class CoreTextCompositionStartedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextCompositionStartedEventArgs: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def is_canceled(self) -> bool: ...

@typing.final
class CoreTextEditContext(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextEditContext: ...
    def notify_focus_enter(self) -> None: ...
    def notify_focus_leave(self) -> None: ...
    def notify_layout_changed(self) -> None: ...
    def notify_selection_changed(self, selection: CoreTextRange, /) -> None: ...
    def notify_text_changed(self, modified_range: CoreTextRange, new_length: winrt.system.Int32, new_selection: CoreTextRange, /) -> None: ...
    def add_composition_completed(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextCompositionCompletedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_composition_completed(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_composition_started(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextCompositionStartedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_composition_started(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_focus_removed(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_focus_removed(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_format_updating(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextFormatUpdatingEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_format_updating(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_layout_requested(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextLayoutRequestedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_layout_requested(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_selection_requested(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextSelectionRequestedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_selection_requested(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_selection_updating(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextSelectionUpdatingEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_selection_updating(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_text_requested(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextTextRequestedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_text_requested(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_text_updating(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, CoreTextTextUpdatingEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_text_updating(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_notify_focus_leave_completed(self, handler: windows_foundation.TypedEventHandler[CoreTextEditContext, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_notify_focus_leave_completed(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def name(self) -> str: ...
    @name.setter
    def name(self, value: str) -> None: ...
    @_property
    def is_read_only(self) -> bool: ...
    @is_read_only.setter
    def is_read_only(self, value: bool) -> None: ...
    @_property
    def input_scope(self) -> CoreTextInputScope: ...
    @input_scope.setter
    def input_scope(self, value: CoreTextInputScope) -> None: ...
    @_property
    def input_pane_display_policy(self) -> CoreTextInputPaneDisplayPolicy: ...
    @input_pane_display_policy.setter
    def input_pane_display_policy(self, value: CoreTextInputPaneDisplayPolicy) -> None: ...

@typing.final
class CoreTextFormatUpdatingEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextFormatUpdatingEventArgs: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def result(self) -> CoreTextFormatUpdatingResult: ...
    @result.setter
    def result(self, value: CoreTextFormatUpdatingResult) -> None: ...
    @_property
    def background_color(self) -> typing.Optional[typing.Optional[windows_ui_viewmanagement.UIElementType]]: ...
    @_property
    def is_canceled(self) -> bool: ...
    @_property
    def range(self) -> CoreTextRange: ...
    @_property
    def reason(self) -> CoreTextFormatUpdatingReason: ...
    @_property
    def text_color(self) -> typing.Optional[typing.Optional[windows_ui_viewmanagement.UIElementType]]: ...
    @_property
    def underline_color(self) -> typing.Optional[typing.Optional[windows_ui_viewmanagement.UIElementType]]: ...
    @_property
    def underline_type(self) -> typing.Optional[typing.Optional[windows_ui_text.UnderlineType]]: ...

@typing.final
class CoreTextLayoutBounds(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextLayoutBounds: ...
    @_property
    def text_bounds(self) -> windows_foundation.Rect: ...
    @text_bounds.setter
    def text_bounds(self, value: windows_foundation.Rect) -> None: ...
    @_property
    def control_bounds(self) -> windows_foundation.Rect: ...
    @control_bounds.setter
    def control_bounds(self, value: windows_foundation.Rect) -> None: ...

@typing.final
class CoreTextLayoutRequest(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextLayoutRequest: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def is_canceled(self) -> bool: ...
    @_property
    def layout_bounds(self) -> typing.Optional[CoreTextLayoutBounds]: ...
    @_property
    def range(self) -> CoreTextRange: ...
    @_property
    def layout_bounds_visual_pixels(self) -> typing.Optional[CoreTextLayoutBounds]: ...

@typing.final
class CoreTextLayoutRequestedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextLayoutRequestedEventArgs: ...
    @_property
    def request(self) -> typing.Optional[CoreTextLayoutRequest]: ...

@typing.final
class CoreTextSelectionRequest(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextSelectionRequest: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def selection(self) -> CoreTextRange: ...
    @selection.setter
    def selection(self, value: CoreTextRange) -> None: ...
    @_property
    def is_canceled(self) -> bool: ...

@typing.final
class CoreTextSelectionRequestedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextSelectionRequestedEventArgs: ...
    @_property
    def request(self) -> typing.Optional[CoreTextSelectionRequest]: ...

@typing.final
class CoreTextSelectionUpdatingEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextSelectionUpdatingEventArgs: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def result(self) -> CoreTextSelectionUpdatingResult: ...
    @result.setter
    def result(self, value: CoreTextSelectionUpdatingResult) -> None: ...
    @_property
    def is_canceled(self) -> bool: ...
    @_property
    def selection(self) -> CoreTextRange: ...

@typing.final
class CoreTextServicesConstants_Static(type):
    @_property
    def hidden_character(cls) -> winrt.system.Char16: ...

@typing.final
class CoreTextServicesConstants(winrt.system.Object, metaclass=CoreTextServicesConstants_Static):
    pass

@typing.final
class CoreTextServicesManager_Static(type):
    def get_for_current_view(cls) -> typing.Optional[CoreTextServicesManager]: ...

@typing.final
class CoreTextServicesManager(winrt.system.Object, metaclass=CoreTextServicesManager_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextServicesManager: ...
    def create_edit_context(self) -> typing.Optional[CoreTextEditContext]: ...
    def add_input_language_changed(self, handler: windows_foundation.TypedEventHandler[CoreTextServicesManager, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_input_language_changed(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def input_language(self) -> typing.Optional[windows_globalization.Language]: ...

@typing.final
class CoreTextTextRequest(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextTextRequest: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def text(self) -> str: ...
    @text.setter
    def text(self, value: str) -> None: ...
    @_property
    def is_canceled(self) -> bool: ...
    @_property
    def range(self) -> CoreTextRange: ...

@typing.final
class CoreTextTextRequestedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextTextRequestedEventArgs: ...
    @_property
    def request(self) -> typing.Optional[CoreTextTextRequest]: ...

@typing.final
class CoreTextTextUpdatingEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CoreTextTextUpdatingEventArgs: ...
    def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
    @_property
    def result(self) -> CoreTextTextUpdatingResult: ...
    @result.setter
    def result(self, value: CoreTextTextUpdatingResult) -> None: ...
    @_property
    def input_language(self) -> typing.Optional[windows_globalization.Language]: ...
    @_property
    def is_canceled(self) -> bool: ...
    @_property
    def new_selection(self) -> CoreTextRange: ...
    @_property
    def range(self) -> CoreTextRange: ...
    @_property
    def text(self) -> str: ...

