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

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.enumeration
import winrt.windows.foundation
import winrt.windows.storage.streams

from winrt.windows.devices.midi import MidiMessageType

Self = typing.TypeVar('Self')

class MidiActiveSensingMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiActiveSensingMessage: ...
    def __new__(cls: typing.Type[MidiActiveSensingMessage]) -> MidiActiveSensingMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiChannelPressureMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiChannelPressureMessage: ...
    def __new__(cls: typing.Type[MidiChannelPressureMessage], channel: winrt.system.UInt8, pressure: winrt.system.UInt8) -> MidiChannelPressureMessage:...
    @_property
    def channel(self) -> winrt.system.UInt8: ...
    @_property
    def pressure(self) -> winrt.system.UInt8: ...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiContinueMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiContinueMessage: ...
    def __new__(cls: typing.Type[MidiContinueMessage]) -> MidiContinueMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiControlChangeMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiControlChangeMessage: ...
    def __new__(cls: typing.Type[MidiControlChangeMessage], channel: winrt.system.UInt8, controller: winrt.system.UInt8, control_value: winrt.system.UInt8) -> MidiControlChangeMessage:...
    @_property
    def channel(self) -> winrt.system.UInt8: ...
    @_property
    def control_value(self) -> winrt.system.UInt8: ...
    @_property
    def controller(self) -> winrt.system.UInt8: ...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiInPort_Static(type):
    def from_id_async(cls, device_id: str, /) -> winrt.windows.foundation.IAsyncOperation[MidiInPort]: ...
    def get_device_selector(cls) -> str: ...

class MidiInPort(winrt.system.Object, metaclass=MidiInPort_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiInPort: ...
    def close(self) -> None: ...
    def add_message_received(self, handler: winrt.windows.foundation.TypedEventHandler[MidiInPort, MidiMessageReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_message_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def device_id(self) -> str: ...

class MidiMessageReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiMessageReceivedEventArgs: ...
    @_property
    def message(self) -> typing.Optional[IMidiMessage]: ...

class MidiNoteOffMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiNoteOffMessage: ...
    def __new__(cls: typing.Type[MidiNoteOffMessage], channel: winrt.system.UInt8, note: winrt.system.UInt8, velocity: winrt.system.UInt8) -> MidiNoteOffMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def channel(self) -> winrt.system.UInt8: ...
    @_property
    def note(self) -> winrt.system.UInt8: ...
    @_property
    def velocity(self) -> winrt.system.UInt8: ...

class MidiNoteOnMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiNoteOnMessage: ...
    def __new__(cls: typing.Type[MidiNoteOnMessage], channel: winrt.system.UInt8, note: winrt.system.UInt8, velocity: winrt.system.UInt8) -> MidiNoteOnMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def channel(self) -> winrt.system.UInt8: ...
    @_property
    def note(self) -> winrt.system.UInt8: ...
    @_property
    def velocity(self) -> winrt.system.UInt8: ...

class MidiOutPort_Static(type):
    def from_id_async(cls, device_id: str, /) -> winrt.windows.foundation.IAsyncOperation[IMidiOutPort]: ...
    def get_device_selector(cls) -> str: ...

class MidiOutPort(winrt.system.Object, metaclass=MidiOutPort_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiOutPort: ...
    def close(self) -> None: ...
    def send_buffer(self, midi_data: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> None: ...
    def send_message(self, midi_message: typing.Optional[IMidiMessage], /) -> None: ...
    @_property
    def device_id(self) -> str: ...

class MidiPitchBendChangeMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiPitchBendChangeMessage: ...
    def __new__(cls: typing.Type[MidiPitchBendChangeMessage], channel: winrt.system.UInt8, bend: winrt.system.UInt16) -> MidiPitchBendChangeMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def bend(self) -> winrt.system.UInt16: ...
    @_property
    def channel(self) -> winrt.system.UInt8: ...

class MidiPolyphonicKeyPressureMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiPolyphonicKeyPressureMessage: ...
    def __new__(cls: typing.Type[MidiPolyphonicKeyPressureMessage], channel: winrt.system.UInt8, note: winrt.system.UInt8, pressure: winrt.system.UInt8) -> MidiPolyphonicKeyPressureMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def channel(self) -> winrt.system.UInt8: ...
    @_property
    def note(self) -> winrt.system.UInt8: ...
    @_property
    def pressure(self) -> winrt.system.UInt8: ...

class MidiProgramChangeMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiProgramChangeMessage: ...
    def __new__(cls: typing.Type[MidiProgramChangeMessage], channel: winrt.system.UInt8, program: winrt.system.UInt8) -> MidiProgramChangeMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def channel(self) -> winrt.system.UInt8: ...
    @_property
    def program(self) -> winrt.system.UInt8: ...

class MidiSongPositionPointerMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiSongPositionPointerMessage: ...
    def __new__(cls: typing.Type[MidiSongPositionPointerMessage], beats: winrt.system.UInt16) -> MidiSongPositionPointerMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def beats(self) -> winrt.system.UInt16: ...

class MidiSongSelectMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiSongSelectMessage: ...
    def __new__(cls: typing.Type[MidiSongSelectMessage], song: winrt.system.UInt8) -> MidiSongSelectMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def song(self) -> winrt.system.UInt8: ...

class MidiStartMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiStartMessage: ...
    def __new__(cls: typing.Type[MidiStartMessage]) -> MidiStartMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiStopMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiStopMessage: ...
    def __new__(cls: typing.Type[MidiStopMessage]) -> MidiStopMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiSynthesizer_Static(type):
    @typing.overload
    def create_async(cls) -> winrt.windows.foundation.IAsyncOperation[MidiSynthesizer]: ...
    @typing.overload
    def create_async(cls, audio_device: typing.Optional[winrt.windows.devices.enumeration.DeviceInformation], /) -> winrt.windows.foundation.IAsyncOperation[MidiSynthesizer]: ...
    def is_synthesizer(cls, midi_device: typing.Optional[winrt.windows.devices.enumeration.DeviceInformation], /) -> bool: ...

class MidiSynthesizer(winrt.system.Object, metaclass=MidiSynthesizer_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiSynthesizer: ...
    def close(self) -> None: ...
    def send_buffer(self, midi_data: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> None: ...
    def send_message(self, midi_message: typing.Optional[IMidiMessage], /) -> None: ...
    @_property
    def device_id(self) -> str: ...
    @_property
    def volume(self) -> winrt.system.Double: ...
    @volume.setter
    def volume(self, value: winrt.system.Double) -> None: ...
    @_property
    def audio_device(self) -> typing.Optional[winrt.windows.devices.enumeration.DeviceInformation]: ...

class MidiSystemExclusiveMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiSystemExclusiveMessage: ...
    def __new__(cls: typing.Type[MidiSystemExclusiveMessage], raw_data: typing.Optional[winrt.windows.storage.streams.IBuffer]) -> MidiSystemExclusiveMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiSystemResetMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiSystemResetMessage: ...
    def __new__(cls: typing.Type[MidiSystemResetMessage]) -> MidiSystemResetMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiTimeCodeMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiTimeCodeMessage: ...
    def __new__(cls: typing.Type[MidiTimeCodeMessage], frame_type: winrt.system.UInt8, values: winrt.system.UInt8) -> MidiTimeCodeMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...
    @_property
    def frame_type(self) -> winrt.system.UInt8: ...
    @_property
    def values(self) -> winrt.system.UInt8: ...

class MidiTimingClockMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiTimingClockMessage: ...
    def __new__(cls: typing.Type[MidiTimingClockMessage]) -> MidiTimingClockMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class MidiTuneRequestMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MidiTuneRequestMessage: ...
    def __new__(cls: typing.Type[MidiTuneRequestMessage]) -> MidiTuneRequestMessage:...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class IMidiMessage(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> IMidiMessage: ...
    @_property
    def raw_data(self) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
    @_property
    def timestamp(self) -> datetime.timedelta: ...
    @_property
    def type(self) -> MidiMessageType: ...

class IMidiOutPort(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> IMidiOutPort: ...
    def close(self) -> None: ...
    def send_buffer(self, midi_data: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> None: ...
    def send_message(self, midi_message: typing.Optional[IMidiMessage], /) -> None: ...
    @_property
    def device_id(self) -> str: ...

