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

import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.devices.perception
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.foundation.numerics
import winsdk.windows.graphics.imaging
import winsdk.windows.media

Self = typing.TypeVar('Self')

class KnownPerceptionFrameKind(winsdk.system.Object):
    color: typing.ClassVar[str]
    depth: typing.ClassVar[str]
    infrared: typing.ClassVar[str]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> KnownPerceptionFrameKind: ...

class PerceptionControlGroup(winsdk.system.Object):
    frame_provider_ids: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionControlGroup: ...
    def __new__(cls: typing.Type[PerceptionControlGroup], ids: typing.Iterable[str]) -> PerceptionControlGroup:...

class PerceptionCorrelation(winsdk.system.Object):
    orientation: winsdk.windows.foundation.numerics.Quaternion
    position: winsdk.windows.foundation.numerics.Vector3
    target_id: str
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionCorrelation: ...
    def __new__(cls: typing.Type[PerceptionCorrelation], target_id: str, position: winsdk.windows.foundation.numerics.Vector3, orientation: winsdk.windows.foundation.numerics.Quaternion) -> PerceptionCorrelation:...

class PerceptionCorrelationGroup(winsdk.system.Object):
    relative_locations: typing.Optional[winsdk.windows.foundation.collections.IVectorView[PerceptionCorrelation]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionCorrelationGroup: ...
    def __new__(cls: typing.Type[PerceptionCorrelationGroup], relative_locations: typing.Iterable[PerceptionCorrelation]) -> PerceptionCorrelationGroup:...

class PerceptionFaceAuthenticationGroup(winsdk.system.Object):
    frame_provider_ids: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionFaceAuthenticationGroup: ...
    def __new__(cls: typing.Type[PerceptionFaceAuthenticationGroup], ids: typing.Iterable[str], start_handler: typing.Optional[PerceptionStartFaceAuthenticationHandler], stop_handler: typing.Optional[PerceptionStopFaceAuthenticationHandler]) -> PerceptionFaceAuthenticationGroup:...

class PerceptionFrame(winsdk.system.Object):
    relative_time: datetime.timedelta
    frame_data: typing.Optional[winsdk.windows.foundation.IMemoryBuffer]
    properties: typing.Optional[winsdk.windows.foundation.collections.ValueSet]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionFrame: ...

class PerceptionFrameProviderInfo(winsdk.system.Object):
    id: str
    hidden: winsdk.system.Boolean
    frame_kind: str
    display_name: str
    device_kind: str
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionFrameProviderInfo: ...
    def __new__(cls: typing.Type[PerceptionFrameProviderInfo]) -> PerceptionFrameProviderInfo:...

class PerceptionFrameProviderManagerService(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionFrameProviderManagerService: ...
    @staticmethod
    def publish_frame_for_provider(provider: typing.Optional[IPerceptionFrameProvider], frame: typing.Optional[PerceptionFrame]) -> None: ...
    @staticmethod
    def register_control_group(manager: typing.Optional[IPerceptionFrameProviderManager], control_group: typing.Optional[PerceptionControlGroup]) -> None: ...
    @staticmethod
    def register_correlation_group(manager: typing.Optional[IPerceptionFrameProviderManager], correlation_group: typing.Optional[PerceptionCorrelationGroup]) -> None: ...
    @staticmethod
    def register_face_authentication_group(manager: typing.Optional[IPerceptionFrameProviderManager], face_authentication_group: typing.Optional[PerceptionFaceAuthenticationGroup]) -> None: ...
    @staticmethod
    def register_frame_provider_info(manager: typing.Optional[IPerceptionFrameProviderManager], frame_provider_info: typing.Optional[PerceptionFrameProviderInfo]) -> None: ...
    @staticmethod
    def unregister_control_group(manager: typing.Optional[IPerceptionFrameProviderManager], control_group: typing.Optional[PerceptionControlGroup]) -> None: ...
    @staticmethod
    def unregister_correlation_group(manager: typing.Optional[IPerceptionFrameProviderManager], correlation_group: typing.Optional[PerceptionCorrelationGroup]) -> None: ...
    @staticmethod
    def unregister_face_authentication_group(manager: typing.Optional[IPerceptionFrameProviderManager], face_authentication_group: typing.Optional[PerceptionFaceAuthenticationGroup]) -> None: ...
    @staticmethod
    def unregister_frame_provider_info(manager: typing.Optional[IPerceptionFrameProviderManager], frame_provider_info: typing.Optional[PerceptionFrameProviderInfo]) -> None: ...
    @staticmethod
    def update_availability_for_provider(provider: typing.Optional[IPerceptionFrameProvider], available: winsdk.system.Boolean) -> None: ...

class PerceptionPropertyChangeRequest(winsdk.system.Object):
    status: winsdk.windows.devices.perception.PerceptionFrameSourcePropertyChangeStatus
    name: str
    value: typing.Optional[winsdk.system.Object]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionPropertyChangeRequest: ...
    def get_deferral(self) -> typing.Optional[winsdk.windows.foundation.Deferral]: ...

class PerceptionVideoFrameAllocator(winsdk.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winsdk.system.Object) -> PerceptionVideoFrameAllocator: ...
    def __new__(cls: typing.Type[PerceptionVideoFrameAllocator], max_outstanding_frame_count_for_write: winsdk.system.UInt32, format: winsdk.windows.graphics.imaging.BitmapPixelFormat, resolution: winsdk.windows.foundation.Size, alpha: winsdk.windows.graphics.imaging.BitmapAlphaMode) -> PerceptionVideoFrameAllocator:...
    def allocate_frame(self) -> typing.Optional[PerceptionFrame]: ...
    def close(self) -> None: ...
    def copy_from_video_frame(self, frame: typing.Optional[winsdk.windows.media.VideoFrame]) -> typing.Optional[PerceptionFrame]: ...

class IPerceptionFrameProvider(winsdk.system.Object):
    available: winsdk.system.Boolean
    frame_provider_info: typing.Optional[PerceptionFrameProviderInfo]
    properties: typing.Optional[winsdk.windows.foundation.collections.IPropertySet]
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IPerceptionFrameProvider: ...
    def close(self) -> None: ...
    def set_property(self, value: typing.Optional[PerceptionPropertyChangeRequest]) -> None: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...

class IPerceptionFrameProviderManager(winsdk.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IPerceptionFrameProviderManager: ...
    def close(self) -> None: ...
    def get_frame_provider(self, frame_provider_info: typing.Optional[PerceptionFrameProviderInfo]) -> typing.Optional[IPerceptionFrameProvider]: ...

PerceptionStartFaceAuthenticationHandler = typing.Callable[[typing.Optional[PerceptionFaceAuthenticationGroup]], winsdk.system.Boolean]

PerceptionStopFaceAuthenticationHandler = typing.Callable[[typing.Optional[PerceptionFaceAuthenticationGroup]], None]

