Table of Contents

Interface IMainViewAPI

Namespace
Playnite.SDK
Assembly
Playnite.SDK.dll

Describes object providing API for main UI view.

public interface IMainViewAPI

Properties

ActiveDesktopView

Gets currently active Desktop mode view.

DesktopView ActiveDesktopView { get; set; }

Property Value

DesktopView

ActiveFullscreenView

Gets currently active Fullscreen mode view.

FullscreenView ActiveFullscreenView { get; }

Property Value

FullscreenView

FilteredGames

Gets list of games currently available in game list.

List<Game> FilteredGames { get; }

Property Value

List<Game>

Grouping

Gets currently active grouping field.

GroupableField Grouping { get; set; }

Property Value

GroupableField

SelectedGames

Gets list of currently selected games.

IEnumerable<Game> SelectedGames { get; }

Property Value

IEnumerable<Game>

SortOrder

Gets currently active sorting order.

SortOrder SortOrder { get; }

Property Value

SortOrder

SortOrderDirection

Gets currently active sorting order direction.

SortOrderDirection SortOrderDirection { get; set; }

Property Value

SortOrderDirection

UIDispatcher

Gets UI thread dispatcher.

Dispatcher UIDispatcher { get; }

Property Value

Dispatcher

Methods

ApplyFilterPreset(FilterPreset)

Applies filter preset.

void ApplyFilterPreset(FilterPreset preset)

Parameters

preset FilterPreset

Filter preset.

ApplyFilterPreset(Guid)

Applies filter preset.

void ApplyFilterPreset(Guid filterId)

Parameters

filterId Guid

Filter ID.

GetActiveFilterPreset()

Gets ID of currently active filter preset.

Guid GetActiveFilterPreset()

Returns

Guid

GetCurrentFilterSettings()

Gets current filter settings.

FilterPresetSettings GetCurrentFilterSettings()

Returns

FilterPresetSettings

OpenPluginSettings(Guid)

Opens settings view for specified plugin.

bool OpenPluginSettings(Guid pluginId)

Parameters

pluginId Guid

Plugin ID.

Returns

bool

True if user saved any changes, False if dialog was canceled.

OpenSearch(SearchContext, string)

Opens global search view.

void OpenSearch(SearchContext context, string searchTerm)

Parameters

context SearchContext

Search context to be activated after opening the view.

searchTerm string

Default search term.

OpenSearch(string)

Opens global search view.

void OpenSearch(string searchTerm)

Parameters

searchTerm string

Default search term.

SelectGame(Guid)

Selects game.

void SelectGame(Guid gameId)

Parameters

gameId Guid

Game's database ID.

SelectGames(IEnumerable<Guid>)

Selects multiple games.

void SelectGames(IEnumerable<Guid> gameIds)

Parameters

gameIds IEnumerable<Guid>

List of game IDs to select.

SwitchToLibraryView()

Switches Playnite to Library view.

void SwitchToLibraryView()