message

package
v0.0.0-...-880055c Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageIdCount     = 35
	MessageIdMaxIndex  = int(MessageIdExit)
	MessageIdLastValue = MessageIdExit
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncProcessMessage

type FuncProcessMessage = func(interface{}) bool

type IMessageListener

type IMessageListener interface {
	SetListener(MessageId, func(interface{}) bool)
	GetListener(MessageId) (func(interface{}) bool, bool)
	ProcessMessage(MessageId, interface{}) bool
}

type IMessageSender

type IMessageSender interface {
	SendMessage(MessageId, interface{}, string)
	SetSendMessage(func(MessageId, interface{}, string))
}

type Message

type Message struct {
	MessageId MessageId
	Params    interface{}
	ObjId     string
	TimeStamp time.Time
}

type MessageId

type MessageId int
const (
	MessageIdNone MessageId = iota
	MessageIdScreenResize
	MessageIdKey
	MessageIdMouse
	MessageIdMouseEnter
	MessageIdMouseMove
	MessageIdMouseExit
	MessageIdMouseClick
	MessageIdMouseDown
	MessageIdMouseUp
	MessageIdKeyPress
	MessageIdFocus
	MessageIdFocusNext
	MessageIdFocusPrevious
	MessageIdFocusParent
	MessageIdFocusChild
	MessageIdSetModeNormal
	MessageIdSetModeMove
	MessageIdSetModeResize
	MessageIdSetTheme
	MessageIdThemeChanged
	MessageIdMove
	MessageIdMinimize
	MessageIdRestoreSize
	MessageIdMaximize
	MessageIdResize
	MessageIdSetPosition
	MessageIdSetSize
	MessageIdZOrderUp
	MessageIdZOrderDown
	MessageIdZOrderTop
	MessageIdZOrderBottom
	MessageIdSelectMenuItem
	MessageIdClearSelectedMenuItems
	MessageIdExit
)

func MessageIdFromString

func MessageIdFromString(s string) (MessageId, error)

func (MessageId) String

func (v MessageId) String() string

type MessageListener

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

func NewMessageListener

func NewMessageListener() MessageListener

func (*MessageListener) GetListener

func (o *MessageListener) GetListener(messageId MessageId) (func(interface{}) bool, bool)

func (*MessageListener) ProcessMessage

func (o *MessageListener) ProcessMessage(messageId MessageId, messageParams interface{}) bool

func (*MessageListener) SetListener

func (o *MessageListener) SetListener(messageId MessageId, f func(interface{}) bool)

type MessageSender

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

func (*MessageSender) SendMessage

func (o *MessageSender) SendMessage(messageId MessageId, messageParams interface{}, entityId string)

func (*MessageSender) SetSendMessage

func (o *MessageSender) SetSendMessage(f func(MessageId, interface{}, string))

type ParamsKey

type ParamsKey struct {
	Rune  rune
	Key   int
	Shift bool
	Ctrl  bool
	Alt   bool
	Name  string
}

type ParamsMouse

type ParamsMouse struct {
	Row             int
	Col             int
	ButtonPrimary   bool
	ButtonSecondary bool
	ButtonMiddle    bool
	Shift           bool
	Ctrl            bool
	Alt             bool
}

type ParamsMouseExt

type ParamsMouseExt struct {
	ParamsMouse
	DeltaRow int
	DeltaCol int
}

type ParamsMove

type ParamsMove struct {
	Rows int
	Cols int
}

type ParamsResize

type ParamsResize struct {
	Rows int
	Cols int
}

Faire un SetSize

type ParamsScreenResize

type ParamsScreenResize struct {
	Rows int
	Cols int
}

type ParamsSetPosition

type ParamsSetPosition struct {
	Row int
	Col int
}

type ParamsSetTheme

type ParamsSetTheme struct {
	Name string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳