ui

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 41 Imported by: 0

Documentation

Overview

Package ui provides Gio widgets for the Growse browser chrome.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserUI

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

BrowserUI owns the widgets displayed around the page viewport.

func NewBrowserUI

func NewBrowserUI(navigator Navigator, invalidate func()) *BrowserUI

NewBrowserUI creates a browser toolbar and an empty viewport.

func (*BrowserUI) Close

func (ui *BrowserUI) Close()

Close cancels an in-flight navigation when the window closes.

func (*BrowserUI) Layout

func (ui *BrowserUI) Layout(gtx layout.Context) layout.Dimensions

Layout draws the browser toolbar and page viewport.

type Navigator interface {
	Navigate(ctx context.Context, rawURL string) (*browser.Page, error)
	Back(ctx context.Context) (*browser.Page, error)
	Forward(ctx context.Context) (*browser.Page, error)
	Reload(ctx context.Context) (*browser.Page, error)
	ReloadIgnoringCache(ctx context.Context) (*browser.Page, error)
	CanBack() bool
	CanForward() bool
	Page() *browser.Page
	DispatchClick(nodeID dom.NodeID, x, y float32) bool
	SetInputValue(nodeID dom.NodeID, value string) bool
	SetSelectValue(nodeID dom.NodeID, value string) bool
	ActivateCheckable(nodeID dom.NodeID) bool
	CommitInputValue(nodeID dom.NodeID, value string) bool
	SubmitForm(nodeID dom.NodeID) bool
	UpdateHover(nodeID dom.NodeID, x, y float32) bool
	ClearHover() bool
	UpdateFocus(nodeID dom.NodeID) bool
	MoveFormFocus(reverse bool) bool
	UpdateViewport(width, height float32) bool
}

Navigator is the browser capability used by the UI.

Jump to

Keyboard shortcuts

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