# 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.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(winsdk.system.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: winsdk.system.Object, /) -> Direct3D11CaptureFrame: ...
    def close(self) -> None: ...

class Direct3D11CaptureFramePool(winsdk.system.Object):
    dispatcher_queue: typing.Optional[winsdk.windows.system.DispatcherQueue]
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winsdk.system.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: winsdk.system.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: winsdk.system.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: winsdk.system.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, winsdk.system.Object], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_frame_arrived(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

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

class GraphicsCaptureItem(winsdk.system.Object):
    display_name: str
    size: winsdk.windows.graphics.SizeInt32
    @staticmethod
    def _from(obj: winsdk.system.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, winsdk.system.Object], /) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_closed(self, token: winsdk.windows.foundation.EventRegistrationToken, /) -> None: ...

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

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

