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

import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.foundation
import winsdk.windows.system.threading

Self = typing.TypeVar('Self')

class PreallocatedWorkItem(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PreallocatedWorkItem: ...
    @typing.overload
    def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[winsdk.windows.system.threading.WorkItemHandler]) -> PreallocatedWorkItem:...
    @typing.overload
    def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[winsdk.windows.system.threading.WorkItemHandler], priority: winsdk.windows.system.threading.WorkItemPriority) -> PreallocatedWorkItem:...
    @typing.overload
    def __new__(cls: typing.Type[PreallocatedWorkItem], handler: typing.Optional[winsdk.windows.system.threading.WorkItemHandler], priority: winsdk.windows.system.threading.WorkItemPriority, options: winsdk.windows.system.threading.WorkItemOptions) -> PreallocatedWorkItem:...
    def run_async(self) -> winsdk.windows.foundation.IAsyncAction: ...

class SignalNotifier(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> SignalNotifier: ...
    @typing.overload
    @staticmethod
    def attach_to_event(name: str, handler: typing.Optional[SignalHandler], /) -> typing.Optional[SignalNotifier]: ...
    @typing.overload
    @staticmethod
    def attach_to_event(name: str, handler: typing.Optional[SignalHandler], timeout: datetime.timedelta, /) -> typing.Optional[SignalNotifier]: ...
    @typing.overload
    @staticmethod
    def attach_to_semaphore(name: str, handler: typing.Optional[SignalHandler], /) -> typing.Optional[SignalNotifier]: ...
    @typing.overload
    @staticmethod
    def attach_to_semaphore(name: str, handler: typing.Optional[SignalHandler], timeout: datetime.timedelta, /) -> typing.Optional[SignalNotifier]: ...
    def enable(self) -> None: ...
    def terminate(self) -> None: ...

SignalHandler = typing.Callable[[typing.Optional[SignalNotifier], winsdk.system.Boolean], None]

