Help us shape the future of Go! Take the 2026 Go Developer Survey

desktop

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 45 Imported by: 0

Documentation

Overview

Package desktop 绘制原生工作台并连接本机 Runtime Server。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Desktop

type Desktop struct {
	// contains filtered or unexported fields
}

Desktop 在窗口主线程持有阅读内容、编辑草稿和界面选择。

func NewDesktop

func NewDesktop(opt *DesktopOpt) (*Desktop, error)

NewDesktop 校验并保存桌面启动参数。

func (*Desktop) Run

func (d *Desktop) Run(ctx context.Context) error

Run 在主 goroutine 运行窗口,退出后取消并等待桌面任务。

type DesktopOpt

type DesktopOpt struct {
	RuntimeServerStart cli.RuntimeServerStartOpt
	PreferencesPath    string
}

DesktopOpt 指定本机服务启动参数与可选的偏好文件路径。

type WebViewDesktop

type WebViewDesktop struct {
	// contains filtered or unexported fields
}

WebViewDesktop 使用系统 WebView 显示本机 serve 的 WebUI。

func NewWebViewDesktop

func NewWebViewDesktop(opt *WebViewDesktopOpt) (*WebViewDesktop, error)

NewWebViewDesktop 校验并保存 WebView 桌面的启动参数。

func (*WebViewDesktop) Run

func (d *WebViewDesktop) Run(ctx context.Context) error

Run 连接本机服务,在主 goroutine 运行 WebView 窗口并等待本进程任务退出。

type WebViewDesktopOpt

type WebViewDesktopOpt struct {
	RuntimeServerStart cli.RuntimeServerStartOpt
}

WebViewDesktopOpt 指定 WebUI 使用的本机服务启动参数。

Jump to

Keyboard shortcuts

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