cdp

package
v0.0.0-...-95e8c34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSteamCtx

func GetSteamCtx(debugPort string) (ctx context.Context, cancel func(), err error)

GetSteamCtx returns the CDP context for the running Steam client.

func IsAppPropertiesTarget

func IsAppPropertiesTarget(target *target.Info) bool

func IsKeyboardTarget

func IsKeyboardTarget(target *target.Info) bool

func IsLibraryTarget

func IsLibraryTarget(target *target.Info) bool

func IsMenuTarget

func IsMenuTarget(target *target.Info) bool

func IsQuickAccessTarget

func IsQuickAccessTarget(target *target.Info) bool

func ShowLoadingIndicator

func ShowLoadingIndicator(debugPort, serverPort, authToken string) error

ShowLoadingIndicator shows a Crankshaft loading indicator in Steam.

func WaitForConnection

func WaitForConnection(debugPort string)

func WaitForLibraryEl

func WaitForLibraryEl(debugPort string) error

Types

type SteamClient

type SteamClient struct {
	Cancel func()

	UiMode UIMode
	// contains filtered or unexported fields
}

SteamClient is a wrapper around CDP commands that allow you to run scripts in and retrieve information about the running Steam client.

func NewSteamClient

func NewSteamClient(debugPort string) (*SteamClient, error)

NewSteamClient creates and initializes a new SteamClient.

func (*SteamClient) RunScriptInAppProperties

func (sc *SteamClient) RunScriptInAppProperties(script string, title string) error

func (*SteamClient) RunScriptInKeyboard

func (sc *SteamClient) RunScriptInKeyboard(script string) error

func (*SteamClient) RunScriptInLibrary

func (sc *SteamClient) RunScriptInLibrary(script string) error

func (*SteamClient) RunScriptInMenu

func (sc *SteamClient) RunScriptInMenu(script string) error

func (*SteamClient) RunScriptInQuickAccess

func (sc *SteamClient) RunScriptInQuickAccess(script string) error

func (*SteamClient) WaitForTarget

func (sc *SteamClient) WaitForTarget(steamTarget SteamTarget) error

WaitForTarget waits for the given target to be found.

type SteamTarget

type SteamTarget string

SteamTarget indicates which of the Steam Client's CDP targets you want to use as the context for whatever command you're executing.

const (
	LibraryTarget       SteamTarget = "SP"
	KeyboardTarget      SteamTarget = "SP_Keyboard"
	MenuTarget          SteamTarget = "MainMenu"
	QuickAccessTarget   SteamTarget = "QuickAccess"
	AppPropertiesTarget SteamTarget = "AppProperties"
)

type UIMode

type UIMode string

UIMode indicates if Steam is running in desktop or deck mode.

const (
	UIModeDesktop UIMode = "desktop"
	UIModeDeck           = "deck"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL