osevent

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Overview

Package osevent defines operating system level events, not associated with a particular window.

Index

Constants

This section is empty.

Variables

View Source
var KiT_Actions = kit.Enums.AddEnum(ActionsN, kit.NotBitFlag, nil)

Functions

This section is empty.

Types

type Actions

type Actions int32

Actions is the action taken on the osevent by the user.

const (
	// OpenFiles means the user indicated that the app should open file(s) stored in Files
	OpenFiles Actions = iota

	ActionsN
)

type Event

type Event struct {
	oswin.EventBase

	// Action taken on the osevent -- what has changed.  Osevent state fields
	// have current values.
	Action Actions
}

osevent.Event reports an OS level event

func (*Event) HasPos

func (ev *Event) HasPos() bool

func (*Event) OnFocus

func (ev *Event) OnFocus() bool

func (*Event) OnWinFocus added in v1.2.4

func (ev *Event) OnWinFocus() bool

func (*Event) Pos

func (ev *Event) Pos() image.Point

func (*Event) String

func (ev *Event) String() string

func (*Event) Type

func (ev *Event) Type() oswin.EventType

type OpenFilesEvent

type OpenFilesEvent struct {
	Event

	// Files are a list of files to open
	Files []string
}

osevent.OpenFilesEvent is for OS open files action to open given files

func (*OpenFilesEvent) Type

func (ev *OpenFilesEvent) Type() oswin.EventType

Jump to

Keyboard shortcuts

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