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

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.foundation
import winsdk.windows.graphics
import winsdk.windows.graphics.directx
import winsdk.windows.graphics.directx.direct3d11
import winsdk.windows.security.authorization.appcapabilityaccess
import winsdk.windows.system
import winsdk.windows.ui
import winsdk.windows.ui.composition

class GraphicsCaptureAccessKind(enum.IntEnum):
    BORDERLESS = 0
    PROGRAMMATIC = 1

Self = typing.TypeVar('Self')

class Direct3D11CaptureFrame(_winrt.Object):
    content_size: winsdk.windows.graphics.SizeInt32
    surface: typing.Optional[winsdk.windows.graphics.directx.direct3d11.IDirect3DSurface]
    system_relative_time: datetime.timedelta
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> Direct3D11CaptureFrame: ...
    def close(self) -> None: ...

class Direct3D11CaptureFramePool(_winrt.Object):
    dispatcher_queue: typing.Optional[winsdk.windows.system.DispatcherQueue]
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> Direct3D11CaptureFramePool: ...
    def close(self) -> None: ...
    @staticmethod
    def create(device: typing.Optional[winsdk.windows.graphics.directx.direct3d11.IDirect3DDevice], pixel_format: winsdk.windows.graphics.directx.DirectXPixelFormat, number_of_buffers: _winrt.Int32, size: winsdk.windows.graphics.SizeInt32) -> typing.Optional[Direct3D11CaptureFramePool]: ...
    def create_capture_session(self, item: typing.Optional[GraphicsCaptureItem]) -> typing.Optional[GraphicsCaptureSession]: ...
    @staticmethod
    def create_free_threaded(device: typing.Optional[winsdk.windows.graphics.directx.direct3d11.IDirect3DDevice], pixel_format: winsdk.windows.graphics.directx.DirectXPixelFormat, number_of_buffers: _winrt.Int32, size: winsdk.windows.graphics.SizeInt32) -> typing.Optional[Direct3D11CaptureFramePool]: ...
    def recreate(self, device: typing.Optional[winsdk.windows.graphics.directx.direct3d11.IDirect3DDevice], pixel_format: winsdk.windows.graphics.directx.DirectXPixelFormat, number_of_buffers: _winrt.Int32, size: winsdk.windows.graphics.SizeInt32) -> None: ...
    def try_get_next_frame(self) -> typing.Optional[Direct3D11CaptureFrame]: ...
    def add_frame_arrived(self, handler: winsdk.windows.foundation.TypedEventHandler[Direct3D11CaptureFramePool, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_frame_arrived(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class GraphicsCaptureAccess(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> GraphicsCaptureAccess: ...
    @staticmethod
    def request_access_async(request: GraphicsCaptureAccessKind) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.security.authorization.appcapabilityaccess.AppCapabilityAccessStatus]: ...

class GraphicsCaptureItem(_winrt.Object):
    display_name: str
    size: winsdk.windows.graphics.SizeInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> GraphicsCaptureItem: ...
    @staticmethod
    def create_from_visual(visual: typing.Optional[winsdk.windows.ui.composition.Visual]) -> typing.Optional[GraphicsCaptureItem]: ...
    @staticmethod
    def try_create_from_display_id(display_id: winsdk.windows.graphics.DisplayId) -> typing.Optional[GraphicsCaptureItem]: ...
    @staticmethod
    def try_create_from_window_id(window_id: winsdk.windows.ui.WindowId) -> typing.Optional[GraphicsCaptureItem]: ...
    def add_closed(self, handler: winsdk.windows.foundation.TypedEventHandler[GraphicsCaptureItem, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_closed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class GraphicsCapturePicker(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> GraphicsCapturePicker: ...
    def __new__(cls: typing.Type[GraphicsCapturePicker]) -> GraphicsCapturePicker:...
    def pick_single_item_async(self) -> winsdk.windows.foundation.IAsyncOperation[GraphicsCaptureItem]: ...

class GraphicsCaptureSession(_winrt.Object):
    is_cursor_capture_enabled: _winrt.Boolean
    is_border_required: _winrt.Boolean
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> GraphicsCaptureSession: ...
    def close(self) -> None: ...
    @staticmethod
    def is_supported() -> _winrt.Boolean: ...
    def start_capture(self) -> None: ...

