wcore

package
v0.10.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

wave core application coordinator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeTabPinning added in v0.10.0

func ChangeTabPinning(ctx context.Context, workspaceId string, tabId string, pinned bool) error

func CheckAndFixWindow added in v0.10.0

func CheckAndFixWindow(ctx context.Context, windowId string) *waveobj.Window

func CloseWindow added in v0.10.0

func CloseWindow(ctx context.Context, windowId string, fromElectron bool) error

CloseWindow closes a window and deletes its workspace if it is empty and not named. If fromElectron is true, it does not send an event to Electron.

func CreateBlock

func CreateBlock(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, rtOpts *waveobj.RuntimeOpts) (rtnBlock *waveobj.Block, rtnErr error)

func CreateClient

func CreateClient(ctx context.Context) (*waveobj.Client, error)

func CreateSubBlock added in v0.9.0

func CreateSubBlock(ctx context.Context, blockId string, blockDef *waveobj.BlockDef) (*waveobj.Block, error)

func CreateTab

func CreateTab(ctx context.Context, workspaceId string, tabName string, activateTab bool, pinned bool) (string, error)

returns tabid

func CreateWindow

func CreateWindow(ctx context.Context, winSize *waveobj.WinSize, workspaceId string) (*waveobj.Window, error)

func CreateWorkspace added in v0.10.0

func CreateWorkspace(ctx context.Context, name string, icon string, color string) (*waveobj.Workspace, error)

func DeleteBlock

func DeleteBlock(ctx context.Context, blockId string, recursive bool) error

Must delete all blocks individually first. Also deletes LayoutState. recursive: if true, will recursively close parent tab, window, workspace, if they are empty. Returns new active tab id, error.

func DeleteTab

func DeleteTab(ctx context.Context, workspaceId string, tabId string, recursive bool) (string, error)

Must delete all blocks individually first. Also deletes LayoutState. recursive: if true, will recursively close parent window, workspace, if they are empty. Returns new active tab id, error.

func DeleteWorkspace added in v0.10.0

func DeleteWorkspace(ctx context.Context, workspaceId string, force bool) (bool, error)

If force is true, it will delete even if workspace is named. If workspace is empty, it will be deleted, even if it is named. Returns true if workspace was deleted, false if it was not deleted.

func EnsureInitialData

func EnsureInitialData() error

Ensures that the initial data is present in the store, creates an initial window if needed

func FocusWindow added in v0.10.0

func FocusWindow(ctx context.Context, windowId string) error

func GetClientData added in v0.10.0

func GetClientData(ctx context.Context) (*waveobj.Client, error)

func GetWindow added in v0.10.0

func GetWindow(ctx context.Context, windowId string) (*waveobj.Window, error)

func GetWorkspace added in v0.10.0

func GetWorkspace(ctx context.Context, wsID string) (*waveobj.Workspace, error)

func ListWorkspaces added in v0.10.0

func ListWorkspaces(ctx context.Context) (waveobj.WorkspaceList, error)

func SendActiveTabUpdate added in v0.10.0

func SendActiveTabUpdate(ctx context.Context, workspaceId string, newActiveTabId string)

func SetActiveTab added in v0.10.0

func SetActiveTab(ctx context.Context, workspaceId string, tabId string) error

func SetColor added in v0.10.0

func SetColor(workspaceId string, color string) error

func SetIcon added in v0.10.0

func SetIcon(workspaceId string, icon string) error

func SetName added in v0.10.0

func SetName(workspaceId string, name string) error

func SwitchWorkspace added in v0.10.0

func SwitchWorkspace(ctx context.Context, windowId string, workspaceId string) (*waveobj.Workspace, error)

func UpdateWorkspaceTabIds added in v0.10.0

func UpdateWorkspaceTabIds(ctx context.Context, workspaceId string, tabIds []string, pinnedTabIds []string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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