gioui.org: gioui.org/io/system Index | Files

package system

import "gioui.org/io/system"

Package system contains events usually handled at the top-level program level.

Index

Package Files

system.go

type CommandEvent Uses

type CommandEvent struct {
    Type CommandType
    // Suppress the default action of the command.
    Cancel bool
}

CommandEvent is a system event.

func (*CommandEvent) ImplementsEvent Uses

func (_ *CommandEvent) ImplementsEvent()

type CommandType Uses

type CommandType uint8

CommandType is the type of a CommandEvent.

const (
    // CommandBack is the command for a back action
    // such as the Android back button.
    CommandBack CommandType = iota
)

type Config Uses

type Config interface {
    // Now returns the current animation time.
    Now() time.Time

    unit.Converter
}

Config define the essential properties of the environment.

type DestroyEvent Uses

type DestroyEvent struct {
    // Err is nil for normal window closures. If a
    // window is prematurely closed, Err is the cause.
    Err error
}

DestroyEvent is the last event sent through a window event channel.

func (DestroyEvent) ImplementsEvent Uses

func (_ DestroyEvent) ImplementsEvent()

type FrameEvent Uses

type FrameEvent struct {
    Config Config
    // Size is the dimensions of the window.
    Size image.Point
    // Insets is the insets to apply.
    Insets Insets
    // Frame replaces the window's frame with the new
    // frame.
    Frame func(frame *op.Ops)
    // contains filtered or unexported fields
}

A FrameEvent asks for a new frame in the form of a list of operations.

func (FrameEvent) ImplementsEvent Uses

func (_ FrameEvent) ImplementsEvent()

type Insets Uses

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

Insets is the space taken up by system decoration such as translucent system bars and software keyboards.

type Stage Uses

type Stage uint8

Stage of a Window.

const (
    // StagePaused is the Stage for inactive Windows.
    // Inactive Windows don't receive FrameEvents.
    StagePaused Stage = iota
    // StateRunning is for active Windows.
    StageRunning
)

func (Stage) String Uses

func (l Stage) String() string

type StageEvent Uses

type StageEvent struct {
    Stage Stage
}

A StageEvent is generated whenever the stage of a Window changes.

func (StageEvent) ImplementsEvent Uses

func (_ StageEvent) ImplementsEvent()

Package system imports 4 packages (graph) and is imported by 8 packages. Updated 2019-11-19. Refresh now. Tools for package owners.