window

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package window provides GTK window implementations.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWindowCreationFailed is returned when the GTK application window cannot be created.
	ErrWindowCreationFailed = WindowError{Message: "failed to create application window"}
)

Functions

func ErrWidgetCreationFailed

func ErrWidgetCreationFailed(name string) error

ErrWidgetCreationFailed returns an error for a failed widget creation.

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, tabBarPosition string) (*MainWindow, error)

New creates a new main browser window. tabBarPosition controls whether the tab bar is at the "top" or "bottom" (default: "top").

func (*MainWindow) AddOverlay

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

AddOverlay adds a widget as an overlay above the content area.

func (*MainWindow) Close

func (mw *MainWindow) Close()

Close closes the window.

func (*MainWindow) ContentArea

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

ContentArea returns the main content container widget.

func (*MainWindow) ContentOverlay added in v0.27.0

func (mw *MainWindow) ContentOverlay() *gtk.Overlay

ContentOverlay returns the overlay container for the content area.

func (*MainWindow) Destroy

func (mw *MainWindow) Destroy()

Destroy releases all GTK resources held by the window.

func (*MainWindow) SetContent

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

SetContent replaces the current content widget with the given widget.

func (*MainWindow) SetTitle added in v0.21.0

func (mw *MainWindow) SetTitle(title string)

SetTitle sets the window title.

func (*MainWindow) Show

func (mw *MainWindow) Show()

Show presents the window.

func (*MainWindow) TabBar

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

TabBar returns the window's tab bar component.

func (*MainWindow) Window

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

Window returns the underlying GTK application window.

type WindowError

type WindowError struct {
	Message string
}

WindowError is a window-related error.

func (WindowError) Error

func (e WindowError) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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