system

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT, Unlicense Imports: 3 Imported by: 358

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action uint

Action is a set of window decoration actions.

const (
	// ActionMinimize minimizes a window.
	ActionMinimize Action = 1 << iota
	// ActionMaximize maximizes a window.
	ActionMaximize
	// ActionUnmaximize restores a maximized window.
	ActionUnmaximize
	// ActionFullscreen makes a window fullscreen.
	ActionFullscreen
	// ActionRaise requests that the platform bring this window to the top of all open windows.
	// Some platforms do not allow this except under certain circumstances, such as when
	// a window from the same application already has focus. If the platform does not
	// support it, this method will do nothing.
	ActionRaise
	// ActionCenter centers the window on the screen.
	// It is ignored in Fullscreen mode and on Wayland.
	ActionCenter
	// ActionClose closes a window.
	// Only applicable on macOS, Windows, X11 and Wayland.
	ActionClose
	// ActionMove moves a window directed by the user.
	ActionMove
)

func (Action) String

func (a Action) String() string

type ActionInputOp

type ActionInputOp Action

ActionAreaOp makes the current clip area available for system gestures.

Note: only ActionMove is supported.

func (ActionInputOp) Add

func (op ActionInputOp) Add(o *op.Ops)

type Locale

type Locale struct {
	// Language is the BCP-47 tag for the primary language of the system.
	Language string
	// Direction indicates the primary direction of text and layout
	// flow for the system.
	Direction TextDirection
}

Locale provides language information for the current system.

type TextAxis

type TextAxis byte

TextAxis defines the layout axis of text.

const (
	// Horizontal indicates text that flows along the X axis.
	Horizontal TextAxis = iota
	// Vertical indicates text that flows along the Y axis.
	Vertical
)

type TextDirection

type TextDirection byte

TextDirection defines a direction for text flow.

const (
	// LTR is left-to-right text.
	LTR TextDirection = TextDirection(Horizontal<<axisShift) | TextDirection(FromOrigin<<progressionShift)
	// RTL is right-to-left text.
	RTL TextDirection = TextDirection(Horizontal<<axisShift) | TextDirection(TowardOrigin<<progressionShift)
)

func (TextDirection) Axis

func (d TextDirection) Axis() TextAxis

Axis returns the axis of the text layout.

func (TextDirection) Progression

func (d TextDirection) Progression() TextProgression

Progression returns the way that the text flows relative to the origin.

func (TextDirection) String

func (d TextDirection) String() string

type TextProgression

type TextProgression byte

TextProgression indicates how text flows along an axis relative to the origin. For these purposes, the origin is defined as the upper-left corner of coordinate space.

const (
	// FromOrigin indicates text that flows along its axis away from the
	// origin (upper left corner).
	FromOrigin TextProgression = iota
	// TowardOrigin indicates text that flows along its axis towards the
	// origin (upper left corner).
	TowardOrigin
)

Jump to

Keyboard shortcuts

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