ipc

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IPCJS = `` /* 4051-byte string literal not displayed */

Functions

func CheckEmitCallback

func CheckEmitCallback(id int32) *callback.Callback

CheckEmitCallback

IPC checks if the GO Emit callback function exists
returns the function and removes it

func CheckOnEvent

func CheckOnEvent(name string) *callback.Callback

CheckOnEvent

IPC checks if the event listening in GO exists
returns the function and removes it

func Emit

func Emit(name string, argument ...interface{}) bool

Emit

Event that triggers listening
default to triggering the main process

func EmitAndCallback

func EmitAndCallback(name string, argument []interface{}, fn interface{}) bool

EmitAndCallback

Event that triggers listening
with callback function
default to the main process

func EmitTarget

func EmitTarget(name string, tag target.ITarget, argument ...interface{}) bool

EmitTarget

Trigger an event for the specified target to listen to

func EmitTargetAndCallback

func EmitTargetAndCallback(name string, tag target.ITarget, argument []interface{}, fn interface{}) bool

EmitTargetAndCallback

Trigger an event with a callback function for the specified target to listen on

func On

func On(name string, fn interface{}, options ...types.OnOptions)

On

IPC GO Listening for events

func RemoveOn

func RemoveOn(name string)

RemoveOn IPC GO Remove listening events

func SetBrowserWindow added in v2.3.6

func SetBrowserWindow(bw target.IBrowserWindow)

SetBrowserWindow Set BrowserWindow on initialization

func SetProcessMessage

func SetProcessMessage(pm target.IWindow)

SetProcessMessage

Set the process message object
without manually calling it

Types

type EmitContextCallback

type EmitContextCallback func(context context.IContext)

EmitContextCallback IPC context Callback Function

type WaitChan added in v2.4.0

type WaitChan struct {
	Pending *sync.Map
	// contains filtered or unexported fields
}

WaitChan

IPC synchronous receiving data channel

func (*WaitChan) Done added in v2.4.0

func (m *WaitChan) Done(messageId int32, data interface{})

func (*WaitChan) NewDelayer added in v2.4.0

func (m *WaitChan) NewDelayer(messageId int32, delay time.Duration) *delayer

NewDelayer 创建一个计时器

func (*WaitChan) NextMessageId added in v2.4.0

func (m *WaitChan) NextMessageId() (id int32)

NextMessageId 返回下一个消息ID

Jump to

Keyboard shortcuts

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