Documentation
¶
Index ¶
- type Server
- func (s *Server) CaptureSession() session.State
- func (s *Server) CloseAll()
- func (s *Server) CloseWindow(id string)
- func (s *Server) Config() config.Config
- func (s *Server) CreateApp(appName, title string) (*Window, error)
- func (s *Server) CreateAppPath(appName, title, path string) (*Window, error)
- func (s *Server) CreateBridge(title, command string) (*Window, error)
- func (s *Server) CreateExtApp(title, command string, args []string) (*Window, error)
- func (s *Server) CreateFilePicker(startDir string, extensions []string, onResult func(path string, ok bool)) (*Window, error)
- func (s *Server) CreateGfx(title, path string) (*Window, error)
- func (s *Server) CreateProgram(p config.Program) (*Window, error)
- func (s *Server) CreatePty(title string) (*Window, error)
- func (s *Server) CreatePtyCmd(title, command string, args []string) (*Window, error)
- func (s *Server) CreatePtyCmdPinned(title, command string, args []string) (*Window, error)
- func (s *Server) Focus(id string)
- func (s *Server) FocusOrCreateApp(appName, title string) error
- func (s *Server) Focused() string
- func (s *Server) Get(id string) *Window
- func (s *Server) HandleInput(id string, ev surface.InputEvent)
- func (s *Server) LaunchAction(action string) (err error)
- func (s *Server) Move(id string, x, y int)
- func (s *Server) NotifyService() *notify.Service
- func (s *Server) Nudge(id string, dx, dy, dw, dh int)
- func (s *Server) OpenPath(path string) error
- func (s *Server) RefreshTitles()
- func (s *Server) ResizeWindow(id string, w, h int)
- func (s *Server) RestoreSession(st session.State) int
- func (s *Server) SetConfig(cfg config.Config)
- func (s *Server) SetConfigListener(fn func(config.Config))
- func (s *Server) SetDock(dock string)
- func (s *Server) SetGeometry(id string, x, y, w, h int)
- func (s *Server) SetHostSize(cols, rows int)
- func (s *Server) SetNotify(n *notify.Service)
- func (s *Server) SetWindowTitle(id, title string)
- func (s *Server) Snap(id, region string)
- func (s *Server) Snapshot() proto.Snapshot
- func (s *Server) ToggleMaximize(id string)
- func (s *Server) ToggleMinimize(id string)
- func (s *Server) Windows() []*Window
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server owns windows and surfaces.
func (*Server) CaptureSession ¶
CaptureSession builds a restorable snapshot of open windows.
func (*Server) CloseWindow ¶
func (*Server) CreateAppPath ¶
CreateAppPath creates a native app with an optional path (Files start dir, etc.).
func (*Server) CreateBridge ¶
CreateBridge opens command as a bridged GUI app (see internal/bridge) — an off-screen Xvfb rendering the target X11 program, captured into cells.
func (*Server) CreateExtApp ¶
CreateExtApp spawns command (with args) as an out-of-process App SDK window (see internal/surface.ExtAppSurface, docs/extapp.md) — any executable speaking the NDJSON protocol over its own stdin/stdout, rather than a Go uiapp.App linked into this binary.
func (*Server) CreateFilePicker ¶
func (s *Server) CreateFilePicker(startDir string, extensions []string, onResult func(path string, ok bool)) (*Window, error)
CreateFilePicker opens a small modal file browser rooted at startDir, restricted to extensions if any are given. onResult fires exactly once, asynchronously, with ok=false if the user cancels — see Host.PickFile.
func (*Server) CreateProgram ¶
CreateProgram opens a registered program with pinned title and prog: launch key.
func (*Server) CreatePtyCmd ¶
CreatePtyCmd spawns a PTY running command with optional args.
func (*Server) CreatePtyCmdPinned ¶
CreatePtyCmdPinned keeps the desk title (custom registered programs).
func (*Server) FocusOrCreateApp ¶
FocusOrCreateApp focuses an existing app window by launch id or title, or creates one.
func (*Server) HandleInput ¶
func (s *Server) HandleInput(id string, ev surface.InputEvent)
func (*Server) LaunchAction ¶
LaunchAction runs a desktop/Start-menu action string.
func (*Server) NotifyService ¶
func (*Server) OpenPath ¶
OpenPath opens a file with default-app associations, or a directory in Files.
func (*Server) RefreshTitles ¶
func (s *Server) RefreshTitles()
func (*Server) ResizeWindow ¶
func (*Server) RestoreSession ¶
RestoreSession recreates windows from a saved session (geometry applied after create).
func (*Server) SetConfigListener ¶
func (*Server) SetGeometry ¶
SetGeometry moves and resizes a window (used for edge/corner drag).
func (*Server) SetHostSize ¶
func (*Server) SetWindowTitle ¶
SetWindowTitle updates a window's title bar text.
func (*Server) Snap ¶
Snap tiles the window into a desktop region: left|right|top|bottom. Snapping again to the same region restores the previous geometry.
func (*Server) ToggleMaximize ¶
func (*Server) ToggleMinimize ¶
type Window ¶
type Window struct {
ID string
Title string
TitlePinned bool
Launch string // recreate action: terminal, notes, prog:id, …
X, Y int
W, H int // outer size including chrome
Z int
Maximized bool
Minimized bool
Restore struct{ X, Y, W, H int }
Surface surface.Surface
Kind string
}
Window is a floating managed window.
func (*Window) ContentSize ¶
content size inside chrome: title(1)+borders(2) horizontal, borders+title