systemindicator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disable

func Disable() (ret js.Void)

Disable calls the function "WEBEXT.systemIndicator.disable" directly.

func Enable

func Enable() (ret js.Void)

Enable calls the function "WEBEXT.systemIndicator.enable" directly.

func FuncDisable

func FuncDisable() (fn js.Func[func()])

FuncDisable returns the function "WEBEXT.systemIndicator.disable".

func FuncEnable

func FuncEnable() (fn js.Func[func()])

FuncEnable returns the function "WEBEXT.systemIndicator.enable".

func FuncHasOnClicked

func FuncHasOnClicked() (fn js.Func[func(callback js.Func[func()]) bool])

FuncHasOnClicked returns the function "WEBEXT.systemIndicator.onClicked.hasListener".

func FuncOffClicked

func FuncOffClicked() (fn js.Func[func(callback js.Func[func()])])

FuncOffClicked returns the function "WEBEXT.systemIndicator.onClicked.removeListener".

func FuncOnClicked

func FuncOnClicked() (fn js.Func[func(callback js.Func[func()])])

FuncOnClicked returns the function "WEBEXT.systemIndicator.onClicked.addListener".

func FuncSetIcon

func FuncSetIcon() (fn js.Func[func(details SetIconDetails) js.Promise[js.Void]])

FuncSetIcon returns the function "WEBEXT.systemIndicator.setIcon".

func HasFuncDisable

func HasFuncDisable() bool

HasFuncDisable returns true if the function "WEBEXT.systemIndicator.disable" exists.

func HasFuncEnable

func HasFuncEnable() bool

HasFuncEnable returns true if the function "WEBEXT.systemIndicator.enable" exists.

func HasFuncHasOnClicked

func HasFuncHasOnClicked() bool

HasFuncHasOnClicked returns true if the function "WEBEXT.systemIndicator.onClicked.hasListener" exists.

func HasFuncOffClicked

func HasFuncOffClicked() bool

HasFuncOffClicked returns true if the function "WEBEXT.systemIndicator.onClicked.removeListener" exists.

func HasFuncOnClicked

func HasFuncOnClicked() bool

HasFuncOnClicked returns true if the function "WEBEXT.systemIndicator.onClicked.addListener" exists.

func HasFuncSetIcon

func HasFuncSetIcon() bool

HasFuncSetIcon returns true if the function "WEBEXT.systemIndicator.setIcon" exists.

func HasOnClicked

func HasOnClicked(callback js.Func[func()]) (ret bool)

HasOnClicked calls the function "WEBEXT.systemIndicator.onClicked.hasListener" directly.

func OffClicked

func OffClicked(callback js.Func[func()]) (ret js.Void)

OffClicked calls the function "WEBEXT.systemIndicator.onClicked.removeListener" directly.

func OnClicked

func OnClicked(callback js.Func[func()]) (ret js.Void)

OnClicked calls the function "WEBEXT.systemIndicator.onClicked.addListener" directly.

func SetIcon

func SetIcon(details SetIconDetails) (ret js.Promise[js.Void])

SetIcon calls the function "WEBEXT.systemIndicator.setIcon" directly.

func TryDisable

func TryDisable() (ret js.Void, exception js.Any, ok bool)

TryDisable calls the function "WEBEXT.systemIndicator.disable" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryEnable

func TryEnable() (ret js.Void, exception js.Any, ok bool)

TryEnable calls the function "WEBEXT.systemIndicator.enable" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryHasOnClicked

func TryHasOnClicked(callback js.Func[func()]) (ret bool, exception js.Any, ok bool)

TryHasOnClicked calls the function "WEBEXT.systemIndicator.onClicked.hasListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOffClicked

func TryOffClicked(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool)

TryOffClicked calls the function "WEBEXT.systemIndicator.onClicked.removeListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TryOnClicked

func TryOnClicked(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool)

TryOnClicked calls the function "WEBEXT.systemIndicator.onClicked.addListener" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

func TrySetIcon

func TrySetIcon(details SetIconDetails) (ret js.Promise[js.Void], exception js.Any, ok bool)

TrySetIcon calls the function "WEBEXT.systemIndicator.setIcon" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

Types

type DoneCallback

type DoneCallback[T any] struct {
	Fn  func(arg T, this js.Ref) js.Ref
	Arg T
}

func (*DoneCallback[T]) DispatchCallback

func (cb *DoneCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*DoneCallback[T]) Register

func (cb *DoneCallback[T]) Register() js.Func[func()]

type DoneCallbackFunc

type DoneCallbackFunc func(this js.Ref) js.Ref

func (DoneCallbackFunc) DispatchCallback

func (fn DoneCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (DoneCallbackFunc) Register

func (fn DoneCallbackFunc) Register() js.Func[func()]

type OnClickedEventCallback

type OnClickedEventCallback[T any] struct {
	Fn  func(arg T, this js.Ref) js.Ref
	Arg T
}

func (*OnClickedEventCallback[T]) DispatchCallback

func (cb *OnClickedEventCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*OnClickedEventCallback[T]) Register

func (cb *OnClickedEventCallback[T]) Register() js.Func[func()]

type OnClickedEventCallbackFunc

type OnClickedEventCallbackFunc func(this js.Ref) js.Ref

func (OnClickedEventCallbackFunc) DispatchCallback

func (fn OnClickedEventCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (OnClickedEventCallbackFunc) Register

func (fn OnClickedEventCallbackFunc) Register() js.Func[func()]

type SetIconDetails

type SetIconDetails struct {
	// Path is "SetIconDetails.path"
	//
	// Optional
	Path js.Any
	// ImageData is "SetIconDetails.imageData"
	//
	// Optional
	ImageData js.Any

	FFI_USE bool
}

func (*SetIconDetails) FreeMembers

func (p *SetIconDetails) FreeMembers(recursive bool)

FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.

func (SetIconDetails) FromRef

func (p SetIconDetails) FromRef(ref js.Ref) SetIconDetails

FromRef calls UpdateFrom and returns a SetIconDetails with all fields set.

func (SetIconDetails) New

func (p SetIconDetails) New() js.Ref

New creates a new SetIconDetails in the application heap.

func (*SetIconDetails) Update

func (p *SetIconDetails) Update(ref js.Ref)

Update writes all fields of the p to the heap object referenced by ref.

func (*SetIconDetails) UpdateFrom

func (p *SetIconDetails) UpdateFrom(ref js.Ref)

UpdateFrom copies value of all fields of the heap object to p.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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