Documentation
¶
Overview ¶
Package app wires Seaglass together and holds the services the frontend calls.
Index ¶
- Constants
- func ApplyPendingUpdate(version string, tray bool) bool
- func CaptureCrashes() bool
- func DevAllowed(version string) bool
- func PlayArg(args []string) (int64, bool)
- func StartDev(c *Core, d DevArgs)
- func WriteDiagnostics(c *Core) (string, error)
- type Accounts
- type AccountsService
- func (s *AccountsService) EpicSignIn(pasted string) (Accounts, error)
- func (s *AccountsService) EpicSignOut() (Accounts, error)
- func (s *AccountsService) GOGSignIn(pasted string) (Accounts, error)
- func (s *AccountsService) GOGSignOut() (Accounts, error)
- func (s *AccountsService) Get() Accounts
- func (s *AccountsService) OpenEpicSignIn() error
- func (s *AccountsService) OpenGOGSignIn() error
- func (s *AccountsService) OpenSteamKeyPage() error
- func (s *AccountsService) SetGOG(on bool) (Accounts, error)
- func (s *AccountsService) SetSteamKey(key string) (Accounts, error)
- func (s *AccountsService) Sync()
- type AchievementsService
- type AppInfo
- type Args
- type Core
- type DevArgs
- type LaunchService
- func (s *LaunchService) Answer(questionID int, option string)
- func (s *LaunchService) Cancel()
- func (s *LaunchService) CloseOverlay()
- func (s *LaunchService) OpenMain()
- func (s *LaunchService) Play(id int64) error
- func (s *LaunchService) PlayFromArgs(args []string) bool
- func (s *LaunchService) QuitGame() error
- func (s *LaunchService) Route(id int64) string
- func (s *LaunchService) Session() launch.Session
- func (s *LaunchService) SetUIMode(mode string)
- func (s *LaunchService) Skip(stepID string)
- type LibraryService
- func (s *LibraryService) ArtChoices(id int64, kind string) ([]meta.Choice, error)
- func (s *LibraryService) ChooseExe(id int64) (library.Game, error)
- func (s *LibraryService) ConfirmMatch(id int64) (library.Game, error)
- func (s *LibraryService) Game(id int64) (library.Game, error)
- func (s *LibraryService) Games() []library.Game
- func (s *LibraryService) Install(id int64) error
- func (s *LibraryService) MetaState() MetaState
- func (s *LibraryService) OpenFolder(id int64) error
- func (s *LibraryService) RefreshMetadata(id int64) error
- func (s *LibraryService) Rename(id int64, title string) (library.Game, error)
- func (s *LibraryService) RenameCollection(old, name string) error
- func (s *LibraryService) Rescan()
- func (s *LibraryService) ScanState() ScanState
- func (s *LibraryService) SearchSteam(query string) ([]meta.StoreHit, error)
- func (s *LibraryService) ServiceShutdown() error
- func (s *LibraryService) ServiceStartup(context.Context, application.ServiceOptions) error
- func (s *LibraryService) SetArt(id int64, kind, art string) (library.Game, error)
- func (s *LibraryService) SetCollections(id int64, names []string) (library.Game, error)
- func (s *LibraryService) SetFavorite(id int64, on bool) (library.Game, error)
- func (s *LibraryService) SetHidden(id int64, on bool) (library.Game, error)
- func (s *LibraryService) SetMatch(id int64, steamAppID int, name string) (library.Game, error)
- func (s *LibraryService) SetPadMode(id int64, mode string) (library.Game, error)
- type MetaState
- type PadAction
- type PadService
- type Profile
- type ProfileService
- type Saves
- type SavesService
- type ScanState
- type SessionAchievements
- type SettingsService
- func (s *SettingsService) AddFolder() (settings.Settings, error)
- func (s *SettingsService) AutoFolders() []string
- func (s *SettingsService) CopyDiagnostics() error
- func (s *SettingsService) Get() settings.Settings
- func (s *SettingsService) HasSteamGridDBKey() bool
- func (s *SettingsService) Info() AppInfo
- func (s *SettingsService) OpenLog() error
- func (s *SettingsService) RemoveFolder(path string) (settings.Settings, error)
- func (s *SettingsService) ReportProblem() error
- func (s *SettingsService) ReportUIError(message string)
- func (s *SettingsService) Save(v settings.Settings) (settings.Settings, error)
- func (s *SettingsService) SetStartWithWindows(on bool) (platform.Startup, error)
- func (s *SettingsService) SetSteamGridDBKey(key string) error
- func (s *SettingsService) StartWithWindows() platform.Startup
- type Shell
- func (s *Shell) CloseOverlay()
- func (s *Shell) FocusMain() bool
- func (s *Shell) Hidden() bool
- func (s *Shell) OpenMain()
- func (s *Shell) OpenOverlay()
- func (s *Shell) OverlayOpen() bool
- func (s *Shell) SetUIMode(mode string)
- func (s *Shell) Start()
- func (s *Shell) StartHidden()
- func (s *Shell) ToggleOverlay()
- type StoreAccount
- type SyncerStatus
- type UpdateService
- type UpdateState
Constants ¶
const ( EventLibraryChanged = "library:changed" // reload the whole library EventGamesUpdated = "games:updated" // these games changed; the rest didn't EventScanState = "scan:state" )
Events the frontend listens for.
const ( EventSession = "launch:session" EventOverlayAction = "overlay:action" // controller actions while the overlay shows EventUIMode = "ui:mode" // the tray asks the interface to switch mode )
Events about playing.
const ( RouteDirect = "direct" // its exe, by Seaglass RouteStore = "store" // handed to its store (Steam, Epic, …) RouteSteamInput = "steamInput" // a non-Steam shortcut, so Steam Input handles the controller )
Routes: how a game is started.
const ( EventPadAction = "pad:action" EventPadState = "pad:state" EventPadRaw = "pad:raw" // every button and axis, while the test screen is open )
Controller events for the interface.
const ( EventProfile = "profile:changed" // who's playing, and whether Syncer syncs the profile EventSettings = "settings:changed" // settings saved on another PC were taken )
Events for the profile.
const ( UpdateOff = "off" // a development build: no updates UpdateIdle = "idle" // not checked yet UpdateChecking = "checking" // asking GitHub UpdateUpToDate = "uptodate" // this is the newest version UpdateAvailable = "available" // newer, but this copy can't update itself: download by hand UpdateDownloading = "downloading" // fetching and checking it UpdateReady = "ready" // downloaded and checked; installs on restart UpdateError = "error" // the last check or download failed )
Update statuses.
const DevPipe = `\\.\pipe\seaglass-dev`
DevPipe is the control pipe's name.
const EventAccounts = "accounts:changed"
EventAccounts tells the interface the store accounts changed.
const EventAchievementsSession = "achievements:session"
EventAchievementsSession tells the interface which achievements a play session unlocked, once the game has exited.
const EventMetaState = "meta:state"
EventMetaState reports metadata fetching progress to the interface.
const EventUpdateState = "update:state"
EventUpdateState tells the interface how updating goes.
const RouteExternal = "external"
RouteExternal is a game started outside Seaglass (from Steam, a desktop shortcut, …) that Seaglass noticed and follows.
Variables ¶
This section is empty.
Functions ¶
func ApplyPendingUpdate ¶
ApplyPendingUpdate installs a downloaded update as Seaglass starts, before anything else runs, when automatic updates are on. It reports whether it did; Seaglass then exits and the new version starts. An update whose install was already tried once waits for the user.
func CaptureCrashes ¶
func CaptureCrashes() bool
CaptureCrashes routes crash output to crash.log, first keeping what the previous run left there. It reports whether that run crashed.
func DevAllowed ¶
DevAllowed reports whether dev flags work in this build.
func PlayArg ¶
PlayArg finds "--play <id>" in command-line arguments, so a desktop shortcut can start a game through Seaglass.
func WriteDiagnostics ¶
WriteDiagnostics writes the diagnostics report to the desktop and returns its path (Seaglass.exe --diagnostics).
Types ¶
type Accounts ¶
type Accounts struct {
Steam StoreAccount `json:"steam"`
GOG StoreAccount `json:"gog"`
Epic StoreAccount `json:"epic"`
// GOGSignIn is the GOG account signed in for achievements (GOG
// Galaxy's library, above, needs no sign-in).
GOGSignIn StoreAccount `json:"gogSignIn"`
}
Accounts are the store accounts owned games come from.
type AccountsService ¶
type AccountsService struct {
// contains filtered or unexported fields
}
AccountsService connects store accounts for owned games.
func NewAccountsService ¶
func NewAccountsService(c *Core) *AccountsService
NewAccountsService binds accounts to core.
func (*AccountsService) EpicSignIn ¶
func (s *AccountsService) EpicSignIn(pasted string) (Accounts, error)
EpicSignIn finishes the Epic sign-in with the code the page showed (the code alone, or the whole text) and fetches the account's games.
func (*AccountsService) EpicSignOut ¶
func (s *AccountsService) EpicSignOut() (Accounts, error)
EpicSignOut forgets the Epic sign-in and its owned games.
func (*AccountsService) GOGSignIn ¶ added in v1.6.0
func (s *AccountsService) GOGSignIn(pasted string) (Accounts, error)
GOGSignIn finishes the GOG sign-in with the address the browser ended on (or the code in it). It's used for achievements only.
func (*AccountsService) GOGSignOut ¶ added in v1.6.0
func (s *AccountsService) GOGSignOut() (Accounts, error)
GOGSignOut forgets the GOG sign-in.
func (*AccountsService) OpenEpicSignIn ¶
func (s *AccountsService) OpenEpicSignIn() error
OpenEpicSignIn opens Epic's sign-in page in the browser.
func (*AccountsService) OpenGOGSignIn ¶ added in v1.6.0
func (s *AccountsService) OpenGOGSignIn() error
OpenGOGSignIn opens GOG's sign-in page in the browser.
func (*AccountsService) OpenSteamKeyPage ¶
func (s *AccountsService) OpenSteamKeyPage() error
OpenSteamKeyPage opens Steam's page for creating a Web API key.
func (*AccountsService) SetGOG ¶
func (s *AccountsService) SetGOG(on bool) (Accounts, error)
SetGOG turns reading GOG Galaxy's library on or off.
func (*AccountsService) SetSteamKey ¶
func (s *AccountsService) SetSteamKey(key string) (Accounts, error)
SetSteamKey stores the user's Steam Web API key (encrypted for this Windows user) and fetches the account's games; "" disconnects Steam.
func (*AccountsService) Sync ¶
func (s *AccountsService) Sync()
Sync fetches the owned games again, in the background.
type AchievementsService ¶ added in v1.6.0
type AchievementsService struct {
// contains filtered or unexported fields
}
AchievementsService is a game's achievements, for the interface.
func NewAchievementsService ¶ added in v1.6.0
func NewAchievementsService(c *Core) *AchievementsService
NewAchievementsService binds achievements to core.
func (*AchievementsService) EnableUplay ¶ added in v1.9.0
func (s *AchievementsService) EnableUplay(id int64) (achievements.List, error)
EnableUplay turns achievements on for a game on a Uplay emulator (Achievements = 1 in its ini) and reads them again.
func (*AchievementsService) Get ¶ added in v1.6.0
func (s *AchievementsService) Get(id int64, fresh bool) (achievements.List, error)
Get returns a game's achievements. Results are reused while the files they came from haven't changed; fresh reads them again.
type AppInfo ¶
type AppInfo struct {
Version string `json:"version"`
DataDir string `json:"dataDir"`
LogFile string `json:"logFile"`
// The previous run crashed (its output is in crash-previous.log).
CrashedLastTime bool `json:"crashedLastTime"`
}
AppInfo describes this build.
type Args ¶
type Args struct {
Play int64 // --play <id>: start this game without the interface
Tray bool // --tray: start in the tray (at sign-in)
Quit bool // --quit: close the running Seaglass (installer)
Updated bool // --updated: started by an update
// --diagnostics: write a diagnostics report to the desktop and exit,
// for when the interface won't open.
Diagnostics bool
// Dev flags for the test harness (dev builds only; see dev.go).
Dev DevArgs
}
Args are Seaglass's command-line options.
type Core ¶
type Core struct {
Version string
Lib *library.Store
Settings *settings.Store
Manifest *identify.Manager
Launch *launch.Manager
// Frozen keeps the library as it is: no scans, metadata, store
// accounts or update checks (the test harness's --dev-data).
Frozen bool
// contains filtered or unexported fields
}
Core is shared by the services.
func (*Core) RequestScan ¶
func (c *Core) RequestScan()
RequestScan asks for a scan soon; requests while one runs coalesce.
type DevArgs ¶
Dev flags drive the real app from a test harness (tools/harness). They only work in dev builds: a release build ignores them.
--virtual-pad[=ps|xbox] plug in a virtual controller (SDL's own)
--remote-debugging=PORT WebView2's DevTools protocol on 127.0.0.1:PORT
--dev-data=DIR library, settings and log in DIR; no scans,
metadata, store accounts or update checks
Any of them opens the control pipe DevPipe, one command per line:
press <button> [ms] down, wait (default 80 ms), up
down|up <button> buttons: south east west north back guide start
lb rb up down left right touchpad leftstick …
axis <axis> <value> lx ly rx ry lt rt, -32768…32767
plug ps|xbox, unplug
state controller, session, windows (JSON)
mem the core's memory (JSON)
quit
type LaunchService ¶
type LaunchService struct {
// contains filtered or unexported fields
}
LaunchService starts games and follows them while they run.
func NewLaunchService ¶
func NewLaunchService(c *Core) *LaunchService
NewLaunchService binds launching to core.
func (*LaunchService) Answer ¶
func (s *LaunchService) Answer(questionID int, option string)
Answer answers a question a hook asked.
func (*LaunchService) Cancel ¶
func (s *LaunchService) Cancel()
Cancel stops a launch that hasn't reached the game yet.
func (*LaunchService) CloseOverlay ¶
func (s *LaunchService) CloseOverlay()
CloseOverlay hides the in-game overlay.
func (*LaunchService) OpenMain ¶
func (s *LaunchService) OpenMain()
OpenMain opens the main window (from the overlay), leaving the game running.
func (*LaunchService) Play ¶
func (s *LaunchService) Play(id int64) error
Play starts a game: hooks first, then the game, then it is followed until it exits.
func (*LaunchService) PlayFromArgs ¶
func (s *LaunchService) PlayFromArgs(args []string) bool
PlayFromArgs starts the game named by "--play <id>", if any. The interface isn't opened for it; the game comes first.
func (*LaunchService) QuitGame ¶
func (s *LaunchService) QuitGame() error
QuitGame ends the running game's processes right away.
func (*LaunchService) Route ¶
func (s *LaunchService) Route(id int64) string
Route tells how a game would start now: direct, store or steamInput.
func (*LaunchService) Session ¶
func (s *LaunchService) Session() launch.Session
Session returns the current (or last) game session.
func (*LaunchService) SetUIMode ¶
func (s *LaunchService) SetUIMode(mode string)
SetUIMode tells the core which mode the interface shows.
func (*LaunchService) Skip ¶
func (s *LaunchService) Skip(stepID string)
Skip skips a hook step that is running.
type LibraryService ¶
type LibraryService struct {
// contains filtered or unexported fields
}
LibraryService is the game library, as the frontend sees it.
func NewLibraryService ¶
func NewLibraryService(c *Core) *LibraryService
NewLibraryService binds the library to core.
func (*LibraryService) ArtChoices ¶
ArtChoices finds the pictures a game's cover, backdrop, hero or logo could be (kind), stored and ready to show; the current one comes first. It asks the stores, so it can take a few seconds.
func (*LibraryService) ChooseExe ¶
func (s *LibraryService) ChooseExe(id int64) (library.Game, error)
ChooseExe lets the user pick the executable that starts the game.
func (*LibraryService) ConfirmMatch ¶
func (s *LibraryService) ConfirmMatch(id int64) (library.Game, error)
ConfirmMatch accepts the game's identity, so it no longer waits for a check in New on this PC.
func (*LibraryService) Game ¶
func (s *LibraryService) Game(id int64) (library.Game, error)
Game returns one game.
func (*LibraryService) Games ¶
func (s *LibraryService) Games() []library.Game
Games returns every game in the library.
func (*LibraryService) Install ¶
func (s *LibraryService) Install(id int64) error
Install asks the game's store to install it (owned, not installed).
func (*LibraryService) MetaState ¶
func (s *LibraryService) MetaState() MetaState
MetaState reports metadata fetching progress.
func (*LibraryService) OpenFolder ¶
func (s *LibraryService) OpenFolder(id int64) error
OpenFolder shows the game's folder in Explorer.
func (*LibraryService) RefreshMetadata ¶
func (s *LibraryService) RefreshMetadata(id int64) error
RefreshMetadata fetches a game's metadata and art again.
func (*LibraryService) RenameCollection ¶
func (s *LibraryService) RenameCollection(old, name string) error
RenameCollection renames a collection in every game; an empty name deletes it (the games stay).
func (*LibraryService) ScanState ¶
func (s *LibraryService) ScanState() ScanState
ScanState reports what the scanner is doing.
func (*LibraryService) SearchSteam ¶
func (s *LibraryService) SearchSteam(query string) ([]meta.StoreHit, error)
SearchSteam looks up titles on the Steam store, to pick the right game.
func (*LibraryService) ServiceShutdown ¶
func (s *LibraryService) ServiceShutdown() error
ServiceShutdown saves the library.
func (*LibraryService) ServiceStartup ¶
func (s *LibraryService) ServiceStartup(context.Context, application.ServiceOptions) error
ServiceStartup starts scanning once the app runs.
func (*LibraryService) SetArt ¶
SetArt makes a picture from ArtChoices the game's cover, backdrop, hero or logo, kept through later refreshes.
func (*LibraryService) SetCollections ¶
SetCollections puts a game in these collections (and out of others).
func (*LibraryService) SetFavorite ¶
SetFavorite marks or unmarks a favorite.
func (*LibraryService) SetHidden ¶
SetHidden hides a game from the library views (or shows it again).
func (*LibraryService) SetMatch ¶
SetMatch says which game this is: a Steam app and its name. The choice is kept across scans, and metadata is fetched for it.
func (*LibraryService) SetPadMode ¶
SetPadMode picks how a controller reaches the game: "" (auto), "native" or "steam".
type MetaState ¶
type MetaState struct {
Running bool `json:"running"`
Done int `json:"done"`
Total int `json:"total"`
}
MetaState is what the metadata worker is doing.
type PadService ¶
type PadService struct {
// contains filtered or unexported fields
}
PadService is the controller: actions, glyph family, rumble and lightbar.
func NewPadService ¶
func NewPadService(c *Core) *PadService
NewPadService binds the controller layer to core.
func (*PadService) Rumble ¶
func (s *PadService) Rumble(effect string)
Rumble plays a short effect ("tick", "bump", "confirm", "error", "launch") when the user has haptics on.
func (*PadService) ServiceShutdown ¶
func (s *PadService) ServiceShutdown() error
ServiceShutdown releases the controllers.
func (*PadService) ServiceStartup ¶
func (s *PadService) ServiceStartup(context.Context, application.ServiceOptions) error
ServiceStartup starts reading controllers.
func (*PadService) SetLight ¶
func (s *PadService) SetLight(hex string)
SetLight tints the DualSense lightbar (#rrggbb) when the user has that on.
func (*PadService) State ¶
func (s *PadService) State() pad.State
State returns the controller in use.
func (*PadService) TestInput ¶
func (s *PadService) TestInput(on bool)
TestInput turns the stream of raw buttons and axes ("pad:raw") on or off, for the controller test screen.
type Profile ¶ added in v1.8.0
type Profile struct {
// Accounts are Syncer's; Enabled false when it has none, is off, or
// is too old for them.
Enabled bool `json:"enabled"`
Active string `json:"active,omitempty"`
Accounts []syncer.Account `json:"accounts"`
// Owner is whose playtime this PC adds to: the active account, the
// last one this PC had, or "shared".
Owner string `json:"owner"`
OwnerName string `json:"ownerName,omitempty"`
// Syncer: installed, answered, and has accounts.
Installed bool `json:"installed"`
Reachable bool `json:"reachable"`
Supported bool `json:"supported"`
// Synced: Syncer syncs the profile folder (Backup: backs it up).
Synced bool `json:"synced"`
Backup bool `json:"backup"`
Dismissed bool `json:"dismissed"`
DataError string `json:"dataError,omitempty"`
Dir string `json:"dir"`
// SettingsFrom is the PC the settings in use were saved on ("" this one).
SettingsFrom string `json:"settingsFrom,omitempty"`
CheckedAt int64 `json:"checkedAt,omitempty"`
}
Profile is who's playing on this PC and how their playtime, achievements and settings get to their other PCs, for the interface.
type ProfileService ¶ added in v1.8.0
type ProfileService struct {
// contains filtered or unexported fields
}
ProfileService is who's playing, for the interface.
func NewProfileService ¶ added in v1.8.0
func NewProfileService(c *Core) *ProfileService
NewProfileService binds the profile to core.
func (*ProfileService) Get ¶ added in v1.8.0
func (s *ProfileService) Get(fresh bool) Profile
Get returns the last known state; fresh asks Syncer first (without starting it).
type Saves ¶
type Saves struct {
Installed bool `json:"installed"` // Syncer is installed
Outdated bool `json:"outdated"` // too old for the launcher API
Available bool `json:"available"` // Syncer answered
Error string `json:"error,omitempty"`
Known bool `json:"known"` // Syncer has save folders for this game
Folders []syncer.Folder `json:"folders"`
}
Saves is what Syncer knows about a game's saves, for the interface.
type SavesService ¶
type SavesService struct {
// contains filtered or unexported fields
}
SavesService is the game's saves, through Syncer.
func NewSavesService ¶
func NewSavesService(c *Core) *SavesService
NewSavesService binds Syncer to core.
func (*SavesService) InstallSyncer ¶
func (s *SavesService) InstallSyncer() error
InstallSyncer installs Syncer, or updates it, from its latest release: the installer is checked against the SHA-256 GitHub published for it and runs silently, for this Windows account only (no administrator).
func (*SavesService) OpenSyncer ¶
func (s *SavesService) OpenSyncer() error
OpenSyncer shows Syncer's window.
func (*SavesService) Saves ¶
func (s *SavesService) Saves(id int64, fresh bool) (Saves, error)
Saves returns what Syncer knows about a game's saves. Syncer is started in the background (without its window) when needed. Answers are kept for a little while; fresh asks again right away.
func (*SavesService) Syncer ¶
func (s *SavesService) Syncer(start bool) SyncerStatus
Syncer reports Syncer's state. With start it starts Syncer (without its window) when it isn't running, as a launch would; otherwise it only looks, so opening Settings doesn't start anything.
func (*SavesService) SyncerProject ¶
func (s *SavesService) SyncerProject() error
SyncerProject opens Syncer's home page.
type ScanState ¶
type ScanState struct {
Running bool `json:"running"`
LastScan int64 `json:"lastScan"` // unix seconds
TookMs int64 `json:"tookMs"`
Games int `json:"games"`
Added int `json:"added"`
Known int `json:"known"` // titles in the game database; 0 until it's downloaded
Error string `json:"error,omitempty"`
}
ScanState tells the frontend what the scanner is doing.
type SessionAchievements ¶ added in v1.6.0
type SessionAchievements struct {
GameID int64 `json:"gameId"`
Title string `json:"title"`
Unlocked []achievements.Achievement `json:"unlocked"`
}
SessionAchievements are the achievements one session unlocked.
type SettingsService ¶
type SettingsService struct {
// contains filtered or unexported fields
}
SettingsService is the user's preferences.
func NewSettingsService ¶
func NewSettingsService(c *Core) *SettingsService
NewSettingsService binds settings to core.
func (*SettingsService) AddFolder ¶
func (s *SettingsService) AddFolder() (settings.Settings, error)
AddFolder asks for a folder whose subfolders are games and adds it.
func (*SettingsService) AutoFolders ¶
func (s *SettingsService) AutoFolders() []string
AutoFolders lists the common game folders found on this PC.
func (*SettingsService) CopyDiagnostics ¶
func (s *SettingsService) CopyDiagnostics() error
CopyDiagnostics puts a report for a bug report on the clipboard: versions, settings, what the library holds, controller, Syncer, updates, the last crash and the end of the log. It holds no keys or tokens, and the user folder is shortened to %USERPROFILE%.
func (*SettingsService) Get ¶
func (s *SettingsService) Get() settings.Settings
Get returns the settings.
func (*SettingsService) HasSteamGridDBKey ¶
func (s *SettingsService) HasSteamGridDBKey() bool
HasSteamGridDBKey reports whether a SteamGridDB key is stored.
func (*SettingsService) Info ¶
func (s *SettingsService) Info() AppInfo
Info returns the version and where data is kept.
func (*SettingsService) OpenLog ¶
func (s *SettingsService) OpenLog() error
OpenLog shows the log file's folder.
func (*SettingsService) RemoveFolder ¶
func (s *SettingsService) RemoveFolder(path string) (settings.Settings, error)
RemoveFolder stops looking in a watched folder.
func (*SettingsService) ReportProblem ¶
func (s *SettingsService) ReportProblem() error
ReportProblem opens a new GitHub issue for Seaglass.
func (*SettingsService) ReportUIError ¶
func (s *SettingsService) ReportUIError(message string)
ReportUIError logs an error the interface ran into (an exception or a rejected promise), so it shows up in the log and in diagnostics.
func (*SettingsService) Save ¶
Save stores new settings; library settings trigger a scan. Settings that go with the person are shared with their other PCs.
func (*SettingsService) SetStartWithWindows ¶
func (s *SettingsService) SetStartWithWindows(on bool) (platform.Startup, error)
SetStartWithWindows turns starting with Windows on or off.
func (*SettingsService) SetSteamGridDBKey ¶
func (s *SettingsService) SetSteamGridDBKey(key string) error
SetSteamGridDBKey stores (or with "", removes) the SteamGridDB API key, encrypted for this Windows user, and fetches art the stores lacked.
func (*SettingsService) StartWithWindows ¶
func (s *SettingsService) StartWithWindows() platform.Startup
StartWithWindows reports whether Seaglass starts (in the tray) when you sign in to Windows.
type Shell ¶
type Shell struct {
// contains filtered or unexported fields
}
Shell owns Seaglass's windows and tray icon. The Go core keeps running without any window: while a game runs the interface is closed to free its memory, and comes back when the game exits.
func (*Shell) FocusMain ¶
FocusMain brings the main window forward if it is open; it reports whether it was.
func (*Shell) Hidden ¶ added in v1.8.0
Hidden reports whether Seaglass shows no window, only its tray icon.
func (*Shell) OpenMain ¶
func (s *Shell) OpenMain()
OpenMain shows the main window, making it again when it was closed.
func (*Shell) OpenOverlay ¶
func (s *Shell) OpenOverlay()
OpenOverlay shows the overlay over the game: a borderless window on top of everything. Nothing is injected into the game.
func (*Shell) OverlayOpen ¶
OverlayOpen reports whether the overlay shows.
func (*Shell) SetUIMode ¶
SetUIMode records which mode the interface is in, so it comes back the same way after a game.
func (*Shell) StartHidden ¶
func (s *Shell) StartHidden()
StartHidden shows only the tray icon (a game starts from the command line).
func (*Shell) ToggleOverlay ¶
func (s *Shell) ToggleOverlay()
ToggleOverlay opens or closes the in-game overlay.
type StoreAccount ¶
type StoreAccount struct {
Connected bool `json:"connected"`
Available bool `json:"available"` // the store is on this PC (GOG: Galaxy's library)
Name string `json:"name,omitempty"`
Games int `json:"games"`
Synced int64 `json:"synced,omitempty"` // unix seconds
Syncing bool `json:"syncing"`
Error string `json:"error,omitempty"`
}
StoreAccount is one store account as Settings shows it.
type SyncerStatus ¶
type SyncerStatus struct {
Installed bool `json:"installed"`
Version string `json:"version,omitempty"`
Outdated bool `json:"outdated"` // too old for the launcher API
Connected bool `json:"connected"` // Syncer answered
Running bool `json:"running"` // its launcher API is up (it may not have been asked to start)
Error string `json:"error,omitempty"`
Syncing bool `json:"syncing"` // its sync engine runs
Paused bool `json:"paused"`
PausedUntil int64 `json:"pausedUntil,omitempty"`
BackingUp bool `json:"backingUp"`
LastBackup int64 `json:"lastBackup,omitempty"`
Games int `json:"games"`
Conflicts int `json:"conflicts"`
CheckedAt int64 `json:"checkedAt"`
}
SyncerStatus is how Seaglass and Syncer get on, for Settings.
type UpdateService ¶
type UpdateService struct {
// contains filtered or unexported fields
}
UpdateService lets the interface see and drive updates.
func NewUpdateService ¶
func NewUpdateService(c *Core) *UpdateService
NewUpdateService binds updates to core.
func (*UpdateService) Check ¶
func (s *UpdateService) Check()
Check looks for a new version now (and downloads it).
func (*UpdateService) Install ¶
func (s *UpdateService) Install() error
Install installs the downloaded update and restarts Seaglass.
func (*UpdateService) OpenReleasePage ¶
func (s *UpdateService) OpenReleasePage() error
OpenReleasePage opens the newest release on GitHub.
func (*UpdateService) State ¶
func (s *UpdateService) State() UpdateState
State reports what the updater knows.
type UpdateState ¶
type UpdateState struct {
Current string `json:"current"`
Latest string `json:"latest,omitempty"`
Status string `json:"status"`
Progress float64 `json:"progress"` // 0 to 1 while downloading
Notes string `json:"notes,omitempty"`
Page string `json:"page"`
Error string `json:"error,omitempty"`
CheckedAt int64 `json:"checkedAt"` // unix seconds
// Failed: an install of Latest was started before but this is still
// the old version, so it isn't retried on its own.
Failed bool `json:"failed"`
}
UpdateState is what the interface shows about updates.