actions

package
v0.1.0-rc.15 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package actions provides the shared workbench button registry for native code and extensions. Mutations are thread safe; callbacks run on the UI thread.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(a peb.Action) error

Types

type Definition

type Definition struct {
	Run func(peb.ActionContext) error
	peb.Action
}

type Registry

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

func (*Registry) Register

func (r *Registry) Register(d Definition) error

func (*Registry) Remove

func (r *Registry) Remove(id string)

func (*Registry) RemovePrefix

func (r *Registry) RemovePrefix(prefix string)

RemovePrefix removes an owner's buttons in a single pass.

func (*Registry) Run

func (r *Registry) Run(c peb.ActionContext) error

func (*Registry) SetWake

func (r *Registry) SetWake(wake func())

func (*Registry) Snapshot

func (r *Registry) Snapshot(dst []peb.Action, revision uint64) ([]peb.Action, uint64)

Snapshot copies only when the revision changes and reuses dst's capacity.

func (*Registry) Update

func (r *Registry) Update(a peb.Action) error

Jump to

Keyboard shortcuts

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