# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.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.microsoft.ui as microsoft_ui
import winrt.microsoft.ui.composition as microsoft_ui_composition
import winrt.microsoft.ui.content as microsoft_ui_content
import winrt.microsoft.ui.xaml as microsoft_ui_xaml
import winrt.microsoft.ui.xaml.controls as microsoft_ui_xaml_controls
import winrt.microsoft.ui.xaml.media as microsoft_ui_xaml_media
import winrt.windows.foundation as windows_foundation

from winrt.microsoft.ui.xaml.hosting import XamlSourceFocusNavigationReason

Self = typing.TypeVar('Self')

@typing.final
class DesktopWindowXamlSource(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> DesktopWindowXamlSource: ...
    def __new__(cls: typing.Type[DesktopWindowXamlSource]) -> DesktopWindowXamlSource: ...
    def close(self) -> None: ...
    def initialize(self, parent_window_id: microsoft_ui.WindowId, /) -> None: ...
    def navigate_focus(self, request: typing.Optional[XamlSourceFocusNavigationRequest], /) -> typing.Optional[XamlSourceFocusNavigationResult]: ...
    def add_got_focus(self, handler: windows_foundation.TypedEventHandler[DesktopWindowXamlSource, DesktopWindowXamlSourceGotFocusEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_got_focus(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_take_focus_requested(self, handler: windows_foundation.TypedEventHandler[DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_take_focus_requested(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def system_backdrop(self) -> typing.Optional[microsoft_ui_xaml_media.SystemBackdrop]: ...
    @system_backdrop.setter
    def system_backdrop(self, value: typing.Optional[microsoft_ui_xaml_media.SystemBackdrop]) -> None: ...
    @_property
    def content(self) -> typing.Optional[microsoft_ui_xaml.UIElement]: ...
    @content.setter
    def content(self, value: typing.Optional[microsoft_ui_xaml.UIElement]) -> None: ...
    @_property
    def has_focus(self) -> bool: ...
    @_property
    def site_bridge(self) -> typing.Optional[microsoft_ui_content.DesktopChildSiteBridge]: ...
    @_property
    def should_constrain_popups_to_work_area(self) -> bool: ...
    @should_constrain_popups_to_work_area.setter
    def should_constrain_popups_to_work_area(self, value: bool) -> None: ...

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

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

@typing.final
class ElementCompositionPreview_Static(type):
    def get_element_child_visual(cls, element: typing.Optional[microsoft_ui_xaml.UIElement], /) -> typing.Optional[microsoft_ui_composition.Visual]: ...
    def get_element_visual(cls, element: typing.Optional[microsoft_ui_xaml.UIElement], /) -> typing.Optional[microsoft_ui_composition.Visual]: ...
    def get_pointer_position_property_set(cls, target_element: typing.Optional[microsoft_ui_xaml.UIElement], /) -> typing.Optional[microsoft_ui_composition.CompositionPropertySet]: ...
    def get_scroll_viewer_manipulation_property_set(cls, scroll_viewer: typing.Optional[microsoft_ui_xaml_controls.ScrollViewer], /) -> typing.Optional[microsoft_ui_composition.CompositionPropertySet]: ...
    def set_element_child_visual(cls, element: typing.Optional[microsoft_ui_xaml.UIElement], visual: typing.Optional[microsoft_ui_composition.Visual], /) -> None: ...
    def set_implicit_hide_animation(cls, element: typing.Optional[microsoft_ui_xaml.UIElement], animation: typing.Optional[microsoft_ui_composition.ICompositionAnimationBase], /) -> None: ...
    def set_implicit_show_animation(cls, element: typing.Optional[microsoft_ui_xaml.UIElement], animation: typing.Optional[microsoft_ui_composition.ICompositionAnimationBase], /) -> None: ...
    def set_is_translation_enabled(cls, element: typing.Optional[microsoft_ui_xaml.UIElement], value: bool, /) -> None: ...

@typing.final
class ElementCompositionPreview(winrt.system.Object, metaclass=ElementCompositionPreview_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> ElementCompositionPreview: ...

@typing.final
class WindowsXamlManager_Static(type):
    def get_for_current_thread(cls) -> typing.Optional[WindowsXamlManager]: ...
    def initialize_for_current_thread(cls) -> typing.Optional[WindowsXamlManager]: ...

@typing.final
class WindowsXamlManager(winrt.system.Object, metaclass=WindowsXamlManager_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> WindowsXamlManager: ...
    def close(self) -> None: ...
    def add_xaml_shutdown_completed_on_thread(self, handler: windows_foundation.TypedEventHandler[WindowsXamlManager, XamlShutdownCompletedOnThreadEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_xaml_shutdown_completed_on_thread(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...

@typing.final
class XamlShutdownCompletedOnThreadEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> XamlShutdownCompletedOnThreadEventArgs: ...
    def get_dispatcher_queue_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...

@typing.final
class XamlSourceFocusNavigationRequest(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> XamlSourceFocusNavigationRequest: ...
    @typing.overload
    def __new__(cls: typing.Type[XamlSourceFocusNavigationRequest], reason: XamlSourceFocusNavigationReason) -> XamlSourceFocusNavigationRequest: ...
    @typing.overload
    def __new__(cls: typing.Type[XamlSourceFocusNavigationRequest], reason: XamlSourceFocusNavigationReason, hint_rect: windows_foundation.Rect) -> XamlSourceFocusNavigationRequest: ...
    @typing.overload
    def __new__(cls: typing.Type[XamlSourceFocusNavigationRequest], reason: XamlSourceFocusNavigationReason, hint_rect: windows_foundation.Rect, correlation_id: _uuid.UUID) -> XamlSourceFocusNavigationRequest: ...
    @_property
    def correlation_id(self) -> _uuid.UUID: ...
    @_property
    def hint_rect(self) -> windows_foundation.Rect: ...
    @_property
    def reason(self) -> XamlSourceFocusNavigationReason: ...

@typing.final
class XamlSourceFocusNavigationResult(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> XamlSourceFocusNavigationResult: ...
    def __new__(cls: typing.Type[XamlSourceFocusNavigationResult], focus_moved: bool) -> XamlSourceFocusNavigationResult: ...
    @_property
    def was_focus_moved(self) -> bool: ...

