exp: golang.org/x/exp/shiny/driver/internal/lifecycler Index | Files

package lifecycler

import "golang.org/x/exp/shiny/driver/internal/lifecycler"

Package lifecycler tracks a window's lifecycle state.

It eliminates sending redundant lifecycle events, ones where the From and To stages are equal. For example, moving a window from one part of the screen to another should not send multiple events from StageVisible to StageVisible, even though the underlying window system's message might only hold the new position, and not whether the window was previously visible.

Index

Package Files

lifecycler.go

type Sender Uses

type Sender interface {
    Send(event interface{})
}

Sender is who to send the lifecycle event to.

type State Uses

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

State is a window's lifecycle state.

func (*State) SendEvent Uses

func (s *State) SendEvent(r Sender, drawContext interface{})

func (*State) SetDead Uses

func (s *State) SetDead(b bool)

func (*State) SetFocused Uses

func (s *State) SetFocused(b bool)

func (*State) SetVisible Uses

func (s *State) SetVisible(b bool)

Package lifecycler imports 2 packages (graph) and is imported by 2 packages. Updated 2017-06-05. Refresh now. Tools for package owners.