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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.foundation
import winsdk.windows.gaming.input
import winsdk.windows.storage.streams

class GipFirmwareUpdateStatus(enum.IntEnum):
    COMPLETED = 0
    UP_TO_DATE = 1
    FAILED = 2

class GipMessageClass(enum.IntEnum):
    COMMAND = 0
    LOW_LATENCY = 1
    STANDARD_LATENCY = 2

class XusbDeviceSubtype(enum.IntEnum):
    UNKNOWN = 0
    GAMEPAD = 1
    ARCADE_PAD = 2
    ARCADE_STICK = 3
    FLIGHT_STICK = 4
    WHEEL = 5
    GUITAR = 6
    GUITAR_ALTERNATE = 7
    GUITAR_BASS = 8
    DRUM_KIT = 9
    DANCE_PAD = 10

class XusbDeviceType(enum.IntEnum):
    UNKNOWN = 0
    GAMEPAD = 1

Self = typing.TypeVar('Self')

class GameControllerVersionInfo:
    major: winsdk.system.UInt16
    minor: winsdk.system.UInt16
    build: winsdk.system.UInt16
    revision: winsdk.system.UInt16
    def __new__(cls: typing.Type[GameControllerVersionInfo], major: winsdk.system.UInt16, minor: winsdk.system.UInt16, build: winsdk.system.UInt16, revision: winsdk.system.UInt16) -> GameControllerVersionInfo: ...

class GipFirmwareUpdateProgress:
    percent_completed: winsdk.system.Double
    current_component_id: winsdk.system.UInt32
    def __new__(cls: typing.Type[GipFirmwareUpdateProgress], percent_completed: winsdk.system.Double, current_component_id: winsdk.system.UInt32) -> GipFirmwareUpdateProgress: ...

class GameControllerFactoryManager(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> GameControllerFactoryManager: ...
    @staticmethod
    def register_custom_factory_for_gip_interface(factory: typing.Optional[ICustomGameControllerFactory], interface_id: winsdk.system.Guid) -> None: ...
    @staticmethod
    def register_custom_factory_for_hardware_id(factory: typing.Optional[ICustomGameControllerFactory], hardware_vendor_id: winsdk.system.UInt16, hardware_product_id: winsdk.system.UInt16) -> None: ...
    @staticmethod
    def register_custom_factory_for_xusb_type(factory: typing.Optional[ICustomGameControllerFactory], xusb_type: XusbDeviceType, xusb_subtype: XusbDeviceSubtype) -> None: ...
    @staticmethod
    def try_get_factory_controller_from_game_controller(factory: typing.Optional[ICustomGameControllerFactory], game_controller: typing.Optional[winsdk.windows.gaming.input.IGameController]) -> typing.Optional[winsdk.windows.gaming.input.IGameController]: ...

class GipFirmwareUpdateResult(winsdk.system.Object):
    extended_error_code: winsdk.system.UInt32
    final_component_id: winsdk.system.UInt32
    status: GipFirmwareUpdateStatus
    @staticmethod
    def _from(obj: winsdk.system.Object) -> GipFirmwareUpdateResult: ...

class GipGameControllerProvider(winsdk.system.Object):
    firmware_version_info: GameControllerVersionInfo
    hardware_product_id: winsdk.system.UInt16
    hardware_vendor_id: winsdk.system.UInt16
    hardware_version_info: GameControllerVersionInfo
    is_connected: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object) -> GipGameControllerProvider: ...
    def send_message(self, message_class: GipMessageClass, message_id: winsdk.system.UInt8, message_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def send_receive_message(self, message_class: GipMessageClass, message_id: winsdk.system.UInt8, request_message_buffer: winsdk.system.Array[winsdk.system.UInt8], response_message_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def update_firmware_async(self, firmware_image: typing.Optional[winsdk.windows.storage.streams.IInputStream]) -> winsdk.windows.foundation.IAsyncOperationWithProgress[GipFirmwareUpdateResult, GipFirmwareUpdateProgress]: ...

class HidGameControllerProvider(winsdk.system.Object):
    firmware_version_info: GameControllerVersionInfo
    hardware_product_id: winsdk.system.UInt16
    hardware_vendor_id: winsdk.system.UInt16
    hardware_version_info: GameControllerVersionInfo
    is_connected: winsdk.system.Boolean
    usage_id: winsdk.system.UInt16
    usage_page: winsdk.system.UInt16
    @staticmethod
    def _from(obj: winsdk.system.Object) -> HidGameControllerProvider: ...
    def get_feature_report(self, report_id: winsdk.system.UInt8, report_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def send_feature_report(self, report_id: winsdk.system.UInt8, report_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def send_output_report(self, report_id: winsdk.system.UInt8, report_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...

class XusbGameControllerProvider(winsdk.system.Object):
    firmware_version_info: GameControllerVersionInfo
    hardware_product_id: winsdk.system.UInt16
    hardware_vendor_id: winsdk.system.UInt16
    hardware_version_info: GameControllerVersionInfo
    is_connected: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object) -> XusbGameControllerProvider: ...
    def set_vibration(self, low_frequency_motor_speed: winsdk.system.Double, high_frequency_motor_speed: winsdk.system.Double) -> None: ...

class ICustomGameControllerFactory(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> ICustomGameControllerFactory: ...
    def create_game_controller(self, provider: typing.Optional[IGameControllerProvider]) -> typing.Optional[winsdk.system.Object]: ...
    def on_game_controller_added(self, value: typing.Optional[winsdk.windows.gaming.input.IGameController]) -> None: ...
    def on_game_controller_removed(self, value: typing.Optional[winsdk.windows.gaming.input.IGameController]) -> None: ...

class IGameControllerInputSink(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IGameControllerInputSink: ...
    def on_input_resumed(self, timestamp: winsdk.system.UInt64) -> None: ...
    def on_input_suspended(self, timestamp: winsdk.system.UInt64) -> None: ...

class IGameControllerProvider(winsdk.system.Object):
    firmware_version_info: GameControllerVersionInfo
    hardware_product_id: winsdk.system.UInt16
    hardware_vendor_id: winsdk.system.UInt16
    hardware_version_info: GameControllerVersionInfo
    is_connected: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IGameControllerProvider: ...

class IGipGameControllerInputSink(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IGipGameControllerInputSink: ...
    def on_input_resumed(self, timestamp: winsdk.system.UInt64) -> None: ...
    def on_input_suspended(self, timestamp: winsdk.system.UInt64) -> None: ...
    def on_key_received(self, timestamp: winsdk.system.UInt64, key_code: winsdk.system.UInt8, is_pressed: winsdk.system.Boolean) -> None: ...
    def on_message_received(self, timestamp: winsdk.system.UInt64, message_class: GipMessageClass, message_id: winsdk.system.UInt8, sequence_id: winsdk.system.UInt8, message_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...

class IHidGameControllerInputSink(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IHidGameControllerInputSink: ...
    def on_input_report_received(self, timestamp: winsdk.system.UInt64, report_id: winsdk.system.UInt8, report_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def on_input_resumed(self, timestamp: winsdk.system.UInt64) -> None: ...
    def on_input_suspended(self, timestamp: winsdk.system.UInt64) -> None: ...

class IXusbGameControllerInputSink(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object) -> IXusbGameControllerInputSink: ...
    def on_input_received(self, timestamp: winsdk.system.UInt64, report_id: winsdk.system.UInt8, input_buffer: winsdk.system.Array[winsdk.system.UInt8]) -> None: ...
    def on_input_resumed(self, timestamp: winsdk.system.UInt64) -> None: ...
    def on_input_suspended(self, timestamp: winsdk.system.UInt64) -> None: ...

