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

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.applicationmodel
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.storage

class GameListCategory(enum.IntEnum):
    CANDIDATE = 0
    CONFIRMED_BY_SYSTEM = 1
    CONFIRMED_BY_USER = 2

class GameListEntryLaunchableState(enum.IntEnum):
    NOT_LAUNCHABLE = 0
    BY_LAST_RUNNING_FULL_PATH = 1
    BY_USER_PROVIDED_PATH = 2
    BY_TILE = 3

Self = typing.TypeVar('Self')

class GameList(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> GameList: ...
    @typing.overload
    @staticmethod
    def find_all_async() -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVectorView[GameListEntry]]: ...
    @typing.overload
    @staticmethod
    def find_all_async(package_family_name: str) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVectorView[GameListEntry]]: ...
    @staticmethod
    def merge_entries_async(left: typing.Optional[GameListEntry], right: typing.Optional[GameListEntry]) -> winsdk.windows.foundation.IAsyncOperation[GameListEntry]: ...
    @staticmethod
    def unmerge_entry_async(merged_entry: typing.Optional[GameListEntry]) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.foundation.collections.IVectorView[GameListEntry]]: ...
    @staticmethod
    def add_game_added(handler: typing.Optional[GameListChangedEventHandler]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @staticmethod
    def remove_game_added(token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @staticmethod
    def add_game_removed(handler: typing.Optional[GameListRemovedEventHandler]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @staticmethod
    def remove_game_removed(token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @staticmethod
    def add_game_updated(handler: typing.Optional[GameListChangedEventHandler]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @staticmethod
    def remove_game_updated(token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class GameListEntry(_winrt.Object):
    category: GameListCategory
    display_info: typing.Optional[winsdk.windows.applicationmodel.AppDisplayInfo]
    properties: typing.Optional[winsdk.windows.foundation.collections.IMapView[str, _winrt.Object]]
    game_mode_configuration: typing.Optional[GameModeConfiguration]
    launch_parameters: str
    launchable_state: GameListEntryLaunchableState
    launcher_executable: typing.Optional[winsdk.windows.storage.IStorageFile]
    title_id: str
    @staticmethod
    def _from(obj: _winrt.Object) -> GameListEntry: ...
    def launch_async(self) -> winsdk.windows.foundation.IAsyncOperation[_winrt.Boolean]: ...
    def set_category_async(self, value: GameListCategory) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def set_launcher_executable_file_async(self, executable_file: typing.Optional[winsdk.windows.storage.IStorageFile]) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    @typing.overload
    def set_launcher_executable_file_async(self, executable_file: typing.Optional[winsdk.windows.storage.IStorageFile], launch_params: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def set_title_id_async(self, id: str) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class GameModeConfiguration(_winrt.Object):
    percent_gpu_time_allocated_to_game: typing.Optional[typing.Optional[_winrt.Int32]]
    percent_gpu_memory_allocated_to_system_compositor: typing.Optional[typing.Optional[_winrt.Int32]]
    percent_gpu_memory_allocated_to_game: typing.Optional[typing.Optional[_winrt.Int32]]
    max_cpu_count: typing.Optional[typing.Optional[_winrt.Int32]]
    is_enabled: _winrt.Boolean
    cpu_exclusivity_mask_low: typing.Optional[typing.Optional[_winrt.Int32]]
    cpu_exclusivity_mask_high: typing.Optional[typing.Optional[_winrt.Int32]]
    affinitize_to_exclusive_cpus: _winrt.Boolean
    related_process_names: typing.Optional[winsdk.windows.foundation.collections.IVector[str]]
    @staticmethod
    def _from(obj: _winrt.Object) -> GameModeConfiguration: ...
    def save_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class GameModeUserConfiguration(_winrt.Object):
    gaming_related_process_names: typing.Optional[winsdk.windows.foundation.collections.IVector[str]]
    @staticmethod
    def _from(obj: _winrt.Object) -> GameModeUserConfiguration: ...
    @staticmethod
    def get_default() -> typing.Optional[GameModeUserConfiguration]: ...
    def save_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

class IGameListEntry(_winrt.Object):
    category: GameListCategory
    display_info: typing.Optional[winsdk.windows.applicationmodel.AppDisplayInfo]
    properties: typing.Optional[winsdk.windows.foundation.collections.IMapView[str, _winrt.Object]]
    @staticmethod
    def _from(obj: _winrt.Object) -> IGameListEntry: ...
    def launch_async(self) -> winsdk.windows.foundation.IAsyncOperation[_winrt.Boolean]: ...
    def set_category_async(self, value: GameListCategory) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...

GameListChangedEventHandler = typing.Callable[[typing.Optional[GameListEntry]], None]

GameListRemovedEventHandler = typing.Callable[[str], None]

