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

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.devices.gpio.provider
import winrt.windows.foundation
import winrt.windows.foundation.collections

from winrt.windows.devices.gpio import GpioChangePolarity, GpioOpenStatus, GpioPinDriveMode, GpioPinEdge, GpioPinValue, GpioSharingMode

Self = typing.TypeVar('Self')

@typing.final
class GpioChangeCount:
    count: winrt.system.UInt64
    relative_time: datetime.timedelta
    def __init__(self, count: winrt.system.UInt64, relative_time: datetime.timedelta) -> None: ...

@typing.final
class GpioChangeRecord:
    relative_time: datetime.timedelta
    edge: GpioPinEdge
    def __init__(self, relative_time: datetime.timedelta, edge: GpioPinEdge) -> None: ...

@typing.final
class GpioChangeCounter(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GpioChangeCounter: ...
    def __new__(cls: typing.Type[GpioChangeCounter], pin: typing.Optional[GpioPin]) -> GpioChangeCounter:...
    def close(self) -> None: ...
    def read(self) -> GpioChangeCount: ...
    def reset(self) -> GpioChangeCount: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    @_property
    def polarity(self) -> GpioChangePolarity: ...
    @polarity.setter
    def polarity(self, value: GpioChangePolarity) -> None: ...
    @_property
    def is_started(self) -> bool: ...

@typing.final
class GpioChangeReader(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GpioChangeReader: ...
    @typing.overload
    def __new__(cls: typing.Type[GpioChangeReader], pin: typing.Optional[GpioPin]) -> GpioChangeReader:...
    @typing.overload
    def __new__(cls: typing.Type[GpioChangeReader], pin: typing.Optional[GpioPin], min_capacity: winrt.system.Int32) -> GpioChangeReader:...
    def clear(self) -> None: ...
    def close(self) -> None: ...
    def get_all_items(self) -> typing.Optional[winrt.windows.foundation.collections.IVector[GpioChangeRecord]]: ...
    def get_next_item(self) -> GpioChangeRecord: ...
    def peek_next_item(self) -> GpioChangeRecord: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def wait_for_items_async(self, count: winrt.system.Int32, /) -> winrt.windows.foundation.IAsyncAction: ...
    @_property
    def polarity(self) -> GpioChangePolarity: ...
    @polarity.setter
    def polarity(self, value: GpioChangePolarity) -> None: ...
    @_property
    def capacity(self) -> winrt.system.Int32: ...
    @_property
    def is_empty(self) -> bool: ...
    @_property
    def is_overflowed(self) -> bool: ...
    @_property
    def is_started(self) -> bool: ...
    @_property
    def length(self) -> winrt.system.Int32: ...

@typing.final
class GpioController_Static(type):
    def get_controllers_async(cls, provider: typing.Optional[winrt.windows.devices.gpio.provider.IGpioProvider], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.foundation.collections.IVectorView[GpioController]]: ...
    def get_default(cls) -> typing.Optional[GpioController]: ...
    def get_default_async(cls) -> winrt.windows.foundation.IAsyncOperation[GpioController]: ...

@typing.final
class GpioController(winrt.system.Object, metaclass=GpioController_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GpioController: ...
    @typing.overload
    def open_pin(self, pin_number: winrt.system.Int32, /) -> typing.Optional[GpioPin]: ...
    @typing.overload
    def open_pin(self, pin_number: winrt.system.Int32, sharing_mode: GpioSharingMode, /) -> typing.Optional[GpioPin]: ...
    def try_open_pin(self, pin_number: winrt.system.Int32, sharing_mode: GpioSharingMode, /) -> typing.Tuple[bool, typing.Optional[GpioPin], GpioOpenStatus]: ...
    @_property
    def pin_count(self) -> winrt.system.Int32: ...

@typing.final
class GpioPin(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GpioPin: ...
    def close(self) -> None: ...
    def get_drive_mode(self) -> GpioPinDriveMode: ...
    def is_drive_mode_supported(self, drive_mode: GpioPinDriveMode, /) -> bool: ...
    def read(self) -> GpioPinValue: ...
    def set_drive_mode(self, value: GpioPinDriveMode, /) -> None: ...
    def write(self, value: GpioPinValue, /) -> None: ...
    def add_value_changed(self, handler: winrt.windows.foundation.TypedEventHandler[GpioPin, GpioPinValueChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_value_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def debounce_timeout(self) -> datetime.timedelta: ...
    @debounce_timeout.setter
    def debounce_timeout(self, value: datetime.timedelta) -> None: ...
    @_property
    def pin_number(self) -> winrt.system.Int32: ...
    @_property
    def sharing_mode(self) -> GpioSharingMode: ...

@typing.final
class GpioPinValueChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> GpioPinValueChangedEventArgs: ...
    @_property
    def edge(self) -> GpioPinEdge: ...

