Documentation
¶
Overview ¶
Package window provides GTK window implementations.
Index ¶
- Variables
- func ErrWidgetCreationFailed(name string) error
- type MainWindow
- func (mw *MainWindow) AddOverlay(widget *gtk.Widget)
- func (mw *MainWindow) Close()
- func (mw *MainWindow) ContentArea() *gtk.Box
- func (mw *MainWindow) Destroy()
- func (mw *MainWindow) SetContent(widget *gtk.Widget)
- func (mw *MainWindow) SetTitle(title string)
- func (mw *MainWindow) Show()
- func (mw *MainWindow) TabBar() *component.TabBar
- func (mw *MainWindow) Window() *gtk.ApplicationWindow
- type WindowError
Constants ¶
This section is empty.
Variables ¶
var (
ErrWindowCreationFailed = WindowError{Message: "failed to create application window"}
)
Error constants.
Functions ¶
func ErrWidgetCreationFailed ¶
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) ContentArea ¶
func (mw *MainWindow) ContentArea() *gtk.Box
ContentArea returns the content area box.
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) 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