Documentation
¶
Overview ¶
wave core application coordinator
Index ¶
- Constants
- Variables
- func ApplyPortableLayout(ctx context.Context, tabId string, layout PortableLayout, recordTelemetry bool) error
- func BootstrapStarterLayout(ctx context.Context) error
- func CheckAndFixWindow(ctx context.Context, windowId string) *waveobj.Window
- func CloseWindow(ctx context.Context, windowId string, fromElectron bool) error
- func CreateBlock(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, ...) (rtnBlock *waveobj.Block, rtnErr error)
- func CreateBlockWithTelemetry(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, ...) (rtnBlock *waveobj.Block, rtnErr error)
- func CreateClient(ctx context.Context) (*waveobj.Client, error)
- func CreateSubBlock(ctx context.Context, blockId string, blockDef *waveobj.BlockDef) (*waveobj.Block, error)
- func CreateTab(ctx context.Context, workspaceId string, tabName string, activateTab bool, ...) (string, error)
- func CreateWindow(ctx context.Context, winSize *waveobj.WinSize, workspaceId string) (*waveobj.Window, error)
- func CreateWorkspace(ctx context.Context, name string, icon string, color string, ...) (*waveobj.Workspace, error)
- func DeleteBlock(ctx context.Context, blockId string, recursive bool) error
- func DeleteTab(ctx context.Context, workspaceId string, tabId string, recursive bool) (string, error)
- func DeleteWorkspace(ctx context.Context, workspaceId string, force bool) (bool, string, error)
- func EnsureInitialData() (bool, error)
- func FocusWindow(ctx context.Context, windowId string) error
- func GetAllTabIndicators() map[string]*wshrpc.TabIndicator
- func GetClientData(ctx context.Context) (*waveobj.Client, error)
- func GetLayoutIdForTab(ctx context.Context, tabId string) (string, error)
- func GetTabIndicator(tabId string) *wshrpc.TabIndicator
- func GetWindow(ctx context.Context, windowId string) (*waveobj.Window, error)
- func GetWorkspace(ctx context.Context, wsID string) (*waveobj.Workspace, error)
- func GoSendNoTelemetryUpdate(telemetryEnabled bool)
- func InitMainServer() error
- func InitTabIndicatorStore()
- func ListWorkspaces(ctx context.Context) (waveobj.WorkspaceList, error)
- func QueueLayoutAction(ctx context.Context, layoutStateId string, actions ...waveobj.LayoutActionData) error
- func QueueLayoutActionForTab(ctx context.Context, tabId string, actions ...waveobj.LayoutActionData) error
- func ResolveBlockIdFromPrefix(ctx context.Context, tabId string, blockIdPrefix string) (string, error)
- func SendActiveTabUpdate(ctx context.Context, workspaceId string, newActiveTabId string)
- func SendWaveObjUpdate(oref waveobj.ORef)
- func SetActiveTab(ctx context.Context, workspaceId string, tabId string) error
- func SetColor(workspaceId string, color string) error
- func SetIcon(workspaceId string, icon string) error
- func SetName(workspaceId string, name string) error
- func SwitchWorkspace(ctx context.Context, windowId string, workspaceId string) (*waveobj.Workspace, error)
- func UpdateWorkspace(ctx context.Context, workspaceId string, name string, icon string, ...) (*waveobj.Workspace, bool, error)
- func UpdateWorkspaceTabIds(ctx context.Context, workspaceId string, tabIds []string) error
- type PortableLayout
- type TabIndicatorStore
Constants ¶
const ( LayoutActionDataType_Insert = "insert" LayoutActionDataType_InsertAtIndex = "insertatindex" LayoutActionDataType_Remove = "delete" LayoutActionDataType_ClearTree = "clear" LayoutActionDataType_Replace = "replace" LayoutActionDataType_SplitHorizontal = "splithorizontal" LayoutActionDataType_SplitVertical = "splitvertical" LayoutActionDataType_CleanupOrphaned = "cleanuporphaned" )
Variables ¶
var WorkspaceColors = [...]string{
"#00CED1",
"#00FFDB",
"#429DFF",
"#BF55EC",
"#FF453A",
"#FF9500",
"#FFE900",
}
var WorkspaceIcons = [...]string{
"terminal",
"triangle",
"star",
"heart",
"bolt",
"solid@cloud",
"moon",
"layer-group",
"rocket",
"flask",
"paperclip",
"chart-line",
"graduation-cap",
"mug-hot",
}
Functions ¶
func ApplyPortableLayout ¶
func BootstrapStarterLayout ¶
func CheckAndFixWindow ¶
func CloseWindow ¶
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 CreateSubBlock ¶
func CreateTab ¶
func CreateTab(ctx context.Context, workspaceId string, tabName string, activateTab bool, isInitialLaunch bool) (string, error)
returns tabid
func CreateWindow ¶
func CreateWorkspace ¶
func DeleteBlock ¶
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 ¶
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 ¶
Ensures that the initial data is present in the store, creates an initial window if needed
func GetAllTabIndicators ¶
func GetAllTabIndicators() map[string]*wshrpc.TabIndicator
func GetTabIndicator ¶
func GetTabIndicator(tabId string) *wshrpc.TabIndicator
func GoSendNoTelemetryUpdate ¶
func GoSendNoTelemetryUpdate(telemetryEnabled bool)
func InitMainServer ¶
func InitMainServer() error
func InitTabIndicatorStore ¶
func InitTabIndicatorStore()
func ListWorkspaces ¶
func ListWorkspaces(ctx context.Context) (waveobj.WorkspaceList, error)
func QueueLayoutAction ¶
func QueueLayoutActionForTab ¶
func SendActiveTabUpdate ¶
func SendWaveObjUpdate ¶
func SwitchWorkspace ¶
Types ¶
type PortableLayout ¶
type PortableLayout []struct {
IndexArr []int `json:"indexarr"`
Size *uint `json:"size,omitempty"`
BlockDef *waveobj.BlockDef `json:"blockdef"`
Focused bool `json:"focused"`
}
func GetNewTabLayout ¶
func GetNewTabLayout() PortableLayout
func GetStarterLayout ¶
func GetStarterLayout() PortableLayout
type TabIndicatorStore ¶
type TabIndicatorStore struct {
// contains filtered or unexported fields
}