# 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.graphics as windows_graphics
import winrt.windows.graphics.directx as windows_graphics_directx
import winrt.windows.graphics.directx.direct3d11 as windows_graphics_directx_direct3d11
import winrt.windows.security.authorization.appcapabilityaccess as windows_security_authorization_appcapabilityaccess
import winrt.windows.system as windows_system
import winrt.windows.ui as windows_ui
import winrt.windows.ui.composition as windows_ui_composition

from winrt.windows.graphics.capture import GraphicsCaptureAccessKind, GraphicsCaptureDirtyRegionMode

Self = typing.TypeVar('Self')

@typing.final
class Direct3D11CaptureFrame(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> Direct3D11CaptureFrame: ...
    def close(self) -> None: ...
    @_property
    def content_size(self) -> windows_graphics.SizeInt32: ...
    @_property
    def surface(self) -> typing.Optional[windows_graphics_directx_direct3d11.IDirect3DSurface]: ...
    @_property
    def system_relative_time(self) -> datetime.timedelta: ...
    @_property
    def dirty_region_mode(self) -> GraphicsCaptureDirtyRegionMode: ...
    @_property
    def dirty_regions(self) -> typing.Optional[windows_foundation_collections.IVectorView[windows_graphics.RectInt32]]: ...

@typing.final
class Direct3D11CaptureFramePool_Static(type):
    def create(cls, device: typing.Optional[windows_graphics_directx_direct3d11.IDirect3DDevice], pixel_format: windows_graphics_directx.DirectXPixelFormat, number_of_buffers: winrt.system.Int32, size: windows_graphics.SizeInt32, /) -> typing.Optional[Direct3D11CaptureFramePool]: ...
    def create_free_threaded(cls, device: typing.Optional[windows_graphics_directx_direct3d11.IDirect3DDevice], pixel_format: windows_graphics_directx.DirectXPixelFormat, number_of_buffers: winrt.system.Int32, size: windows_graphics.SizeInt32, /) -> typing.Optional[Direct3D11CaptureFramePool]: ...

@typing.final
class Direct3D11CaptureFramePool(winrt.system.Object, metaclass=Direct3D11CaptureFramePool_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> Direct3D11CaptureFramePool: ...
    def close(self) -> None: ...
    def create_capture_session(self, item: typing.Optional[GraphicsCaptureItem], /) -> typing.Optional[GraphicsCaptureSession]: ...
    def recreate(self, device: typing.Optional[windows_graphics_directx_direct3d11.IDirect3DDevice], pixel_format: windows_graphics_directx.DirectXPixelFormat, number_of_buffers: winrt.system.Int32, size: windows_graphics.SizeInt32, /) -> None: ...
    def try_get_next_frame(self) -> typing.Optional[Direct3D11CaptureFrame]: ...
    def add_frame_arrived(self, handler: windows_foundation.TypedEventHandler[Direct3D11CaptureFramePool, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_frame_arrived(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def dispatcher_queue(self) -> typing.Optional[windows_system.DispatcherQueue]: ...

@typing.final
class GraphicsCaptureAccess_Static(type):
    def request_access_async(cls, request: GraphicsCaptureAccessKind, /) -> windows_foundation.IAsyncOperation[windows_security_authorization_appcapabilityaccess.AppCapabilityAccessStatus]: ...

@typing.final
class GraphicsCaptureAccess(winrt.system.Object, metaclass=GraphicsCaptureAccess_Static):
    pass

@typing.final
class GraphicsCaptureItem_Static(type):
    def create_from_visual(cls, visual: typing.Optional[windows_ui_composition.Visual], /) -> typing.Optional[GraphicsCaptureItem]: ...
    def try_create_from_display_id(cls, display_id: windows_graphics.DisplayId, /) -> typing.Optional[GraphicsCaptureItem]: ...
    def try_create_from_window_id(cls, window_id: windows_ui.WindowId, /) -> typing.Optional[GraphicsCaptureItem]: ...

@typing.final
class GraphicsCaptureItem(winrt.system.Object, metaclass=GraphicsCaptureItem_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GraphicsCaptureItem: ...
    def add_closed(self, handler: windows_foundation.TypedEventHandler[GraphicsCaptureItem, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_closed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def display_name(self) -> str: ...
    @_property
    def size(self) -> windows_graphics.SizeInt32: ...

@typing.final
class GraphicsCapturePicker(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GraphicsCapturePicker: ...
    def __new__(cls: typing.Type[GraphicsCapturePicker]) -> GraphicsCapturePicker: ...
    def pick_single_item_async(self) -> windows_foundation.IAsyncOperation[GraphicsCaptureItem]: ...

@typing.final
class GraphicsCaptureSession_Static(type):
    def is_supported(cls) -> bool: ...

@typing.final
class GraphicsCaptureSession(winrt.system.Object, metaclass=GraphicsCaptureSession_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GraphicsCaptureSession: ...
    def close(self) -> None: ...
    def start_capture(self) -> None: ...
    @_property
    def is_cursor_capture_enabled(self) -> bool: ...
    @is_cursor_capture_enabled.setter
    def is_cursor_capture_enabled(self, value: bool) -> None: ...
    @_property
    def is_border_required(self) -> bool: ...
    @is_border_required.setter
    def is_border_required(self, value: bool) -> None: ...
    @_property
    def dirty_region_mode(self) -> GraphicsCaptureDirtyRegionMode: ...
    @dirty_region_mode.setter
    def dirty_region_mode(self, value: GraphicsCaptureDirtyRegionMode) -> None: ...
    @_property
    def min_update_interval(self) -> datetime.timedelta: ...
    @min_update_interval.setter
    def min_update_interval(self, value: datetime.timedelta) -> None: ...
    @_property
    def include_secondary_windows(self) -> bool: ...
    @include_secondary_windows.setter
    def include_secondary_windows(self, value: bool) -> None: ...

