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

import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.foundation
import winsdk.windows.system.threading

Self = typing.TypeVar('Self')

class PreallocatedWorkItem(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.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) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class SignalNotifier(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.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], _winrt.Boolean], None]

