app

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT, Unlicense Imports: 44 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ID = ""

Functions

func DataDir

func DataDir() (string, error)

func Events

func Events(yield func(event.Event) bool)

func Main

func Main()

func NewContext

func NewContext(ops *op.Ops, e FrameEvent) layout.Context

Types

type Config

type Config struct {
	Size image.Point

	MaxSize image.Point

	MinSize image.Point

	Title string

	Mode WindowMode

	NavigationColor color.NRGBA

	Orientation Orientation

	CustomRenderer bool

	Decorated bool

	TopMost bool

	Focused bool
	// contains filtered or unexported fields
}

type ConfigEvent

type ConfigEvent struct {
	Config Config
}

func (ConfigEvent) ImplementsEvent

func (ConfigEvent) ImplementsEvent()

type DestroyEvent

type DestroyEvent struct {
	Err error
}

func (DestroyEvent) ImplementsEvent

func (DestroyEvent) ImplementsEvent()

type FrameEvent

type FrameEvent struct {
	Now time.Time

	Metric unit.Metric

	Size image.Point

	Insets Insets

	Frame func(frame *op.Ops)

	Source input.Source
}

func (FrameEvent) ImplementsEvent

func (FrameEvent) ImplementsEvent()

type Insets

type Insets struct {
	Top, Bottom, Left, Right unit.Dp
}

type Option

type Option func(unit.Metric, *Config)

func CustomRenderer

func CustomRenderer(custom bool) Option

func Decorated

func Decorated(enabled bool) Option

func MaxSize

func MaxSize(w, h unit.Dp) Option

func MinSize

func MinSize(w, h unit.Dp) Option
func NavigationColor(color color.NRGBA) Option

func Size

func Size(w, h unit.Dp) Option

func Title

func Title(t string) Option

func TopMost

func TopMost(enabled bool) Option

type Orientation

type Orientation uint8
const (
	AnyOrientation Orientation = iota

	LandscapeOrientation

	PortraitOrientation
)

func (Orientation) Option

func (o Orientation) Option() Option

func (Orientation) String

func (o Orientation) String() string

type URLEvent

type URLEvent struct {
	URL *url.URL
}

func (URLEvent) ImplementsEvent

func (URLEvent) ImplementsEvent()

type ViewEvent

type ViewEvent interface {
	ImplementsEvent()

	Valid() bool
	// contains filtered or unexported methods
}

type WaylandViewEvent

type WaylandViewEvent struct {
	Display unsafe.Pointer

	Surface unsafe.Pointer
}

func (WaylandViewEvent) ImplementsEvent

func (WaylandViewEvent) ImplementsEvent()

func (WaylandViewEvent) Valid

func (w WaylandViewEvent) Valid() bool

type Window

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

func (*Window) Event

func (w *Window) Event() event.Event

func (*Window) Invalidate

func (w *Window) Invalidate()

func (*Window) Option

func (w *Window) Option(opts ...Option)

func (*Window) Perform

func (w *Window) Perform(actions system.Action)

func (*Window) Run

func (w *Window) Run(f func())

type WindowMode

type WindowMode uint8
const (
	Windowed WindowMode = iota

	Fullscreen

	Minimized

	Maximized
)

func (WindowMode) Option

func (m WindowMode) Option() Option

func (WindowMode) String

func (m WindowMode) String() string

type X11ViewEvent

type X11ViewEvent struct {
	Display unsafe.Pointer

	Window uintptr
}

func (X11ViewEvent) ImplementsEvent

func (X11ViewEvent) ImplementsEvent()

func (X11ViewEvent) Valid

func (x X11ViewEvent) Valid() bool

Directories

Path Synopsis
internal
xkb

Jump to

Keyboard shortcuts

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