lifecycler

package
v0.0.0-...-deeeb0d Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

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

Sender is who to send the lifecycle event to.

type State

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

State is a window's lifecycle state.

func (*State) SendEvent

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

func (*State) SetDead

func (s *State) SetDead(b bool)

func (*State) SetFocused

func (s *State) SetFocused(b bool)

func (*State) SetVisible

func (s *State) SetVisible(b bool)

Jump to

Keyboard shortcuts

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