Documentation
¶
Index ¶
- Variables
- func Run(assets embed.FS, version, commit, buildDate string)
- type BrowserApp
- type BrowserAppInterface
- type BrowserPane
- func (p *BrowserPane) Cleanup()
- func (p *BrowserPane) ClipboardController() *control.ClipboardController
- func (p *BrowserPane) HasGUI() bool
- func (p *BrowserPane) HasGUIComponent(component string) bool
- func (p *BrowserPane) ID() string
- func (p *BrowserPane) MessageHandler() *messaging.Handler
- func (p *BrowserPane) NavigationController() *control.NavigationController
- func (p *BrowserPane) SetGUIComponent(component string, loaded bool)
- func (p *BrowserPane) SetHasGUI(has bool)
- func (p *BrowserPane) SetID(id string)
- func (p *BrowserPane) ShortcutHandler() *ShortcutHandler
- func (p *BrowserPane) UpdateLastFocus()
- func (p *BrowserPane) WebView() *webkit.WebView
- func (p *BrowserPane) ZoomController() *control.ZoomController
- type ClipboardControllerInterface
- type MessageHandlerInterface
- type NavigationControllerInterface
- type PaneInterface
- type ShortcutHandler
- type ShortcutHandlerInterface
- type WebViewInterface
- type WindowInterface
- type WindowShortcutHandler
- type WindowShortcutHandlerInterface
- type WorkspaceManager
- type ZoomControllerInterface
Constants ¶
This section is empty.
Variables ¶
var (
ErrFailedToInitialize = fmt.Errorf("failed to initialize window shortcuts")
)
Error definitions
Functions ¶
Types ¶
type BrowserApp ¶
type BrowserApp struct {
// contains filtered or unexported fields
}
BrowserApp represents the main browser application
func (*BrowserApp) Initialize ¶
func (app *BrowserApp) Initialize() error
Initialize sets up all browser components
type BrowserAppInterface ¶ added in v0.9.0
type BrowserAppInterface interface {
GetPanes() []*BrowserPane
SetActivePane(pane *BrowserPane)
GetActivePane() *BrowserPane
AppendPane(pane *BrowserPane)
RemovePane(pane *BrowserPane)
BuildWebkitConfig() (*webkit.Config, error)
CreatePaneForView(view *webkit.WebView) (*BrowserPane, error)
}
BrowserAppInterface abstracts BrowserApp for testing
type BrowserPane ¶ added in v0.9.0
type BrowserPane struct {
// contains filtered or unexported fields
}
BrowserPane bundles the per-pane WebView and its controllers.
func (*BrowserPane) Cleanup ¶ added in v0.9.0
func (p *BrowserPane) Cleanup()
Cleanup releases pane resources
func (*BrowserPane) ClipboardController ¶ added in v0.9.0
func (p *BrowserPane) ClipboardController() *control.ClipboardController
func (*BrowserPane) HasGUI ¶ added in v0.9.0
func (p *BrowserPane) HasGUI() bool
HasGUI returns whether GUI components are injected
func (*BrowserPane) HasGUIComponent ¶ added in v0.9.0
func (p *BrowserPane) HasGUIComponent(component string) bool
HasGUIComponent checks if a specific GUI component is loaded
func (*BrowserPane) ID ¶ added in v0.9.0
func (p *BrowserPane) ID() string
ID returns the unique pane identifier
func (*BrowserPane) MessageHandler ¶ added in v0.9.0
func (p *BrowserPane) MessageHandler() *messaging.Handler
func (*BrowserPane) NavigationController ¶ added in v0.9.0
func (p *BrowserPane) NavigationController() *control.NavigationController
func (*BrowserPane) SetGUIComponent ¶ added in v0.9.0
func (p *BrowserPane) SetGUIComponent(component string, loaded bool)
SetGUIComponent marks a GUI component as loaded
func (*BrowserPane) SetHasGUI ¶ added in v0.9.0
func (p *BrowserPane) SetHasGUI(has bool)
SetHasGUI marks GUI components as injected
func (*BrowserPane) SetID ¶ added in v0.9.0
func (p *BrowserPane) SetID(id string)
SetID sets the pane identifier
func (*BrowserPane) ShortcutHandler ¶ added in v0.9.0
func (p *BrowserPane) ShortcutHandler() *ShortcutHandler
func (*BrowserPane) UpdateLastFocus ¶ added in v0.9.0
func (p *BrowserPane) UpdateLastFocus()
UpdateLastFocus updates the last focus time
func (*BrowserPane) WebView ¶ added in v0.9.0
func (p *BrowserPane) WebView() *webkit.WebView
func (*BrowserPane) ZoomController ¶ added in v0.9.0
func (p *BrowserPane) ZoomController() *control.ZoomController
type ClipboardControllerInterface ¶ added in v0.9.0
type ClipboardControllerInterface interface {
}
ClipboardControllerInterface abstracts clipboard operations
type MessageHandlerInterface ¶ added in v0.9.0
type MessageHandlerInterface interface {
SetWorkspaceObserver(observer messaging.WorkspaceObserver)
}
MessageHandlerInterface abstracts messaging.Handler
type NavigationControllerInterface ¶ added in v0.9.0
type NavigationControllerInterface interface {
}
NavigationControllerInterface abstracts navigation operations
type PaneInterface ¶ added in v0.9.0
type PaneInterface interface {
WebView() WebViewInterface
MessageHandler() MessageHandlerInterface
ZoomController() ZoomControllerInterface
ClipboardController() ClipboardControllerInterface
ShortcutHandler() ShortcutHandlerInterface
ID() string
HasGUI() bool
SetHasGUI(bool)
SetID(string)
UpdateLastFocus()
HasGUIComponent(component string) bool
SetGUIComponent(component string, loaded bool)
Cleanup()
}
PaneInterface abstracts BrowserPane for testing
type ShortcutHandler ¶
type ShortcutHandler struct {
// contains filtered or unexported fields
}
ShortcutHandler manages keyboard shortcuts for the browser
func NewShortcutHandler ¶
func NewShortcutHandler(webView *webkit.WebView, clipboardController *control.ClipboardController, cfg *config.Config, app *BrowserApp) *ShortcutHandler
NewShortcutHandler creates a new shortcut handler
func (*ShortcutHandler) RegisterShortcuts ¶
func (s *ShortcutHandler) RegisterShortcuts()
RegisterShortcuts registers pane-specific keyboard shortcuts with focus guards
type ShortcutHandlerInterface ¶ added in v0.9.0
type ShortcutHandlerInterface interface {
}
ShortcutHandlerInterface abstracts shortcut handling
type WebViewInterface ¶ added in v0.9.0
type WebViewInterface interface {
LoadURL(url string) error
Show() error
Hide() error
Destroy() error
Window() *webkit.Window
GetCurrentURL() string
Widget() uintptr
RootWidget() uintptr
InjectScript(script string) error
DispatchCustomEvent(event string, detail map[string]any) error
RegisterKeyboardShortcut(key string, handler func()) error
RegisterURIChangedHandler(handler func(string))
}
WebViewInterface abstracts WebKit WebView for testing
type WindowInterface ¶ added in v0.9.0
type WindowInterface interface {
SetChild(widget uintptr)
}
WindowInterface abstracts webkit.Window for testing
type WindowShortcutHandler ¶ added in v0.9.0
type WindowShortcutHandler struct {
// contains filtered or unexported fields
}
WindowShortcutHandler manages global shortcuts at the window level
func NewWindowShortcutHandler ¶ added in v0.9.0
func NewWindowShortcutHandler(window *webkit.Window, app *BrowserApp) *WindowShortcutHandler
NewWindowShortcutHandler creates a new window-level shortcut handler
func (*WindowShortcutHandler) Cleanup ¶ added in v0.9.0
func (h *WindowShortcutHandler) Cleanup()
Cleanup releases resources
type WindowShortcutHandlerInterface ¶ added in v0.9.0
type WindowShortcutHandlerInterface interface {
Cleanup()
}
WindowShortcutHandlerInterface abstracts window shortcut handling for testing
type WorkspaceManager ¶ added in v0.9.0
type WorkspaceManager struct {
// contains filtered or unexported fields
}
WorkspaceManager coordinates Zellij-style pane operations.
func NewWorkspaceManager ¶ added in v0.9.0
func NewWorkspaceManager(app *BrowserApp, rootPane *BrowserPane) *WorkspaceManager
NewWorkspaceManager builds a workspace manager rooted at the provided pane.
func (*WorkspaceManager) FocusNeighbor ¶ added in v0.9.0
func (wm *WorkspaceManager) FocusNeighbor(direction string) bool
FocusNeighbor moves focus to the nearest pane in the requested direction using the actual widget geometry to determine adjacency.
func (*WorkspaceManager) HandlePopup ¶ added in v0.9.0
func (*WorkspaceManager) OnWorkspaceMessage ¶ added in v0.9.0
func (wm *WorkspaceManager) OnWorkspaceMessage(source *webkit.WebView, msg messaging.Message)
OnWorkspaceMessage implements messaging.WorkspaceObserver.
func (*WorkspaceManager) RunOnUI ¶ added in v0.9.0
func (wm *WorkspaceManager) RunOnUI(fn func())
RunOnUI schedules a function; here simply executes inline as GTK main loop is single-threaded
type ZoomControllerInterface ¶ added in v0.9.0
type ZoomControllerInterface interface {
ApplyInitialZoom()
}
ZoomControllerInterface abstracts zoom operations