Documentation
¶
Index ¶
- func Activate(ctx context.Context, bundleID string) error
- type AppSelector
- type ReadyState
- type RunningApp
- func FindRunningApp(apps []RunningApp, selector AppSelector) *RunningApp
- func Launch(ctx context.Context, bundlePath, bundleID string, frontmost bool) (*RunningApp, error)
- func ListRunningApps(ctx context.Context) ([]RunningApp, error)
- func ParseLSAppInfoList(output string) []RunningApp
- func WaitForProcess(ctx context.Context, selector AppSelector) (*RunningApp, error)
- type WaitOptions
- type WindowInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppSelector ¶
type ReadyState ¶
type ReadyState struct {
Ready bool `json:"ready"`
Name string `json:"name,omitempty"`
BundleID string `json:"bundle_id,omitempty"`
PID int `json:"pid,omitempty"`
Frontmost bool `json:"frontmost,omitempty"`
MainWindow WindowInfo `json:"main_window,omitempty"`
}
func WaitUntilReady ¶
func WaitUntilReady(ctx context.Context, selector AppSelector, opts WaitOptions) (*ReadyState, error)
type RunningApp ¶
type RunningApp struct {
Name string `json:"name,omitempty"`
BundleID string `json:"bundle_id,omitempty"`
PID int `json:"pid,omitempty"`
}
func FindRunningApp ¶
func FindRunningApp(apps []RunningApp, selector AppSelector) *RunningApp
func ListRunningApps ¶
func ListRunningApps(ctx context.Context) ([]RunningApp, error)
func ParseLSAppInfoList ¶
func ParseLSAppInfoList(output string) []RunningApp
func WaitForProcess ¶
func WaitForProcess(ctx context.Context, selector AppSelector) (*RunningApp, error)
type WaitOptions ¶
type WindowInfo ¶
type WindowInfo struct {
Title string `json:"title,omitempty"`
X int `json:"x,omitempty"`
Y int `json:"y,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
ChildCount int `json:"child_count,omitempty"`
}
func ChooseReadyWindow ¶
func ChooseReadyWindow(windows []WindowInfo, opts WaitOptions) (WindowInfo, bool)
Click to show internal directories.
Click to hide internal directories.