window

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package window provides GTK window implementations.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWindowCreationFailed = WindowError{Message: "failed to create application window"}
)

Error constants.

Functions

func ErrWidgetCreationFailed

func ErrWidgetCreationFailed(name string) error

ErrWidgetCreationFailed creates an error for widget creation failure.

Types

type MainWindow

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

MainWindow represents the main browser window.

func New

func New(ctx context.Context, app *gtk.Application, cfg *config.Config) (*MainWindow, error)

New creates a new main browser window.

func (*MainWindow) AddOverlay

func (mw *MainWindow) AddOverlay(widget *gtk.Widget)

AddOverlay adds a widget to the content overlay. The widget will be displayed on top of the workspace content.

func (*MainWindow) Close

func (mw *MainWindow) Close()

Close closes the window.

func (*MainWindow) ContentArea

func (mw *MainWindow) ContentArea() *gtk.Box

ContentArea returns the content area box.

func (*MainWindow) Destroy

func (mw *MainWindow) Destroy()

Destroy cleans up window resources.

func (*MainWindow) SetContent

func (mw *MainWindow) SetContent(widget *gtk.Widget)

SetContent sets the content of the content area. This removes any existing content first to properly swap workspace views on tab switch.

func (*MainWindow) SetTitle added in v0.21.0

func (mw *MainWindow) SetTitle(title string)

SetTitle updates the window title with proper formatting. The title is capped at 255 characters for display.

func (*MainWindow) Show

func (mw *MainWindow) Show()

Show makes the window visible.

func (*MainWindow) TabBar

func (mw *MainWindow) TabBar() *component.TabBar

TabBar returns the tab bar component.

func (*MainWindow) Window

func (mw *MainWindow) Window() *gtk.ApplicationWindow

Window returns the underlying GTK window.

type WindowError

type WindowError struct {
	Message string
}

WindowError represents a window-related error.

func (WindowError) Error

func (e WindowError) Error() string

Jump to

Keyboard shortcuts

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