events

package
v0.0.0-...-63eae10 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: LGPL-2.1 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionMap tActionMap

ActionMap -

Functions

func HandleEvent

func HandleEvent(ev IEvent)

HandleEvent -

Types

type IAction

type IAction interface {
	Name() string
	EventKey() string
	Description() string
	Do(ev IEvent) bool
}

IAction -

func NewAction

func NewAction(name, eventKey, descr string, handler TEventHandler) IAction

NewAction -

type IEvent

type IEvent interface {
	Time() time.Time
	Type() string
	EventKey() string
	Screen() interfaces.IScreen
	String() string
}

IEvent -

type TAction

type TAction struct {
	IAction
	// contains filtered or unexported fields
}

TAction -

func (*TAction) Description

func (o *TAction) Description() string

Description -

func (*TAction) Do

func (o *TAction) Do(ev IEvent) bool

Do -

func (*TAction) EventKey

func (o *TAction) EventKey() string

EventKey -

func (*TAction) Name

func (o *TAction) Name() string

Name -

type TDropFileEvent

type TDropFileEvent struct {
	TWindowEvent
	// contains filtered or unexported fields
}

TDropFileEvent -

func NewDropFileEvent

func NewDropFileEvent(scr interfaces.IScreen, id int, s string) *TDropFileEvent

NewDropFileEvent -

func (*TDropFileEvent) Content

func (o *TDropFileEvent) Content() string

Content -

func (*TDropFileEvent) String

func (o *TDropFileEvent) String() string

String -

func (*TDropFileEvent) Type

func (o *TDropFileEvent) Type() string

Type -

type TEvent

type TEvent struct {
	IEvent
	// contains filtered or unexported fields
}

TEvent -

func NewEvent

func NewEvent(scr interfaces.IScreen) *TEvent

NewEvent -

func (*TEvent) EventKey

func (o *TEvent) EventKey() string

EventKey -

func (*TEvent) Screen

func (o *TEvent) Screen() interfaces.IScreen

Screen -

func (*TEvent) String

func (o *TEvent) String() string

String -

func (*TEvent) Time

func (o *TEvent) Time() time.Time

Time -

func (*TEvent) Type

func (o *TEvent) Type() string

Type -

type TEventHandler

type TEventHandler func(ev IEvent) bool

TEventHandler -

type TKeyboardEvent

type TKeyboardEvent struct {
	TWindowEvent
	// contains filtered or unexported fields
}

TKeyboardEvent -

func NewKeyboardEvent

func NewKeyboardEvent(scr interfaces.IScreen, id int, ch rune, scan int, x, y, mod int) *TKeyboardEvent

NewKeyboardEvent -

func ToKeyboard

func ToKeyboard(ev IEvent) *TKeyboardEvent

ToKeyboard -

func (*TKeyboardEvent) EventKey

func (o *TKeyboardEvent) EventKey() string

EventKey -

func (*TKeyboardEvent) Rune

func (o *TKeyboardEvent) Rune() rune

Rune -

func (*TKeyboardEvent) ScanCode

func (o *TKeyboardEvent) ScanCode() int

ScanCode -

func (*TKeyboardEvent) String

func (o *TKeyboardEvent) String() string

String -

func (*TKeyboardEvent) Type

func (o *TKeyboardEvent) Type() string

Type -

type TMouseButtonEvent

type TMouseButtonEvent struct {
	TMouseMotionEvent
	// contains filtered or unexported fields
}

TMouseButtonEvent -

func NewMouseButtonEvent

func NewMouseButtonEvent(scr interfaces.IScreen, winID, x, y, state, button int) *TMouseButtonEvent

NewMouseButtonEvent -

func ToMouse

func ToMouse(ev IEvent) *TMouseButtonEvent

ToMouse -

func (*TMouseButtonEvent) Button

func (o *TMouseButtonEvent) Button() int

Button -

func (*TMouseButtonEvent) EventKey

func (o *TMouseButtonEvent) EventKey() string

EventKey -

func (*TMouseButtonEvent) String

func (o *TMouseButtonEvent) String() string

String -

func (*TMouseButtonEvent) Type

func (o *TMouseButtonEvent) Type() string

Type -

type TMouseMotionEvent

type TMouseMotionEvent struct {
	TWindowEvent
	// contains filtered or unexported fields
}

TMouseMotionEvent -

func NewMouseMotionEvent

func NewMouseMotionEvent(scr interfaces.IScreen, winID, x, y, xRel, yRel, state int) *TMouseMotionEvent

NewMouseMotionEvent -

func ToMouseMotion

func ToMouseMotion(ev IEvent) *TMouseMotionEvent

ToMouseMotion -

func (*TMouseMotionEvent) EventKey

func (o *TMouseMotionEvent) EventKey() string

EventKey -

func (*TMouseMotionEvent) Pos

func (o *TMouseMotionEvent) Pos() (int, int)

Pos -

func (*TMouseMotionEvent) String

func (o *TMouseMotionEvent) String() string

String -

func (*TMouseMotionEvent) Type

func (o *TMouseMotionEvent) Type() string

Type -

type TWindowCloseEvent

type TWindowCloseEvent struct {
	TWindowEvent
}

TWindowCloseEvent -

func NewWindowCloseEvent

func NewWindowCloseEvent(scr interfaces.IScreen, id int) *TWindowCloseEvent

NewWindowCloseEvent -

func ToWindowClose

func ToWindowClose(ev IEvent) *TWindowCloseEvent

ToWindowClose -

func (*TWindowCloseEvent) EventKey

func (o *TWindowCloseEvent) EventKey() string

EventKey -

func (*TWindowCloseEvent) String

func (o *TWindowCloseEvent) String() string

String -

func (*TWindowCloseEvent) Type

func (o *TWindowCloseEvent) Type() string

Type -

type TWindowEvent

type TWindowEvent struct {
	TEvent
	// contains filtered or unexported fields
}

TWindowEvent -

func NewWindowEvent

func NewWindowEvent(scr interfaces.IScreen, id int) *TWindowEvent

NewWindowEvent -

func ToWindow

func ToWindow(ev IEvent) *TWindowEvent

ToWindow -

func (*TWindowEvent) EventKey

func (o *TWindowEvent) EventKey() string

EventKey -

func (*TWindowEvent) String

func (o *TWindowEvent) String() string

String -

func (*TWindowEvent) Type

func (o *TWindowEvent) Type() string

Type -

func (*TWindowEvent) WindowID

func (o *TWindowEvent) WindowID() int

WindowID -

type TWindowResizedEvent

type TWindowResizedEvent struct {
	TWindowEvent
	// contains filtered or unexported fields
}

TWindowResizedEvent -

func NewWindowResizedEvent

func NewWindowResizedEvent(scr interfaces.IScreen, id, w, h, dw, dh int) *TWindowResizedEvent

NewWindowResizedEvent -

func ToWindowResized

func ToWindowResized(ev IEvent) *TWindowResizedEvent

ToWindowResized -

func (*TWindowResizedEvent) Delta

func (o *TWindowResizedEvent) Delta() (int, int)

Delta _

func (*TWindowResizedEvent) EventKey

func (o *TWindowResizedEvent) EventKey() string

EventKey -

func (*TWindowResizedEvent) Size

func (o *TWindowResizedEvent) Size() (int, int)

Size -

func (*TWindowResizedEvent) String

func (o *TWindowResizedEvent) String() string

String -

func (*TWindowResizedEvent) Type

func (o *TWindowResizedEvent) Type() string

Type -

Jump to

Keyboard shortcuts

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