callback

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgumentCallback

type ArgumentCallback struct {
	Callback *reflect.Value
}

ArgumentCallback

Callback function with parameters

func (*ArgumentCallback) Invoke

func (m *ArgumentCallback) Invoke(context context.IContext)

Invoke argument list function

type Callback

type Callback struct {
	IsAsync  bool              // JS ipc.emit mode
	Context  *ContextCallback  // 1 Context
	Argument *ArgumentCallback // 2 Argument
}

Callback IPC Listening callback function

  1. Callback Function - Context Mode
  2. Callback Function - Argument Mode

func (*Callback) ArgumentCallback

func (m *Callback) ArgumentCallback() *ArgumentCallback

ArgumentCallback

return argument list callback function

func (*Callback) ContextCallback

func (m *Callback) ContextCallback() *ContextCallback

ContextCallback

Return context parameter callback

type ContextCallback

type ContextCallback struct {
	Callback EmitContextCallback
}

ContextCallback

Callback function with context

func (*ContextCallback) Invoke

func (m *ContextCallback) Invoke(context context.IContext)

Invoke context function

type EmitContextCallback

type EmitContextCallback func(context context.IContext)

EmitContextCallback IPC context callback

type IChannel

type IChannel interface {
	BrowserId() int32 //Receive Browser Window ID
	ChannelId() int64 //Receive Channel ID
}

IChannel

The channel ID of the parameter type callback function
Used for listening to events and receiving parameters from the event channel source

Jump to

Keyboard shortcuts

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