store

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskerStore = New[TaskerStoreValue]()
	CtrlStore   = New[CtrlStoreValue]()
	ResStore    = New[ResStoreValue]()
)

Functions

This section is empty.

Types

type CtrlStoreValue

type CtrlStoreValue struct {
	SinkIDToEventCallbackID     map[int64]uint64
	CustomControllerCallbacksID uint64
}

type ResStoreValue

type ResStoreValue struct {
	SinkIDToEventCallbackID     map[int64]uint64
	CustomRecognizersCallbackID map[string]uint64
	CustomActionsCallbackID     map[string]uint64
}

type Store

type Store[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any]() *Store[T]

func (*Store[T]) Del

func (s *Store[T]) Del(handle uintptr)

func (*Store[T]) Get

func (s *Store[T]) Get(handle uintptr) T

func (*Store[T]) Lock

func (s *Store[T]) Lock()

func (*Store[T]) Set

func (s *Store[T]) Set(handle uintptr, value T)

func (*Store[T]) Unlock

func (s *Store[T]) Unlock()

func (*Store[T]) Update

func (s *Store[T]) Update(handle uintptr, fn func(*T))

Update locks the store, passes the value to the callback for modification, then saves the modified value and unlocks.

type TaskerStoreValue

type TaskerStoreValue struct {
	SinkIDToEventCallbackID        map[int64]uint64
	ContextSinkIDToEventCallbackID map[int64]uint64
}

Jump to

Keyboard shortcuts

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